MeshX 0.3
This repository provides an implementation for Bluetooth Low Energy (BLE) Mesh network nodes. The project allows you to create BLE mesh nodes that can communicate with each other, enabling the development of smart home solutions or other IoT-based applications.
Loading...
Searching...
No Matches
meshx_control_task.h
Go to the documentation of this file.
1
12
13#ifndef __MESHX_CONTROL_TASK__
14#define __MESHX_CONTROL_TASK__
15
16#include "stdio.h"
17#include "string.h"
18#include "meshx_common.h"
22
26#define CONFIG_CONTROL_TASK_NAME "meshx_control_task"
27
31#ifndef CONFIG_CONTROL_TASK_PRIO
32#define CONFIG_CONTROL_TASK_PRIO configTIMER_TASK_PRIORITY + 1
33#endif
34
38#ifndef CONFIG_CONTROL_TASK_STACK_SIZE
39#define CONFIG_CONTROL_TASK_STACK_SIZE 4096
40#endif
41
45#ifndef CONFIG_CONTROL_TASK_QUEUE_LEN
46#define CONFIG_CONTROL_TASK_QUEUE_LEN 10
47#endif
48
65
69typedef uint32_t control_task_msg_evt_t;
70
80
90
106
120
138
154
172
182
192
202
220
232
246meshx_err_t control_task_msg_publish(control_task_msg_code_t msg_code, control_task_msg_evt_t msg_evt, const void *msg_evt_params, size_t sizeof_msg_evt_params);
247
248#endif /* __MESHX_CONTROL_TASK__ */
#define MESHX_BIT(nr)
Common application definitions and includes for BLE Mesh Node.
struct dev_struct dev_struct_t
Structure representing the device composition and elements.
CONTROL_TASK_MSG_EVT_SYSTEM_FRESH_BOOT
CONTROL_TASK_MSG_EVT_IDENTIFY_START
enum __packed control_task_msg_evt_config control_task_msg_evt_config_t
Enumeration for control task config srv events.
CONTROL_TASK_MSG_EVT_TO_BLE_SET_CTL_SRV
CONTROL_TASK_MSG_EVT_TO_BLE_SET_ON_OFF_SRV
CONTROL_TASK_MSG_EVT_PROVISION_STOP
enum __packed control_task_msg_evt_to_ble control_task_msg_evt_to_ble_t
Enumeration for control task message events to BLE.
CONTROL_TASK_MSG_EVT_SYSTEM_TIMER_FIRE
enum __packed control_task_msg_evt_config
Enumeration for control task config srv events.
CONTROL_TASK_MSG_EVT_SYSTEM_TIMER_PERIOD
CONTROL_TASK_MSG_EVT_SYSTEM_MAX
CONTROL_TASK_MSG_EVT_EL_STATE_CH_MAX
CONTROL_TASK_MSG_EVT_TO_BLE_SET_CTL
enum control_task_msg_code control_task_msg_code_t
Enumeration for control task message codes.
enum __packed control_task_msg_evt_el_state_ch control_task_msg_evt_el_state_ch_t
Enumeration for control task message events to HAL.
uint32_t control_task_msg_evt_t
Type definition for control task message event.
enum __packed control_task_msg_evt_system control_task_msg_evt_system_t
Enumeration for control task system events.
CONTROL_TASK_MSG_EVT_NET_KEY_DEL
CONTROL_TASK_MSG_EVT_APP_KEY_DEL
CONTROL_TASK_MSG_EVT_PROXY_CONNECT
CONTROL_TASK_MSG_EVT_SUB_DEL
meshx_err_t create_control_task(dev_struct_t *pdev)
Create the control task.
enum __packed control_task_msg_evt_el_state_ch
Enumeration for control task message events to HAL.
meshx_err_t(* control_task_msg_handle_t)(dev_struct_t *pdev, control_task_msg_evt_t evt, void *params)
Function pointer type for control task message handler.
struct control_task_evt_cb_reg control_task_evt_cb_reg_t
Structure for control task event callback registration.
CONTROL_TASK_MSG_EVT_EL_STATE_CH_SET_ON_OFF
CONTROL_TASK_MSG_EVT_SYSTEM_RESTART
meshx_err_t control_task_msg_unsubscribe(control_task_msg_code_t msg_code, control_task_msg_evt_t evt_bmap, control_task_msg_handle_t callback)
Deregister a callback for a specific message code and event bitmap.
CONTROL_TASK_MSG_EVT_TXCM_MSG_TIMEOUT
CONTROL_TASK_MSG_EVT_APP_KEY_UNBIND
control_task_msg_code
Enumeration for control task message codes.
@ CONTROL_TASK_MSG_CODE_FRM_BLE
@ CONTROL_TASK_MSG_CODE_TXCM
@ CONTROL_TASK_MSG_CODE_SYSTEM
@ CONTROL_TASK_MSG_CODE_CONFIG
@ CONTROL_TASK_MSG_CODE_MAX
@ CONTROL_TASK_MSG_CODE_TO_APP
@ CONTROL_TASK_MSG_CODE_TO_MESHX
@ CONTROL_TASK_MSG_CODE_EL_STATE_CH
@ CONTROL_TASK_MSG_CODE_PROVISION
@ CONTROL_TASK_MSG_CODE_TO_BLE
enum __packed control_task_msg_evt_to_ble
Enumeration for control task message events to BLE.
CONTROL_TASK_MSG_EVT_APP_KEY_ADD
struct control_task_msg control_task_msg_t
Structure for control task message.
enum __packed control_task_msg_evt_system
Enumeration for control task system events.
CONTROL_TASK_MSG_EVT_MAX
CONTROL_TASK_MSG_EVT_IDENTIFY_STOP
enum __packed control_task_msg_evt_to_app_meshx control_task_msg_evt_to_app_meshx_t
Enumeration for control task message events to application.
CONTROL_TASK_MSG_EVT_NODE_RESET
CONTROL_TASK_MSG_EVT_EL_STATE_CH_SET_CTL
CONTROL_TASK_MSG_EVT_SYSTEM_TIMER_DISARM
CONTROL_TASK_MSG_EVT_PUB_ADD
enum __packed control_task_msg_evt_txcm control_task_msg_evt_txcm_t
Enumeration for control task TXCM events.
CONTROL_TASK_MSG_EVT_EN_NODE_PROV
CONTROL_TASK_MSG_EVT_APP_KEY_BIND
CONTROL_TASK_MSG_EVT_TO_BLE_SET_ON_OFF
CONTROL_TASK_MSG_EVT_SUB_ADD
CONTROL_TASK_MSG_EVT_SYSTEM_TIMER_ARM
meshx_err_t control_task_msg_publish(control_task_msg_code_t msg_code, control_task_msg_evt_t msg_evt, const void *msg_evt_params, size_t sizeof_msg_evt_params)
Publish a control task message.
enum __packed control_task_msg_evt_to_app_meshx
Enumeration for control task message events to application.
CONTROL_TASK_MSG_EVT_SYSTEM_TIMER_REARM
CONTROL_TASK_MSG_EVT_CTRL
CONTROL_TASK_MSG_EVT_PROVISION_ALL
CONTROL_TASK_MSG_EVT_DATA
enum __packed control_task_msg_evt_provision
Enumeration for control task provisioning events.
CONTROL_TASK_MSG_EVT_PUB_DEL
enum __packed control_task_msg_evt_provision control_task_msg_evt_provision_t
Enumeration for control task provisioning events.
CONTROL_TASK_MSG_EVT_CONFIG_ALL
CONTROL_TASK_MSG_EVT_PROXY_DISCONN
CONTROL_TASK_MSG_EVT_NET_KEY_ADD
meshx_err_t control_task_msg_subscribe(control_task_msg_code_t msg_code, control_task_msg_evt_t evt_bmap, control_task_msg_handle_t callback)
Subscribe to a control task message.
enum __packed control_task_msg_evt_txcm
Enumeration for control task TXCM events.
CONTROL_TASK_MSG_EVT_TO_BLE_SET_LIGHTNESS
meshx_err_t
MeshX Error Codes.
Definition meshx_err.h:39
MeshX Message Queue Interface.
Utility functions for RTOS operations in the MeshX framework.
MeshX Task Interface.
Structure for control task event callback registration.
control_task_msg_handle_t cb
struct control_task_evt_cb_reg * next
Structure for control task message.
control_task_msg_evt_t msg_evt
control_task_msg_code_t msg_code