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.
|
Unit test module for the production console. More...
Go to the source code of this file.
Macros | |
#define | UT_CMD_MIN_ARGS 4 |
Functions | |
static meshx_err_t | ut_command_handler (int argc, char **argv) |
Handles unit test commands by invoking the appropriate callback based on the module ID. | |
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. | |
meshx_err_t | register_unit_test (module_id_t module_id, module_callback_t callback) |
Register a unit test for a specific module. | |
Variables | |
static unit_test_callback_t | callback_list [MODULE_ID_MAX] |
Unit test module for the production console.
Copyright © 2024 - 2025 MeshX
This file contains the implementation of the unit test module for the production console. It provides functions to register unit test commands and initialize the console for production use.
Definition in file unit_test.c.
#define UT_CMD_MIN_ARGS 4 |
Definition at line 18 of file unit_test.c.
meshx_err_t init_unit_test_console | ( | void | ) |
Initialize the production console.
This function initializes the production console for the application.
Definition at line 100 of file unit_test.c.
meshx_err_t register_unit_test | ( | module_id_t | module_id, |
module_callback_t | callback ) |
Register a unit test for a specific module.
This function registers a unit test callback for the given module ID.
[in] | module_id | The ID of the module for which the unit test is being registered. |
[in] | callback | The callback function to be called for the unit test. |
Definition at line 149 of file unit_test.c.
meshx_err_t register_ut_command | ( | ) |
Registers the unit test (ut) command with the ESP console.
This function creates a new console command "ut" which is used for running unit tests. The command is registered with the ESP console using the esp_console_cmd_register function.
Definition at line 81 of file unit_test.c.
|
static |
Handles unit test commands by invoking the appropriate callback based on the module ID.
This function processes unit test commands by parsing the provided arguments and invoking the corresponding callback function registered for the specified module ID.
argc | The number of arguments passed to the command. |
argv | An array of strings representing the arguments. |
Definition at line 36 of file unit_test.c.
|
static |
Definition at line 20 of file unit_test.c.