UPnP Eventing (Windows Embedded CE 6.0)
1/6/2010
By registering for events, a UPnP control point can receive notification when state variables change. In this context, an evented variable is a variable that sends notifications to control points when its value changes. A non-evented variable does not send notifications.
Control points subscribe to events using General Event Notification Architecture (GENA) messages transmitted over HTTP and TCP. UPnP events do not use SOAP.
To subscribe to a particular event:
- A control point sends a GENA SUBSCRIBE message to the service.
- The service accepts or rejects the subscription.
- If the service accepts the subscription, it responds with a duration value.
- The control point must periodically renew its subscription before the time represented by the duration value passes.
- If the subscription is not renewed, the service cancels the subscription and no longer sends events.
When a control point subscribes to a particular event, the device sends the complete state of all variables to the control point. After it supplies this initial state, the device sends updates to the control point if any changes in the specific variables occur.
A control point can subscribe to any number of evented variables. A control point can cancel a subscription when it is no longer needed.