HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
Loading...
Searching...
No Matches
full_system_integration_test.cpp File Reference

Full system integration test for hf-core. More...

#include "TestFramework.h"
#include "esp32_bus_setup.hpp"
#include "esp32_test_config.hpp"
#include "handlers/as5047u/As5047uHandler.h"
#include "handlers/bno08x/Bno08xHandler.h"
#include "handlers/pca9685/Pca9685Handler.h"
#include "handlers/pcal95555/Pcal95555Handler.h"
#include "handlers/ntc/NtcTemperatureHandler.h"
#include "handlers/tmc9660/Tmc9660Handler.h"
#include "handlers/logger/Logger.h"
#include "RtosMutex.h"
#include <memory>
#include <atomic>
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
Include dependency graph for full_system_integration_test.cpp:

Classes

struct  HandlerTaskArgs
 

Functions

static bool test_i2c_bus_scan () noexcept
 
static bool test_i2c_multi_device_init () noexcept
 
static bool test_logger_singleton_across_handlers () noexcept
 
static void i2c_handler_task (void *arg)
 
static bool test_concurrent_i2c_access () noexcept
 
static bool test_mutex_protected_handler () noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "Integration_Test"
 
static TestResults g_test_results
 
static constexpr bool ENABLE_BUS_SCAN_TESTS = true
 
static constexpr bool ENABLE_I2C_MULTI_DEVICE_TESTS = true
 
static constexpr bool ENABLE_LOGGER_INTEGRATION_TESTS = true
 
static constexpr bool ENABLE_CONCURRENT_HANDLER_TESTS = true
 
static constexpr bool ENABLE_RTOS_INTEGRATION_TESTS = true
 

Detailed Description

Full system integration test for hf-core.

Tests multi-handler concurrent operation on shared I2C/SPI buses, RTOS threading with handlers, Logger integration, and end-to-end data flow from hardware through handlers to application layer.

Note
This test exercises the real system architecture:
  • Shared I2C bus: BNO08x + PCA9685 + PCAL95555
  • Shared SPI bus: AS5047U + TMC9660
  • ADC: NTC thermistor
  • Logger: Singleton across all handlers
  • RtosMutex: Thread safety in concurrent access
Author
HardFOC Team
Date
2025-2026

Function Documentation

◆ app_main()

void app_main ( void )
Here is the call graph for this function:

◆ i2c_handler_task()

static void i2c_handler_task ( void * arg)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_concurrent_i2c_access()

static bool test_concurrent_i2c_access ( )
staticnoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_i2c_bus_scan()

static bool test_i2c_bus_scan ( )
staticnoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_i2c_multi_device_init()

static bool test_i2c_multi_device_init ( )
staticnoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_logger_singleton_across_handlers()

static bool test_logger_singleton_across_handlers ( )
staticnoexcept
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_mutex_protected_handler()

static bool test_mutex_protected_handler ( )
staticnoexcept
Here is the caller graph for this function:

Variable Documentation

◆ ENABLE_BUS_SCAN_TESTS

constexpr bool ENABLE_BUS_SCAN_TESTS = true
staticconstexpr

◆ ENABLE_CONCURRENT_HANDLER_TESTS

constexpr bool ENABLE_CONCURRENT_HANDLER_TESTS = true
staticconstexpr

◆ ENABLE_I2C_MULTI_DEVICE_TESTS

constexpr bool ENABLE_I2C_MULTI_DEVICE_TESTS = true
staticconstexpr

◆ ENABLE_LOGGER_INTEGRATION_TESTS

constexpr bool ENABLE_LOGGER_INTEGRATION_TESTS = true
staticconstexpr

◆ ENABLE_RTOS_INTEGRATION_TESTS

constexpr bool ENABLE_RTOS_INTEGRATION_TESTS = true
staticconstexpr

◆ g_test_results

TestResults g_test_results
static

◆ TAG

const char* TAG = "Integration_Test"
static