|
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.
|
Header file for the production console unit test functionality. More...
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "meshx_config_internal.h"#include "argtable3/argtable3.h"#include "module_id.h"#include "meshx_err.h"Go to the source code of this file.
Data Structures | |
| struct | callback_node |
| Structure to hold the unit test callback function. More... | |
Macros | |
| #define | UT_GET_ARG(_x, _type, _argv) |
| Macro to extract an argument from the argument list. | |
Typedefs | |
| typedef meshx_err_t(* | module_callback_t) (int cmd_id, int argc, char **argv) |
| Callback function for unit test modules. | |
| typedef struct callback_node | unit_test_callback_t |
| Structure to hold the unit test callback function. | |
Functions | |
| meshx_err_t | register_ut_command () |
| Registers the unit test (ut) command with the MeshX shell. | |
| meshx_err_t | init_unit_test_console (void) |
| 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. | |
Header file for the production console unit test functionality.
Copyright © 2024 - 2025 MeshX
This file contains the declarations and definitions for initializing the production console and registering unit test callbacks for different modules.
| #define UT_GET_ARG | ( | _x, | |
| _type, | |||
| _argv ) |
Macro to extract an argument from the argument list.
| typedef meshx_err_t(* module_callback_t) (int cmd_id, int argc, char **argv) |
Callback function for unit test modules.
This function is used to define the callback function signature for unit test modules. The callback function is invoked when a unit test command is received by the production console.
| cmd_id | The command ID to be processed. |
| argc | The number of arguments provided. |
| argv | The array of arguments. |
| typedef struct callback_node unit_test_callback_t |
Structure to hold the unit test callback function.
| meshx_err_t init_unit_test_console | ( | void | ) |
Initialize the unit test console.
This function initializes the unit test console for the application using the underlying 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 shell command "ut" which is used for running unit tests.
This function creates a new console command "ut" which is used for running unit tests.