Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
lwm2mclient.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * Copyright (c) 2014 Bosch Software Innovations GmbH, Germany and others
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v2.0
6  * and Eclipse Distribution License v1.0 which accompany this distribution.
7  *
8  * The Eclipse Public License is available at
9  * http://www.eclipse.org/legal/epl-v20.html
10  * The Eclipse Distribution License is available at
11  * http://www.eclipse.org/org/documents/edl-v10.php.
12  *
13  * Contributors:
14  * Bosch Software Innovations GmbH - Please refer to git log
15  * Ciaran Woodward, Cascoda Ltd.
16  *
17  *******************************************************************************/
18 
19 #ifndef LWM2MCLIENT_H_
20 #define LWM2MCLIENT_H_
21 
22 #include "openthread/instance.h"
23 #include "liblwm2m.h"
24 
33 otInstance *get_ot_instance(void);
34 
35 /*
36  * object_device.c
37  */
38 lwm2m_object_t *get_object_device(void);
39 void free_object_device(lwm2m_object_t *objectP);
40 uint8_t device_change(lwm2m_data_t *dataArray, lwm2m_object_t *objectP);
41 void display_device_object(lwm2m_object_t *objectP);
42 /*
43  * object_firmware.c
44  */
45 lwm2m_object_t *get_object_firmware(void);
46 void free_object_firmware(lwm2m_object_t *objectP);
47 void display_firmware_object(lwm2m_object_t *objectP);
48 /*
49  * object_location.c
50  */
51 lwm2m_object_t *get_object_location(void);
52 void free_object_location(lwm2m_object_t *object);
53 void display_location_object(lwm2m_object_t *objectP);
54 /*
55  * object_test.c
56  */
57 #define TEST_OBJECT_ID 31024
58 lwm2m_object_t *get_test_object(void);
59 void free_test_object(lwm2m_object_t *object);
60 void display_test_object(lwm2m_object_t *objectP);
61 /*
62  * object_server.c
63  */
64 lwm2m_object_t *get_server_object(int serverId, const char *binding, int lifetime, bool storing);
65 void clean_server_object(lwm2m_object_t *object);
66 void display_server_object(lwm2m_object_t *objectP);
67 void copy_server_object(lwm2m_object_t *objectDest, lwm2m_object_t *objectSrc);
68 
69 /*
70  * object_connectivity_moni.c
71  */
72 lwm2m_object_t *get_object_conn_m(void);
73 void free_object_conn_m(lwm2m_object_t *objectP);
74 
75 /*
76  * object_connectivity_stat.c
77  */
78 extern lwm2m_object_t *get_object_conn_s(void);
79 void free_object_conn_s(lwm2m_object_t *objectP);
80 extern void conn_s_updateTxStatistic(lwm2m_object_t *objectP, uint16_t txDataByte);
81 extern void conn_s_updateRxStatistic(lwm2m_object_t *objectP, uint16_t rxDataByte);
82 
83 /*
84  * object_access_control.c
85  */
86 lwm2m_object_t *acc_ctrl_create_object(void);
87 void acl_ctrl_free_object(lwm2m_object_t *objectP);
88 bool acc_ctrl_obj_add_inst(lwm2m_object_t *accCtrlObjP,
89  uint16_t instId,
90  uint16_t acObjectId,
91  uint16_t acObjInstId,
92  uint16_t acOwner);
93 bool acc_ctrl_oi_add_ac_val(lwm2m_object_t *accCtrlObjP, uint16_t instId, uint16_t aclResId, uint16_t acValue);
94 /*
95  * lwm2mclient.c
96  */
97 void handle_value_changed(lwm2m_context_t *lwm2mH, lwm2m_uri_t *uri, const char *value, size_t valueLength);
98 
99 #endif /* LWM2MCLIENT_H_ */
void free_object_conn_s(lwm2m_object_t *objectP)
Definition: object_connectivity_stat.c:258
lwm2m_object_t * acc_ctrl_create_object(void)
Definition: object_access_control.c:524
lwm2m_object_t * get_object_location(void)
lwm2m_object_t * get_object_device(void)
Definition: object_device.c:663
void free_object_firmware(lwm2m_object_t *objectP)
Definition: object_firmware.c:382
void conn_s_updateTxStatistic(lwm2m_object_t *objectP, uint16_t txDataByte)
Definition: object_connectivity_stat.c:175
void free_test_object(lwm2m_object_t *object)
Definition: object_test.c:407
void display_location_object(lwm2m_object_t *objectP)
void display_server_object(lwm2m_object_t *objectP)
Definition: object_server.c:1041
void acl_ctrl_free_object(lwm2m_object_t *objectP)
Definition: object_access_control.c:551
otInstance * get_ot_instance(void)
Get the global ot instance.
Definition: lwm2mclient.c:111
lwm2m_object_t * get_test_object(void)
Definition: object_test.c:361
void display_test_object(lwm2m_object_t *objectP)
Definition: object_test.c:345
lwm2m_object_t * get_server_object(int serverId, const char *binding, int lifetime, bool storing)
Definition: object_server.c:1083
void clean_server_object(lwm2m_object_t *object)
Definition: object_server.c:1134
bool acc_ctrl_obj_add_inst(lwm2m_object_t *accCtrlObjP, uint16_t instId, uint16_t acObjectId, uint16_t acObjInstId, uint16_t acOwner)
Definition: object_access_control.c:566
void display_device_object(lwm2m_object_t *objectP)
Definition: object_device.c:653
lwm2m_object_t * get_object_conn_s(void)
Definition: object_connectivity_stat.c:201
void handle_value_changed(lwm2m_context_t *lwm2mH, lwm2m_uri_t *uri, const char *value, size_t valueLength)
Definition: lwm2mclient.c:122
lwm2m_object_t * get_object_conn_m(void)
Definition: object_connectivity_moni.c:260
void free_object_device(lwm2m_object_t *objectP)
Definition: object_device.c:732
void display_firmware_object(lwm2m_object_t *objectP)
Definition: object_firmware.c:297
void conn_s_updateRxStatistic(lwm2m_object_t *objectP, uint16_t rxDataByte)
Definition: object_connectivity_stat.c:188
uint8_t device_change(lwm2m_data_t *dataArray, lwm2m_object_t *objectP)
Definition: object_device.c:748
void free_object_location(lwm2m_object_t *object)
lwm2m_object_t * get_object_firmware(void)
Definition: object_firmware.c:307
bool acc_ctrl_oi_add_ac_val(lwm2m_object_t *accCtrlObjP, uint16_t instId, uint16_t aclResId, uint16_t acValue)
Definition: object_access_control.c:604
void copy_server_object(lwm2m_object_t *objectDest, lwm2m_object_t *objectSrc)
Definition: object_server.c:1011
void free_object_conn_m(lwm2m_object_t *objectP)
Definition: object_connectivity_moni.c:305