19#define ROOT_ELEMENT_IDX 0
25#define FRESHBOOT_TIMEOUT_MS 1500
35"*********************************************************************************************************************\n"
36"* MMMMMMMM MMMMMMMM hhhhhhh XXXXXXX XXXXXXX *\n"
37"* M:::::::M M:::::::M h:::::h X:::::X X:::::X *\n"
38"* M::::::::M M::::::::M h:::::h X:::::X X:::::X *\n"
39"* M:::::::::M M:::::::::M h:::::h X::::::X X:::::X *\n"
40"* M::::::::::M M::::::::::M eeeeeeeeeeee ssssssssss h:::: hhhhhh XX:::::X X:::::XX *\n"
41"* M:::::::::::M M:::::::::::M ee::::::::::::ee ss::::::::::s h::::::::::hhh X:::::X X:::::X *\n"
42"* M:::::::M::::M M::::M:::::::M e::::::eeeee:::::eess:::::::::::::s h::::::::::::::hh X:::::X:::::X *\n"
43"* M::::::M M::::M M::::M M::::::Me::::::e e:::::es::::::ssss:::::sh:::::::hhh::::::h X:::::::::X *\n"
44"* M::::::M M::::M::::M M::::::Me:::::::eeeee::::::e s:::::s ssssss h::::::h h::::::h X:::::::::X *\n"
45"* M::::::M M:::::::M M::::::Me:::::::::::::::::e s::::::s h:::::h h:::::h X:::::X:::::X *\n"
46"* M::::::M M:::::M M::::::Me::::::eeeeeeeeeee s::::::s h:::::h h:::::h X:::::X X:::::X *\n"
47"* M::::::M MMMMM M::::::Me:::::::e ssssss s:::::s h:::::h h:::::h XXX:::::X X:::::XXX *\n"
48"* M::::::M M::::::Me::::::::e s:::::ssss::::::sh:::::h h:::::h X::::::X X::::::X *\n"
49"* M::::::M M::::::M e::::::::eeeeeeee s::::::::::::::s h:::::h h:::::h X:::::X X:::::X *\n"
50"* M::::::M M::::::M ee:::::::::::::e s:::::::::::ss h:::::h h:::::h X:::::X X:::::X *\n"
51"* MMMMMMMM MMMMMMMM eeeeeeeeeeeeee sssssssssss hhhhhhh hhhhhhh XXXXXXX XXXXXXX *\n"
52"*********************************************************************************************************************\n"
158#if CONFIG_TXCM_ENABLE
281#if CONFIG_ENABLE_UNIT_TEST
static MESHX_MODEL * meshx_ven_root_model_arr
size_t get_root_sig_models_count(void)
Returns the count of the root models.
static MESHX_MODEL * meshx_sig_root_model_arr
size_t get_root_ven_models_count(void)
Returns the count of the vendor root models.
static meshx_config_t g_config
static const char meshX_banner[]
#define ROOT_ELEMENT_IDX
Defines the index for the root element.
meshx_ptr_t get_root_ven_models(void)
Returns the root models for BLE Mesh elements.
static meshx_err_t meshx_element_init(dev_struct_t *p_dev, meshx_config_t const *config)
Initializes BLE Mesh elements.
meshx_prov_params_t g_prov_cfg
size_t get_root_sig_models_count(void)
Returns the count of the root models.
static meshx_err_t meshx_dev_restore(dev_struct_t *pdev, meshx_config_t const *config)
Restore the device state from the NVS.
static meshx_err_t meshx_tasks_init(dev_struct_t *pdev)
Initializes application tasks.
meshx_err_t meshx_init(meshx_config_t const *config)
MeshX initialisation function.
static meshx_err_t meshx_ble_mesh_init(meshx_config_t *config)
Initializes the BLE Mesh subsystem.
meshx_ptr_t get_root_sig_models(void)
Returns the root models for BLE Mesh elements.
meshx_err_t meshx_create_element_composition(dev_struct_t *p_dev, meshx_config_t const *config)
Creates the BLE Mesh element composition.
#define FRESHBOOT_TIMEOUT_MS
Defines the timeout duration in milliseconds for a fresh boot.
static dev_struct_t g_dev
This file contains the headers for meshx.c.
struct meshx_config meshx_config_t
#define MESHX_ERR_PRINT_RET(_e_str, _err)
Print and return error message if an error occurs.
meshx_err_t meshx_app_reg_element_callback(meshx_app_data_cb_t cb)
Registers the BLE Mesh application callback.
meshx_err_t meshx_app_reg_system_events_callback(meshx_app_ctrl_cb_t cb)
Registers the BLE Mesh application control callback.
meshx_err_t meshx_plat_add_element_to_composition(uint16_t index, meshx_ptr_t p_element_list, meshx_ptr_t p_sig_models, meshx_ptr_t p_ven_models, uint8_t sig_cnt, uint8_t ven_cnt)
Adds an element to the BLE Mesh composition.
meshx_err_t meshx_create_plat_composition(meshx_ptr_t *p_comp)
Creates a platform-specific BLE Mesh composition object.
meshx_err_t meshx_platform_bt_init(meshx_uuid_addr_t uuid)
Initializes the Bluetooth subsystem of the MeshX platform.
meshx_err_t meshx_plat_composition_init(meshx_ptr_t p_composition, meshx_ptr_t p_elements, uint16_t cid, uint16_t pid, uint16_t element_idx)
Initializes a platform-specific BLE Mesh composition.
struct meshx_prov_params meshx_prov_params_t
Structure to hold provisioning parameters.
meshx_err_t meshx_plat_ble_mesh_init(const meshx_prov_params_t *prov_cfg, meshx_ptr_t comp)
Initializes the BLE Mesh stack with the given provisioning parameters.
struct dev_struct dev_struct_t
Structure representing the device composition and elements.
struct meshx_app_store meshx_app_store_t
Structure to store mesh application data.
meshx_err_t create_control_task(dev_struct_t *pdev)
Create the control task.
meshx_err_t
MeshX Error Codes.
meshx_err_t meshx_logging_init(const meshx_logging_t *config)
Initializes the MeshX logging system with the provided configuration.
#define MESHX_LOG_VERBOSE
#define MESHX_LOGE(module_id, format,...)
#define CONFIG_MESHX_DEFAULT_LOG_LEVEL
struct meshx_logging meshx_logging_t
#define CONFIG_MESHX_LOG_PRINTF
Macro to define printf function.
meshx_err_t meshx_nvs_init(void)
MeshX NVS Initialisation.
meshx_err_t meshx_nvs_open(uint16_t cid, uint16_t pid, uint32_t commit_timeout_ms)
Open the NVS with a timeout.
meshx_err_t meshx_nvs_get(char const *key, void *blob, uint16_t blob_size)
Get a value from the NVS.
meshx_err_t meshx_os_timer_init(void)
Initialize the OS timer module.
meshx_err_t meshx_init_prov(dev_struct_t *p_dev, const meshx_prov_params_t *prov_cfg)
Initialize provisioning parameters.
meshx_err_t meshx_txcm_init(dev_struct_t *pdev)
Initializes the MeshX Tx Control Module.
meshx_app_store_t meshx_store
MESHX_ELEMENT elements[MAX_ELE_CNT]
uint32_t meshx_nvs_save_period
meshx_uuid_addr_t meshx_uuid_addr
meshx_err_t register_ut_command()
Registers the unit test (ut) command with the ESP console.
meshx_err_t init_unit_test_console()
Initialize the production console.