Loading...
Searching...
No Matches
lwm2m_client.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 HAW Hamburg
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
20#ifndef LWM2M_CLIENT_H
21#define LWM2M_CLIENT_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <ctype.h>
28#include <errno.h>
29#include <stdio.h>
30#include <stdlib.h>
31#include <string.h>
32#include <sys/types.h>
33#include <unistd.h>
34#include <sys/time.h>
35
36#include "periph/pm.h"
37#include "net/sock/udp.h"
38
39#include "lwm2m_client_config.h"
40#include "liblwm2m.h"
41
50
61
65#define LWM2M_CLIENT_RCV_BUFFER_SIZE (200)
66
71#define LWM2M_CLIENT_REBOOT_TIME (5)
72
79#define LWM2M_CLIENT_MIN_REFRESH_TIME (1)
80
90lwm2m_context_t *lwm2m_client_run(lwm2m_client_data_t *client_data,
91 lwm2m_object_t *obj_list[],
92 uint16_t obj_numof);
93
103
111static inline lwm2m_context_t *lwm2m_client_get_ctx(
112 lwm2m_client_data_t *client_data)
113{
114 return client_data->lwm2m_ctx;
115}
116
117#ifdef __cplusplus
118}
119#endif
120
121#endif /* LWM2M_CLIENT_H */
int16_t kernel_pid_t
Unique process identifier.
Definition sched.h:139
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_init(lwm2m_client_data_t *client_data)
Initializes a LwM2M client.
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.
struct lwm2m_client_connection lwm2m_client_connection_t
Connection to server descriptor.
LwM2M client configurations.
Power management interface.
UDP sock definitions.
stdio wrapper to extend the C libs stdio
Common IP-based transport layer end point.
Definition sock.h:215
Connection to server descriptor.
time_t last_send
last sent packet to the server
sock_udp_ep_t remote
remote endpoint
struct lwm2m_client_connection * next
pointer to the next connection
LwM2M client descriptor.
lwm2m_client_connection_t * conn_list
LwM2M connections list.
kernel_pid_t pid
PID of the client thread.
sock_udp_t sock
UDP server sock.
sock_udp_ep_t local_ep
Local endpoint.
lwm2m_context_t * lwm2m_ctx
LwM2M context.
UDP sock type.
Definition sock_types.h:128