Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
ISO/IEC 29341-10-10 specifies the UPnP QoS Device Service, the service-level interface that exposes QoS Device capabilities to UPnP control points. This service defines the actions, state variables, and event mechanisms that enable control points to query, configure, and monitor QoS policies on a QoS-capable device. It is the programmatic interface through which the UPnP QoS framework achieves traffic management.
The QoS Device Service operates as a standard UPnP service hosted on the QoS Device. It exposes actions for retrieving supported traffic classes, applying traffic policies, querying current QoS state, and subscribing to QoS-related events such as bandwidth changes or policy violations.
The QoS Device Service defines a comprehensive set of actions organized into functional groups. Configuration actions allow control points to set traffic policies and bandwidth reservations. Query actions retrieve current QoS state, active flow information, and available traffic classes. Monitoring actions provide access to QoS statistics including packet counts, dropped packets, and queue depths.
State variables in the QoS Device Service are categorized into configuration variables (writeable by authorized control points), status variables (read-only, reflecting current device state), and evented variables (triggering notifications on change). Critical state variables include: QosDeviceState (idle/active/configuring/error), TotalBandwidth, AvailableBandwidth, ActiveFlowCount, and PolicyViolationCount.
| Action Name | Category | Description | Key Arguments |
|---|---|---|---|
| GetSupportedTrafficClasses | Query | Retrieves list of supported traffic classes | Out: TrafficClassList |
| ApplyTrafficPolicy | Configuration | Applies a QoS policy to a traffic flow | In: FlowSpec, TrafficClass, Priority |
| RemoveTrafficPolicy | Configuration | Removes a previously applied policy | In: PolicyID |
| GetQosState | Query | Retrieves current QoS device state | Out: QosState, ActiveFlows |
| GetQosStatistics | Query | Gets traffic/performance statistics | Out: StatsData |
| RequestBandwidthReservation | Configuration | Reserves bandwidth for a specific flow | In: FlowID, Bandwidth, Duration |
| ReleaseBandwidthReservation | Configuration | Releases a bandwidth reservation | In: ReservationID |
| SubscribeToQosEvents | Eventing | Subscribes to QoS event notifications | In: EventFilter, Out: SubscriptionID |
Practical implementation of the QoS Device Service requires careful thread safety design. The service must handle concurrent action invocations from multiple control points while maintaining consistency of state variables. The standard recommends using a reader-writer lock pattern: multiple simultaneous query actions are safe, but configuration actions should acquire exclusive access to prevent race conditions.
Error handling deserves special attention. The service should return meaningful error codes for common failure scenarios: 402 (Invalid Args) for malformed action parameters, 501 (Action Failed) for internal device errors, 606 (Argument Value Out of Range) for invalid traffic class or bandwidth values, and 702 (Not Authorized) when the requesting control point lacks permission.
For bandwidth reservation management, implement a timeout mechanism that automatically releases orphaned reservations when a control point disconnects unexpectedly. The standard suggests a configurable timeout, with 300 seconds (5 minutes) as a reasonable default. This prevents bandwidth from being permanently consumed by crashed or unresponsive control points.