Placing Device Management Client in alert state
Device Management Client has a state called Alert()
. In this state, the client halts all nonessential timers and stops automatic message sending to Device Management. Only application-triggered notifications are delivered in the alert state. Alert()
is suitable when the device risks running out of battery or has limited amount of network bandwidth to ensure critical (alert) notifications can be sent. In the alert()
state, the client ignores any confirmable requests from the service. (The server retransmits these.)
To continue client operations, the application should call MbedCloudClient::resume();
MbedCloudClient::alert();
The result of that request can be:
-
Success
If Device Management Client is successfully placed in the
Alert()
state, the application receives theAlertMode
result through theon_status_callback
callback. -
Failure
If Device Management Client can't go to the
Alert()
state, it instead places itself in thePause()
state. The application receives thePaused
result through theon_status_callback
callback.
It's the responsibility of the application to resume()
the client operations before the device lifetime expires.