Device Class

Creates a device used to manage global device information, host, and hosted services.

Namespace: Dpws.Device
Assembly: MFDpwsDevice (in mfdpwsdevice.dll)

Syntax

public static class Device

Remarks

The Device class provides the base functionality of a device. It is the primary control class for a device and is the container and manager of hosted services provided by a device. This class exposes static methods and properties used to manage device information, start, and stop internal services and to manage hosted services.

A device developer uses this class to set device-specific information common to all hosted services such as ThisModel, ThisDevice, and endpoint information like the device address and device ID. When developing hosted services, this class provides access to information required by the service when building response messages. The Device class also manages a collection of hosted services that implement the functionality of a device.

Hosted services are created by device developers. These services are added to the collection of hosted services maintained by the Device class. When the device services start, an instance of each hosted service in the hosted services collection is instantiated. When a device request is received, the hosted services collection contains information used by the transport services to route requests to a specific service.

The Device class also manages a set of internally-hosted services that provide the boilerplate functionality of Devices Profile for Web Services (DPWS), such as Discovery, Mex (Metadata Exchange), and the Event Subscription manager. These are not exposed to a device developer.

The Device class also manages a collection of namespaces common to all DPWS-compliant devices.

If a device requires Host functionality outlined in the DPWS specification, a hosted service can be added to the device to provide this functionality. Special provisions are made because a device's Host service has the same endpoint as the device.

Version Information

Available in the .NET Micro Framework versions 2.5, 3.0, 4.0, 4.1 and 4.2.

See Also

Reference

Device Members
Dpws.Device Namespace