Loading...
Searching...
No Matches
on_off_switch.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 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
80
81#ifndef OBJECTS_ON_OFF_SWITCH_H
82#define OBJECTS_ON_OFF_SWITCH_H
83
84#ifdef __cplusplus
85extern "C" {
86#endif
87
88#include "liblwm2m.h"
89
98#ifndef CONFIG_LWM2M_ON_OFF_SWITCH_INSTANCES_MAX
99#define CONFIG_LWM2M_ON_OFF_SWITCH_INSTANCES_MAX (3U)
100#endif
101
105#ifndef CONFIG_LWM2M_ON_OFF_SWITCH_APP_TYPE_MAX_SIZE
106#define CONFIG_LWM2M_ON_OFF_SWITCH_APP_TYPE_MAX_SIZE (16U)
107#endif
109
113#define LWM2M_ON_OFF_SWITCH_OBJECT_ID 3342
114
122#define LWM2M_ON_OFF_SWITCH_DIGITAL_INPUT_STATE_ID 5500
126#define LWM2M_ON_OFF_SWITCH_DIGITAL_INPUT_COUNTER_ID 5501
130#define LWM2M_ON_OFF_SWITCH_ON_TIME_ID 5852
134#define LWM2M_ON_OFF_SWITCH_OFF_TIME_ID 5854
138#define LWM2M_ON_OFF_SWITCH_APP_TYPE_ID 5750
140
148
157
171 int32_t instance_id);
172
182int lwm2m_object_on_off_switch_update_status(uint16_t instance_id, bool status);
183
196int lwm2m_object_on_off_switch_update_app_type(uint16_t instance_id, const char *app_type,
197 size_t len);
198
199#ifdef __cplusplus
200}
201#endif
202
203#endif /* OBJECTS_ON_OFF_SWITCH_H */
int lwm2m_object_on_off_switch_update_app_type(uint16_t instance_id, const char *app_type, size_t len)
Update the application type of a on/off switch instance.
struct lwm2m_obj_on_off_switch_args lwm2m_obj_on_off_switch_args_t
Arguments for the creation of an on/off switch object instance.
lwm2m_object_t * lwm2m_object_on_off_switch_init(lwm2m_client_data_t *client_data)
Initialize the on/off switch object.
int lwm2m_object_on_off_switch_instance_create(const lwm2m_obj_on_off_switch_args_t *args, int32_t instance_id)
Create a new on/off switch instance and add it to the object list.
int lwm2m_object_on_off_switch_update_status(uint16_t instance_id, bool status)
Update the status of a on/off switch instance.
LwM2M client descriptor.
Arguments for the creation of an on/off switch object instance.
const char * app_type
Array of chars with the app type.
size_t app_type_len
Length of app_type.