Loading

Uli SDK

Subsystem Manager

4.Subsystem Manager

Subsystem Manager resides on the Subsystem Node, i.e. Node ID = 1 and Comp ID = 1.

Subsystem Manager sends global broadcast ID Request messages to acquires ID from ID Allocator. After receiving ID Granted messages, Subsystem Manager periodically sends subsystem broadcast Subsystem Manager Ready messages to all the Node Manager services in the subsystem.

Subsystem Manager also periodically sends Query Allocated ID to ID Allocator to be sure that its ID is valid.

Require: none

Inherit from: none

4.1 Service Behavior

4.1.1 State Diagram


Figure 3 Subsystem Manager State Diagram

4.1.2 State Actions


State Message
ACQUIRE_ID
  • Periodically sends ID Request messages to ID Allocator service.
  • Wait for ID Granted messages, raise ieIDAcquired(true).
READY
  • Periodically sends subsystem-wide broadcast Subsystem Manager Ready messages.
  • Periodically sends Query Allocated ID to ID Allocator.
  • Check if Report Allocated ID is received. If not, raise ieIDAcquired(false).
  • Route received messages for the subsystem node.

4.1.3 Internal Events


Event Parameters Purpose
ieIDAcquired
ieNodeReady Notify node is (not) ready
ieReceiveMessage Route received message

4.1.4 Transitions


Transition Trigger Condition Action
A ieIDAcquired true Update the subsystem ID
B ieIDAcquired false Invalidate the subsystem ID

4.2 Protocol

4.2.1 Incoming Message Set


# ID Message
1 H:0x00000001
L:0x0000010B
ID Granted
2 H:0x00000001
L:0x0000010C
Report Allocated ID

4.2.2 Outgoing Message Set


# ID Message
1 H:0x00000001
L: 0x00000109
ID Request
2 H:0x00000001
L: 0x0000010A
Query Allocated ID
3 H:0x00000001
L: 0x00000108
Subsystem Manager Ready

4.3 Parameters

  1. CYCLEINTERVAL double, time interval in seconds of each cycle, default=0.1.
  2. DYNAMICID bool, whether to acquire subsystem id from the IdAllocator, default=false.
  3. SUBSYSTEMID uint32, subsystem Id to use if dynamic id is false, default=3.
  4. ACQUIREIDRATE double, time interval in seconds for sending id request, default=1.0.
  5. QUERYIDRATE double, time interval in seconds for sending query id, default=1.0. Note: sending query id is to be sure that the IdAllocator is functioning.
  6. REPORTIDTIMEOUT double, timeout in seconds for not receiving report id messages, default=10.0.
  7. SUBSYSTEMMANAGERREADYRATE double, time interval in seconds for sending subsystem manager ready message, default=1.0.
  8. NODEREADYTIMEOUT double, timeout in seconds for not receiving node ready message, default=10.0.
  9. NODEREADYCHECKINTERVAL double, time interval in seconds for checking if node ready timeout, default=2.0.
  10.  STARTINGID uint16, the first node id to allocate, default=2.
  11.  ENDINGID uint16, the last node id to allocate, default=0. Note if starting id is less than the ending id, the subsystem manager will not allocate node id.