The UPnP control point:
Control point discovery
When the CP starts, automatically sends a multicast SSDP message in order to search for available UPnP devices on the network. As this procedure must be repeated in case of updating device list while CP is running, there's in MyCtrlPoint a specific discovery method (based on inherited search method). After the discovery/search call is complete, the CP waits for the time specified in the search-MX parameter for devices responses.
For UPnP Device Architecture specifications, a "device" is not only an entity related with a phisical host on the local area network. In fact, there are also logical (or virtual) devices that are on the same host of the main (root) device and that are indipendent and unique identified each other. So, since the control point is developed for communicate only with servers and media players, that (almost) always belongs to upnp:rootdevice class, then the M-Search is always launch in the final release of the running CP program with root devices as search targets (ST).
In order to select a specific device from the whole list of "discovered" ones, the MyCtrlPoint class provide a findDeviceByTag method, where "tags" is an index for one of the following criteria:
- Device Type
- UDN (Unique Device Number)
- Device Name
For a detailed description on how SSDP packets for a multicast discovery and a discovery reply are made, please see The UPnP media renderer - SSDP section.