Wirepas SDK
shared_appconfig.h
Go to the documentation of this file.
1 /* Copyright 2020 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 #ifndef _SHARED_APPCONFIG_H_
7 #define _SHARED_APPCONFIG_H_
8 
9 #include <stdint.h>
10 #include "api.h"
11 
15 typedef enum
16 {
28 
32 #define SHARED_APP_CONFIG_ALL_TYPE_FILTER 0xFFFF
33 
39 #define SHARED_APP_CONFIG_INCOMPATIBLE_FILTER 0xFFFE
40 
54 typedef void
56  uint8_t length,
57  uint8_t * value_p);
58 
60 typedef struct
61 {
64  uint16_t type;
76 
86 
99  uint16_t * filter_id);
100 
110 
111 #endif //_SHARED_APPCONFIG_H_
Shared_Appconfig_init
shared_app_config_res_e Shared_Appconfig_init(void)
Initialize the shared app config library library.
SHARED_APP_CONFIG_RES_NO_FILTER
@ SHARED_APP_CONFIG_RES_NO_FILTER
Definition: shared_appconfig.h:20
SHARED_APP_CONFIG_RES_OK
@ SHARED_APP_CONFIG_RES_OK
Definition: shared_appconfig.h:18
shared_app_config_filter_t::cb
shared_app_config_received_cb_f cb
Definition: shared_appconfig.h:69
SHARED_APP_CONFIG_RES_INVALID_PARAM
@ SHARED_APP_CONFIG_RES_INVALID_PARAM
Definition: shared_appconfig.h:22
Shared_Appconfig_removeFilter
shared_app_config_res_e Shared_Appconfig_removeFilter(uint16_t filter_id)
Remove a received packet item from the list. Removed item fields are all set to 0.
SHARED_APP_CONFIG_RES_INVALID_FILTER
@ SHARED_APP_CONFIG_RES_INVALID_FILTER
Definition: shared_appconfig.h:24
shared_app_config_res_e
shared_app_config_res_e
List of return code.
Definition: shared_appconfig.h:15
Shared_Appconfig_addFilter
shared_app_config_res_e Shared_Appconfig_addFilter(shared_app_config_filter_t *filter, uint16_t *filter_id)
Add a new app config type filter to the list. If the item is already in the list it is only updated.
shared_app_config_received_cb_f
void(* shared_app_config_received_cb_f)(uint16_t type, uint8_t length, uint8_t *value_p)
The app config type reception callback.
Definition: shared_appconfig.h:55
shared_app_config_filter_t
Structure holding all parameters for app config type filtering.
Definition: shared_appconfig.h:60
SHARED_APP_CONFIG_RES_UNINITIALIZED
@ SHARED_APP_CONFIG_RES_UNINITIALIZED
Definition: shared_appconfig.h:26
shared_app_config_filter_t::call_cb_always
bool call_cb_always
Definition: shared_appconfig.h:74
shared_app_config_filter_t::type
uint16_t type
Definition: shared_appconfig.h:64
api.h