Loading

Uli SDK

ID Allocator

5.ID Allocator

ID Allocator service assigns ID to Subsystem Managers. When receiving globally broadcast ID Request messages, ID Allocator assigns the ID and sends ID Granted messages to the requester.

ID Allocator also provides Query/Report Allocated ID that allows clients to query the allocated ID based on the subsystem types or MAC addresses. Clients should periodically query the allocated subsystem ID to be sure its ID is on the replied list. If the ID is not on the list, the Subsystem Manager stops subsystem-broadcast Subsystem Manager Ready messages.

Require: none

Inherit from: none

5.1 Service Behavior

5.1.1 State Diagram


Figure 6 ID Allocator State Diagram

5.1.2 State Actions


State Actions
READY
  • Assign ID when receiving Subsystem ID Request.
  • Send Report Allocated Subsystem ID when receiving Query Allocated Subsystem ID.

5.1.3 Internal Events


Event Parameters Purpose
ieReceiveIDRequest
ieReceiveQueryAllocatedID

5.1.4 Transitions


Transition Trigger Condition Action
A ieReceiveIDRequest
A ieReceiveQueryAllocatedID Send Report Allocated ID

5.2 Protocol

5.2.1 Incoming Message Set


# ID Message
1 H:0x00000001
L:0x00000109
ID Request
2 H:0x00000001
L:0x0000010A
Query Allocated ID

5.2.2 Outgoing Message Set


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

5.3 Parameters

  1. CYCLEINTERVAL double, time interval in seconds of each cycle, default=0.1.
  2. STARTID uint32, the first subsystem id to allocate, default=1.
  3. ENDINGID uint32, the last subsystem id to allocate, default=0.