Loading

Uli SDK

Node Manager

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
  • Wait for Subsystem Manager Ready Message, raise ieSubsytemManagerReady(true)
ACQUIRE_ID
  • Periodically sends Node ID Request messages to Subsystem Manager service.
  • Wait for Node ID Allocated messages, raise ieIDAcquired(NodeID).
  • Check if SubsysteManagerReady timeout, raise ieSubsystemManagerReady(false)
READY
  • Periodically sends Node Ready messages to Subsystem Manager service.
  • Periodically sends Node Manager Ready messages to all the components in the node.
  • Check if Subsystem Manager Ready timeout.
  • Route messages for components.

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

  1. CYCLEINTERVAL double, time interval in seconds of each cycle, default=0.1
  2. GLOBALUDP bool, whether to create global (inter-subsystem) communications, default=false.
  3. GLOBALIF string, ethernet interface name for the global communications, default=””.
  4. 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.
  5. GLOBALMULTICAST string, multicast address for broadcasting messages in global communication, default=”239.255.0.1”.
  6. SUBSYSUDP bool, whether to create subsystem (within subsystem) communications, default=false.
  7. SUBSYSIF string, ethernet interface name for the subsystem communications, default=””.
  8. SUBSYSIP string, ip address for the subsystem communications, default=”192.168.101.2”.
  9. SUBSYSMULTICAST string, multicast address for broadcasting messages in subsystem communications, default=”239.255.0.2”.
  10.  LISTENINGPORT string, listening port for the communications, default=”13794”.
  11.  TTL uint16, time-to-live of multicast packets, range [1..255], default=32.
  12.  LOCALSOCKETFILEPATH string, local path file path, default=”/tmp/ulils”. Note that Node Manager service instantiates local socket server.
  13. DYNAMICID bool, whether to acquire node id from subsystem manager, default=false.
  14.  NODEID uint16, node ID of the node manager, range [1..65536], default=0.
  15.  ACQUIREIDRATE double, time interval in seconds for sending node id request, default=1.0.
  16.  NODEMANAGERREADYRATE double, time interval in seconds for sending node manager ready to all the components in the node, default=1.0.
  17.  NODEREADYRATE double, time interval in seconds for sending node ready message to the subsystem manager, default=1.0.
  18.  SUBSYSTEMREADYTIMEOUT double, timeout in seconds for not receiving subsystem manager ready message, default=10.0.
  19.  COMPREADYTIMEOUT double, timeout in seconds for not receiving comp ready message.
  20.  COMPREADYCHECKINTERVAL double, time interval in seconds for checking if comp ready timeout.