The following states are used by the module:
- STATE_DISCONNECTED: The initial state, in which there is no cloud connection. A
CLOUD_CONNECTmessage starts connecting. - STATE_CONNECTING: The module is attempting to connect, one attempt per
CLOUD_PRIV_CONNECT_ATTEMPTmessage, until credentials and valid time are available. It publishesCLOUD_CONNECTEDto itself on success, which is what moves the state machine on. Leaving the state cancels a scheduled retry. - STATE_CONNECTED: The cloud connection is up, and the module serves device message, shadow poll, Memfault post, and location requests. Leaving this state closes the CoAP session with
nrf_cloud_coap_disconnect().