/pps/services/cellular/radioctrl/control

Radio control object

Publishers
Cellular radio service; clients of the cellular radio service
Subscribers
Cellular radio service; clients of the cellular radio service
Note: This type of object is known as a server object, a special PPS object designed for point-to-point communication between a server and one or more clients. For details, see "Server objects" in the Persistent Publish/Subscribe Developer's Guide.

Message/response format

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}

power command

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).

power response

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).

Examples

Turn the radio off:
msg::power
id:msg_ID
dat:json:{"state":"OFF"}