Loading...
Searching...
No Matches

Wakaama adaption to RIOT for implementing a LwM2M client. More...

Detailed Description

Wakaama adaption to RIOT for implementing a LwM2M client.

Files

file  lwm2m_client.h
 Definitions and public API for a LwM2M client using Wakaama.
 
file  lwm2m_client_connection.h
 Public API and definitions of the connection handle for LwM2M client implementation using Wakaama.
 
file  lwm2m_client_objects.h
 Public API and definitions for the helper functions to interact with basic objects from a LwM2M client.
 

Data Structures

struct  lwm2m_client_connection
 Connection to server descriptor. More...
 
struct  lwm2m_client_data_t
 LwM2M client descriptor. More...
 

Macros

#define LWM2M_CLIENT_RCV_BUFFER_SIZE   (200)
 Size of the buffer for the UDP packet reception.
 
#define LWM2M_CLIENT_REBOOT_TIME   (5)
 Time in seconds to wait until reboot after a server request.
 
#define LWM2M_CLIENT_MIN_REFRESH_TIME   (1)
 Time in seconds to wait until LwM2M is refreshed.
 

Typedefs

typedef struct lwm2m_client_connection lwm2m_client_connection_t
 Connection to server descriptor.
 

Enumerations

enum  lwm2m_client_connection_type_t { LWM2M_CLIENT_CONN_UDP , LWM2M_CLIENT_CONN_DTLS }
 Type of connection to the LwM2M server. More...
 

Functions

lwm2m_context_t * lwm2m_client_run (lwm2m_client_data_t *client_data, lwm2m_object_t *obj_list[], uint16_t obj_numof)
 Starts a LwM2M client.
 
void lwm2m_client_init (lwm2m_client_data_t *client_data)
 Initializes a LwM2M client.
 
static lwm2m_context_t * lwm2m_client_get_ctx (lwm2m_client_data_t *client_data)
 Returns the LwM2M context of a LwM2M client.
 
void lwm2m_client_refresh_dtls_credentials (void)
 Refreshes the client available credentials using the currently registered security objects.
 
void lwm2m_client_add_credential (credman_tag_t tag)
 Adds a credential tag to be used with the LwM2M DTLS sock.
 
void lwm2m_client_remove_credential (credman_tag_t tag)
 Removes a credential tag from the available to use with the LwM2M DTLS sock.
 

Macro Definition Documentation

◆ LWM2M_CLIENT_MIN_REFRESH_TIME

#define LWM2M_CLIENT_MIN_REFRESH_TIME   (1)

Time in seconds to wait until LwM2M is refreshed.

Note
This time is used as the timeout for receiving UDP packets and will be the maximum time to wait between calls to wakaama core.

Definition at line 100 of file lwm2m_client.h.

◆ LWM2M_CLIENT_RCV_BUFFER_SIZE

#define LWM2M_CLIENT_RCV_BUFFER_SIZE   (200)

Size of the buffer for the UDP packet reception.

Definition at line 86 of file lwm2m_client.h.

◆ LWM2M_CLIENT_REBOOT_TIME

#define LWM2M_CLIENT_REBOOT_TIME   (5)

Time in seconds to wait until reboot after a server request.

Definition at line 92 of file lwm2m_client.h.

Enumeration Type Documentation

◆ lwm2m_client_connection_type_t

Type of connection to the LwM2M server.

Enumerator
LWM2M_CLIENT_CONN_UDP 

UDP.

LWM2M_CLIENT_CONN_DTLS 

DTLS over UDP.

Definition at line 49 of file lwm2m_client.h.

Function Documentation

◆ lwm2m_client_add_credential()

void lwm2m_client_add_credential ( credman_tag_t  tag)

Adds a credential tag to be used with the LwM2M DTLS sock.

If the tag is already available it will not be added again.

Note
Only available when using the module wakaama_client_dtls.
Parameters
[in]tagTag to add.

◆ lwm2m_client_get_ctx()

static lwm2m_context_t * lwm2m_client_get_ctx ( lwm2m_client_data_t client_data)
inlinestatic

Returns the LwM2M context of a LwM2M client.

Parameters
[in]client_datapointer to the LwM2M client descriptor
Returns
Pointer to the LwM2M context

Definition at line 132 of file lwm2m_client.h.

◆ lwm2m_client_init()

void lwm2m_client_init ( lwm2m_client_data_t client_data)

Initializes a LwM2M client.

Note
This functions initializes the memory allocation and is needed before calling any object creation (i.e. any call to lwm2m_malloc).
Parameters
[in]client_dataPointer to a LwM2M client data descriptor

◆ lwm2m_client_refresh_dtls_credentials()

void lwm2m_client_refresh_dtls_credentials ( void  )

Refreshes the client available credentials using the currently registered security objects.

Note
Only available when using the module wakaama_client_dtls.

◆ lwm2m_client_remove_credential()

void lwm2m_client_remove_credential ( credman_tag_t  tag)

Removes a credential tag from the available to use with the LwM2M DTLS sock.

Note
Only available when using the module wakaama_client_dtls.
Parameters
[in]tagTag to remove.

◆ lwm2m_client_run()

lwm2m_context_t * lwm2m_client_run ( lwm2m_client_data_t client_data,
lwm2m_object_t *  obj_list[],
uint16_t  obj_numof 
)

Starts a LwM2M client.

Parameters
[in,out]client_dataPointer to a LwM2M client data descriptor
[in]obj_listList of LwM2M objects to be registered
[in]obj_numofNumber of objects in obj_list
Returns
Context of the LwM2M client