KNX IoT
KNX IoT Point API stack implementation
oc_main.h
Go to the documentation of this file.
1 /*
2 // Copyright (c) 2019 Intel Corporation
3 // Copyright (c) 2022 Cascoda Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 */
21 #ifndef OC_MAIN_H
22 #define OC_MAIN_H
23 
24 #include "oc_api.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 typedef struct oc_factory_presets_t
35 {
37  void *data;
39 
46 
51 typedef struct oc_reset_t
52 {
54  void *data;
56 
63 
68 typedef struct oc_restart_t
69 {
71  void *data;
73 
80 
85 typedef struct oc_hostname_t
86 {
88  void *data;
90 
97 
102 typedef struct oc_programming_mode_t
103 {
105  void *data;
107 
115 
120 typedef struct oc_loadstate_t
121 {
123  void *data;
125 
132 
140 
152 void oc_set_drop_commands(size_t device, bool drop);
153 
161 bool oc_drop_command(size_t device);
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 #endif /* OC_MAIN_H */
Main API of the stack for client and server.
void(* oc_programming_mode_cb_t)(size_t device, bool programming_mode, void *data)
Set the programming mode callback NOTE: It is the responsibility of this callback (if registered),...
Definition: oc_api.h:427
void(* oc_restart_cb_t)(size_t device, void *data)
Callback invoked by the stack to invoke a restart.
Definition: oc_api.h:367
void(* oc_hostname_cb_t)(size_t device, oc_string_t host_name, void *data)
Callback invoked by the stack to set the host name.
Definition: oc_api.h:397
void(* oc_reset_cb_t)(size_t device, int reset_value, void *data)
Callback invoked by the stack initialization to perform any application reset.
Definition: oc_api.h:343
void(* oc_factory_presets_cb_t)(size_t device, void *data)
Callback invoked by the stack initialization to perform any "factory settings", e....
Definition: oc_api.h:317
void(* oc_lsm_change_cb_t)(size_t device, oc_lsm_state_t lsm_state, void *data)
Callback invoked by the stack to inform the change of the lsm.
Definition: oc_knx.h:164
oc_programming_mode_t * oc_get_programming_mode_cb(void)
retrieve the programming mode info, e.g.
struct oc_hostname_t oc_hostname_t
The hostname info.
struct oc_restart_t oc_restart_t
The restart info.
oc_factory_presets_t * oc_get_factory_presets_cb(void)
retrieve the factory reset info, e.g.
bool oc_drop_command(size_t device)
Get status of dropping of logical device.
oc_hostname_t * oc_get_hostname_cb(void)
retrieve the hostname info, e.g.
struct oc_programming_mode_t oc_programming_mode_t
The programming mode info.
struct oc_loadstate_t oc_loadstate_t
The lsm change info.
oc_loadstate_t * oc_get_lsm_change_cb(void)
retrieve the lsm change info, e.g.
bool oc_main_initialized(void)
is main initialized
struct oc_factory_presets_t oc_factory_presets_t
The factory presets info.
oc_reset_t * oc_get_reset_cb(void)
retrieve the reset info, e.g.
struct oc_reset_t oc_reset_t
The reset info.
oc_restart_t * oc_get_restart_cb(void)
retrieve the restart info, e.g.
void oc_set_drop_commands(size_t device, bool drop)
Set acceptance of new commands(GET/PUT/POST/DELETE) for logical device.
The factory presets info.
Definition: oc_main.h:35
void * data
the callback user data
Definition: oc_main.h:37
oc_factory_presets_cb_t cb
the callback
Definition: oc_main.h:36
The hostname info.
Definition: oc_main.h:86
void * data
the callback user data
Definition: oc_main.h:88
oc_hostname_cb_t cb
the callback
Definition: oc_main.h:87
The lsm change info.
Definition: oc_main.h:121
void * data
the callback user data
Definition: oc_main.h:123
oc_lsm_change_cb_t cb
the callback
Definition: oc_main.h:122
The programming mode info.
Definition: oc_main.h:103
oc_programming_mode_cb_t cb
the callback
Definition: oc_main.h:104
void * data
the callback user data
Definition: oc_main.h:105
The reset info.
Definition: oc_main.h:52
void * data
the callback user data
Definition: oc_main.h:54
oc_reset_cb_t cb
the callback
Definition: oc_main.h:53
The restart info.
Definition: oc_main.h:69
void * data
the callback user data
Definition: oc_main.h:71
oc_restart_cb_t cb
the callback
Definition: oc_main.h:70