UPnP integration for network discovery #20
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented UPnP service to publish SSDP messages on the network to allow the Adapter service to be discovered without prior configuration.
When configured in the generic
Service
, an internal UDP client will begin publishing SSDP "NOTIFY' messages on the network (239.255.255.250:1900). Additionally, a HTTP client will begin serving the UPnP device description file and icon.With these messages advertising the network service (TCP Adapter, for example) a listener, such as an Agent, could determine if the Adapter is already configured. If it hasn't been configured in the Agent, then referring to the
LOCATION
header field, a UPnP Device Description file (XML) can be downloaded and used to determine what type of Adapter (ie. TcpAdapter, MqttAdapter, etc.) and where to find it.In the future, with the help of the
MtconnectTranspiler
, it may be possible for theMtconnectAdapter
to automatically generate a Devices.xml based on theIAdapterSource
being used. This generated Devices.xml could then also be published via the HTTP client used in the UPnP service and available for download by an Agent. Then, the Agent could decide to validate the document and/or download it as part of the configuration.