3.Node Manager
Node Manager service is the gateway to the outside world. It routes UDP messages to the components in the node.
When starting up, Node Manager service listens to UDP port and joins multicast group on the global and subsystem network interfaces. It then sets up local socket server for components in the node to connect.
The Node Manager service needs to have a Node ID, which can be acquired statically or dynamically. In the case of static Node ID acquisition, the Node Manager Service obtains the Node ID through configuration.
When configured to dynamic node id acquisition, the Node Manager service needs to acquire Node ID from Subsystem Manager service. After receiving Subsystem Manager Ready, the Node Manager service sends Node ID Request message to the Subsystem Manager for the ID. The Subsystem Manager responds with Node ID Granted message to assign ID to the Node Manager. Node Manager service become READY when the Node ID Granted was received. When READY, Node Manager service can send and receive other messages.
In the case of static node id acquisition, Node Manager Service transitions its state to READY from STAND BY state.
Require: none
Inherit from: none
3.1 Service Behavior
3.1.1 State Diagram
Figure 2 Node Manager State Diagram
3.1.2 State Actions
State | Actions |
---|---|
STAND_BY |
|
ACQUIRE_ID |
|
READY |
|
3.1.3 Internal Events
Event | Parameters | Purpose |
---|---|---|
ieSubsystemManagerReady | Ready = [true | false] | Indicate Subsystem Manager Ready state. |
ieNodeIDAcquired | Node ID assigned | Indicate the Node ID is acquired. |
ieSendMessage | Request to send message | |
ieReceiveMessage | Route received message |
3.1.4 Transitions
Transition | Trigger | Condition | Action |
---|---|---|---|
A | ieSubsystemManagerReady | Ready=true && Dynamic ID=true | Update subsystem ID |
B | ieSubsystemManagerReady | Ready=false | Invalidate subsystem ID |
C | ieSubsystemManagerReady | Ready=true && Dynamic ID=fale | Update subsystem ID |
D | ieNodeIDAcquired | Valid Node ID assigned. | Update node ID. |
E | ieSubsystemManagerReady | Ready = false | Invalidate subsystem ID and Node ID. |
3.2 Protocol
3.2.1 Incoming Message Set
# | ID | Message |
---|---|---|
1 |
H:0x00000001 L:0x00000005 |
Subsystem Manager Ready |
2 |
H:0x00000001 L:0x00000107 |
Node ID Granted |
3.2.2 Outgoing Message Set
# | ID | Message |
---|---|---|
1 |
H:0x00000001 L:0x00000106 |
Node ID Request |
2 |
H:0x00000001 L:0x00000105 |
Node Ready |
3 |
H:0x00000001 L:0x00000104 |
Node Manager Ready |
3.3 Parameters
- CYCLEINTERVAL double, time interval in seconds of each cycle, default=0.1
- GLOBALUDP bool, whether to create global (inter-subsystem) communications, default=false.
- GLOBALIF string, ethernet interface name for the global communications, default=””.
- GLOBALIP string, ip address for the global communication, default=”192.168.1.2”. Note: if GLOBALIF is specified, ip address of the interface is used that GLOBALIP is ignored.
- GLOBALMULTICAST string, multicast address for broadcasting messages in global communication, default=”239.255.0.1”.
- SUBSYSUDP bool, whether to create subsystem (within subsystem) communications, default=false.
- SUBSYSIF string, ethernet interface name for the subsystem communications, default=””.
- SUBSYSIP string, ip address for the subsystem communications, default=”192.168.101.2”.
- SUBSYSMULTICAST string, multicast address for broadcasting messages in subsystem communications, default=”239.255.0.2”.
- LISTENINGPORT string, listening port for the communications, default=”13794”.
- TTL uint16, time-to-live of multicast packets, range [1..255], default=32.
- LOCALSOCKETFILEPATH string, local path file path, default=”/tmp/ulils”. Note that Node Manager service instantiates local socket server.
- DYNAMICID bool, whether to acquire node id from subsystem manager, default=false.
- NODEID uint16, node ID of the node manager, range [1..65536], default=0.
- ACQUIREIDRATE double, time interval in seconds for sending node id request, default=1.0.
- NODEMANAGERREADYRATE double, time interval in seconds for sending node manager ready to all the components in the node, default=1.0.
- NODEREADYRATE double, time interval in seconds for sending node ready message to the subsystem manager, default=1.0.
- SUBSYSTEMREADYTIMEOUT double, timeout in seconds for not receiving subsystem manager ready message, default=10.0.
- COMPREADYTIMEOUT double, timeout in seconds for not receiving comp ready message.
- COMPREADYCHECKINTERVAL double, time interval in seconds for checking if comp ready timeout.