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 {
30 
36 #define SHARED_APP_CONFIG_ALL_TYPE_FILTER 0xFFFF
37 
43 #define SHARED_APP_CONFIG_INCOMPATIBLE_FILTER 0xFFFE
44 
58 typedef void
60  uint8_t length,
61  uint8_t * value_p);
62 
64 typedef struct
65 {
68  uint16_t type;
80 
91 
104  uint16_t * filter_id);
105 
115 
127 
138 
139 #endif //_SHARED_APPCONFIG_H_
Shared_Appconfig_init
shared_app_config_res_e Shared_Appconfig_init(void)
Initialize the shared app config 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:73
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_APP_CONFIG_RES_INVALID_ROLE
@ SHARED_APP_CONFIG_RES_INVALID_ROLE
Definition: shared_appconfig.h:28
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:59
Shared_Appconfig_notifyAppConfig
shared_app_config_res_e Shared_Appconfig_notifyAppConfig(const uint8_t *bytes)
Notify other modules of a new app config received.
shared_app_config_filter_t
Structure holding all parameters for app config type filtering.
Definition: shared_appconfig.h:64
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:78
shared_app_config_filter_t::type
uint16_t type
Definition: shared_appconfig.h:68
Shared_Appconfig_setAppConfig
shared_app_config_res_e Shared_Appconfig_setAppConfig(const uint8_t *bytes)
Set a new app config.
api.h