Status Manager Client/Server#
Introduction#
The Status Manager Client/Server component coordinates state transitions between DriveOS and registered applications. It manages system and application states such as:
Initializing
Entering and exiting SC7
Entering and exiting Sentry Mode
Resume
Reinit
Deinit Prepare
Deinit
It provides interfaces to register applications and to control or synchronize their transitions through these states.
Architecture and Behavior#
Status Manager uses a socket interface to transfer state change and acknowledgment (ACK) messages between the server and client processes.
Status Manager Server#
On QNX, the server uses
NvDVMS
APIs to get and set DriveOS states.On Linux, the server creates a separate thread to set and get notice for enter/exit SC7.
The server manages state transitions for all registered applications through socket communication.
State transitions follow the DriveOS state machine shown below:
Status Manager Client#
Each client uses the provided Status Manager Client interface to change app states according to messages from Status Manager server.
Status Manager Client sends messages to notify the server when their state changes are complete.
The Status Manager server sends acknowledgments to confirm that state changes were received and processed.
Usage#
In a terminal window, start
status_manager
as the status manager server and set the parameter for the number of clients to be registered. As listed below, -n set to 2 means two processes ofnvsipl_multicast
will be launched(inter-process case)./status_manager -n 2
This example expects two instances of nvsipl_multicast to register (inter-process scenario).
In another terminal window, start each nvsipl_multicast instance with the -7 option to register it as a client.
./nvsipl_multicast -t F008A120RM0AV2_CPHY_x4 -p "sipl_ipc" -7 & ./nvsipl_multicast -t F008A120RM0AV2_CPHY_x4 -p "ipc_enc" -7
The
nvsipl_multicast
clients will remain running until they reach theInit_Done
state, then send confirmation to the Status Manager. Once all registered clients reportInit_Done
, the Status Manager will prompt for the next state:All registered clients at InitDone state, Input for next state: 'dp': switch to deinit prepare state. 's': switch to suspend state. 'r': switch to operational state. 'lp': switch to low power state.
The state could be switched by sending the corresponding command. For example, currently, all clients are in Init_Done state, and you could choose one command from “dp”, “s” , “t” or “lp” to type on terminal, so that the DriveOS/clients state will be switched to DeinitPare/Suspend/Operational/Low Power Mode state.
Once status_manager gets the info that all clients are in a specific state, status_manager will wait for input to switch DriveOS/clients to the next state. After inputting the next state on the terminal, the DriveOS/clients state will be switched if the input state is valid according to the DriveOS state machine.
Constraints#
On QNX Safety systems, the socket path must be included in the allow_attached list of io_pkt_v6_hc_eqos_0_t. This configuration is found in the policy_debug_orin_gos_vm_safety.txt file.
The ReInit state is supported only in DriveOS versions 6.5.0.0 and 6.0.9.3 or later.