Function anjay_set_queue_mode_preference
Defined in File core.h
Function Documentation
-
int anjay_set_queue_mode_preference(anjay_t *anjay, anjay_queue_mode_preference_t preference)
Configures the client’s usage of the LwM2M Queue Mode.
Please see the documentation of anjay_queue_mode_preference_t for the description of available configurations. The default value is
ANJAY_PREFER_ONLINE_MODE.NOTE: Changing the Queue Mode status of an existing registration is not possible without sending the Register (for LwM2M 1.1) or Update (for LwM2M 1.0) message again. For this reason, this call does NOT immediately take effect for connections that already have active registrations at the time of a call to this function. The changes will be applied at the time when next Register or Update message is scheduled to be sent. If you wish to apply the queue mode state change immediately, you can call either of anjay_schedule_registration_update, anjay_transport_schedule_reconnect, anjay_transport_exit_offline or anjay_transport_set_online .
NOTE: The queue mode preference is persisted and restored by anjay_new_from_core_persistence and anjay_delete_with_core_persistence .
- Parameters:
anjay – Anjay object to operate on.
preference – Queue Mode preference to use.
- Returns:
0 for success, or a negative value if
preferenceis not any of the supported values.