Radio control object
Commands sent to the /pps/services/cellular/radioctrl/control object are of the form:
msg::command_string\nid::msg_ID\ndat:datatype:{data}
Responses always reflect the command_string and msg_ID that were sent in the message, along with an error code, if applicable:
res::command_string\nid::msg_ID\nerr:n:{error_code}
Turn the cellular radio on and off.
This is an asynchronous interface. The response indicates that the radio layer has initiated the power state change. The result is published to the status attribute power_status.
When the power off message is sent, the radio layer sets the power_status attribute to the value SHUTTING_DOWN for a pre-defined duration (currently hardcoded to 2 seconds) before turning off the radio. Any entity (UI, CDS, IMS, and so on) interested in the shutdown notification should monitor the power_status attribute and trigger an appropriate action if needed, e.g., graceful disconnect.
The power command has the following form:
msg::power id:msg_ID dat:json:{"state":"ON|OFF"}
where state is power setting for the radio (either ON or OFF).
The radio service sends the power response to the client in reply to the power command. The response has the following form:
res::power id::msg_ID err:n:error_code
The err attribute is returned only in the case of an error (and is set to -1).
msg::power id:msg_ID dat:json:{"state":"OFF"}