net: lwm2m: Notify when it's safe to turn RX off

According to LWM2M specification, when Queue Mode is used, the LWM2M
client should keep the reciever on for specified time after sending A
CoAP message. This commit adds a new LWM2M event,
`LWM2M_RD_CLIENT_EVENT_QUEUE_MODE_RX_OFF`, to facilitate the process by
notifying the application when it's safe to turn the receiver off.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2020-02-24 16:44:52 +01:00 committed by Jukka Rissanen
commit d2e7a7d0c7
4 changed files with 26 additions and 1 deletions

View file

@ -1048,6 +1048,11 @@ int lwm2m_send_message(struct lwm2m_message *msg)
lwm2m_reset_message(msg, true);
}
if (IS_ENABLED(CONFIG_LWM2M_RD_CLIENT_SUPPORT) &&
IS_ENABLED(CONFIG_LWM2M_QUEUE_MODE_ENABLED)) {
engine_update_tx_time();
}
return 0;
}