Contents
PNP
Network applications can send UDP-frame to multicast address 239.192.1.2:33304. This frame contains XML document (with DOCTYPE pnp_message) that describes application's current status.
Program announce element
Program should publish such element on application start-up and on every change of its content. Root element is 'program' which has following attributes:
- Mandatory/Obligatory
- seq - sequence number (counter)
type - short name of program such as: Adc64, EvB, Cru, RunControl, etc.
- index - application's program index, custom non-empty string which helps distinguish two instance of same applications (for example two EvB applications: 'Test_master' and 'Test_slave')
- uuid - unique identification, generated on application start-up
- Optional
- name - composition of 'type #index' (deprecated)
- ver_date - application's compilation date
- ver_hash - git hash of application source
- hostName - host name where application is running
- host - source host (ip-address) where application is running (by default assuming that source host is suurce of multicast package)
Program element can hold sub-elements: interfaces and options.
Interfaces
This element describes to another program how they can communicate with this program. Element 'interface' has following attributes:
- port - port number of this interface
- enabled - indicates is this interface is enabled (values: 1 or 0).
- id - interface's identification number.
- isFree - indicates is this interface is free, can accept incoming connection (values: 1 or 0).
type - specify what type is this interface. At this moment can be 'RemoteControl', 'data flow' or 'Monitor output data flow'
If some interface has some connected peers, there will be 'peer' sub-element with attributes:
- 'p' - peer port
- 'h' - peer host
Options
Optional elements without some concrete purpose. Holds key-value map.
Program close element
Program should publish such element right before application shut-down. Root element is 'program_close', attributes is the same as for Program announce element
Search element
Root element is 'discover_request'. Program element can hold sub-elements: 'target'. All programs should responce if there is no 'target' elements or if one of them contains its program type.
Target
Element contains program type string for search.
Example
1 <!DOCTYPE pnp_message>
2 <program seq="933307" name="EvB#ivan" index="ivan" ver_date="2023-06-06T16:24:44" type="EvB" uuid="{f05b1726-74a3-4409-af3a-726f0c75302b}" ver_hash="1.3.2-2-g55461c3" hostName="c4n01.he.jinr.ru">
3 <options>
4 <option name="Clients" value="1"/>
5 <option name="fsm" value="Run"/>
6 <option name="output" value="idle"/>
7 <option name="runIndex" value=""/>
8 <option name="runNumber" value="0"/>
9 </options>
10 <interfaces>
11 <interface port="43073" enabled="1" id="0" isFree="0" type="RemoteControl">
12 <peer h="::ffff:10.18.15.22" p="36312"/>
13 </interface>
14 <interface port="31236" enabled="1" id="0" isFree="1" type="Monitor output data flow"/>
15 <interface port="47185" enabled="1" id="0" isFree="1" type="data flow"/>
16 </interfaces>
17 </program>