Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
lwm2m_send_scheduler.h File Reference
#include <stdbool.h>
#include <zephyr/net/lwm2m.h>

Go to the source code of this file.

Functions

int lwm2m_send_sched_init (void)
 Register the send scheduler LwM2M objects and initialise state.
bool lwm2m_send_sched_cache_filter (const struct lwm2m_obj_path *path, const struct lwm2m_time_series_elem *element)
 Cache filter that enforces the configured scheduler rules.
void lwm2m_send_sched_handle_registration_event (void)
 Handle a registration or registration-update completion event.

Function Documentation

◆ lwm2m_send_sched_cache_filter()

bool lwm2m_send_sched_cache_filter ( const struct lwm2m_obj_path * path,
const struct lwm2m_time_series_elem * element )

Cache filter that enforces the configured scheduler rules.

Hook this up via lwm2m_set_cache_filter for each cached resource you want the scheduler to control.

Parameters
pathLwM2M path of the cached resource.
elementCandidate sample about to be cached.
Returns
true to keep the sample in the cache, false to drop or defer it.

◆ lwm2m_send_sched_handle_registration_event()

void lwm2m_send_sched_handle_registration_event ( void )

Handle a registration or registration-update completion event.

Applications should call this when their LwM2M RD client reports a successful registration or registration update so the send scheduler can apply its flush-on-update policy.

◆ lwm2m_send_sched_init()

int lwm2m_send_sched_init ( void )

Register the send scheduler LwM2M objects and initialise state.

This installs the Scheduler Control (10523) and Sampling Rules (10524) objects and prepares bookkeeping needed by the cache filter helpers.

Returns
0 on success, or a negative errno if object registration fails.