|
MeshX 0.4
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...
#include "unit_test.h"#include "interface/logging/meshx_log.h"#include "interface/utils/meshx_shell.h"#include "gpio_test_registry.h"Macros | |
| #define | UT_CMD_MIN_ARGS 4 |
Functions | |
| static int | 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 MeshX shell. | |
| meshx_err_t | init_unit_test_console () |
| Initializes the unit test console using the platform shell. | |
| 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.
| #define UT_CMD_MIN_ARGS 4 |
| meshx_err_t init_unit_test_console | ( | void | ) |
Initializes the unit test console using the platform shell.
Initialize the unit test console.
| 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. |
| meshx_err_t register_ut_command | ( | ) |
Registers the unit test (ut) command with the MeshX shell.
This function creates a new console command "ut" which is used for running unit tests.
|
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. |
|
static |