[network] HSE Discovery Protocol
New generic UDP service for simple finding of HSE-based applications in the network and for simple querying of basic information (Name, Unit_ID, IP Address...).
As this service should also be able to detect applications/devices in different IP subnets (with "wrong" IP addresses), we should use UDP as a transport protocol.
In our applications, this service should start optionally, depending on a setting in config.ini or unit.ini
Preparatory Work
-
Review existing code and decide what to reuse (and where to put it - separate repo?) - NI Discovery Protocol API
- hse-libraries:hse-networking:UDP:* -> it seems I already prepared something similar
- GenNet Server (how it instantiates new services)
- Legacy APPic Tool Suite (and the APPic protocol stuff it uses) for inspiration
Basic Structure
-
a separate repository -
a separate library (similar to hse-db) -
a DQMH module and a collection of helper VIs (similar to hse-db) -
a simple VI to add this to any given project
-
Basic Commands
-
Start service (needs to run in parallel) -
Stop service -
"broadcast" a message (eg "I have started, my name is...") -
"broadcast" a message & receive replies from all reachable applications -
send message & receive reply from a specifically addressed application
Basic Message
-
eg "who's out there?" => "SomeRtExe"; "AnotherApp"; "Win.exe"; ... -
eg "1.2.3.4: what are your details?" - Name ("SomeRtExe")
- Unit_123
- 00:11:22:33:44:55
- Version Number(s)
- Run-Time Environment (dev. or exe)
Advanced Messages
-
Implement passive commands (just reading information) - "Retrieve list of Unit folders"
-
Implement active commands (needs at least some sort of security/auth; writing info to device) - "restart"
- "set IP address"
- "Set Unit_ID"
- "set date and time"
- should be secure: encryption/signature/checksum etc.
Edited by Joerg Hampel