UPnP Schema
This is a separate library for UPnP schema. It contains standard and reusable schema.
Code and header files are generated directly from schema to simplify the task of implementing hosted UPnP devices and controlling them.
You can find these under
Sming/out/{SMING_ARCH}/{debug|release}/build/UPnP-Schema/src
.
Controlling UPnP devices
Devices and services must be registered with the UPnP framework so that the correct objects can be constructed during discovery. This information is generated in groups, with one group for each domain. This means you only need to include one file in your project. For example:
#include <Network/UPnP/schemas-sming-org/ClassGroup.h>
void initUPnP()
{
UPnP::schemas_upnp_org::registerClasses();
}
This tells UPnP about all the standard devices and services.
Custom schema
Custom schema may be imported from the application or another Component.
Create a schema
sub-directory and arrange as:
schema/
{domain}/
device/
...
service/
...
Suitable schema are generated by the UPnP scan tool. These may be edited and customised with additional detail, comments, etc. as required.
Build variables
- UPNP_SCHEMA
Read-only. Contains a list of all discovered schema directories to be built for the project.
References
Used by
Hue Emulator Library
Basic ControlPoint Sample
Basic UPnP Sample
Environment Variables
SoC support
esp32
esp32c2
esp32c3
esp32s2
esp32s3
esp8266
host
rp2040