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

Comprehensive test suite for hf-utils-canopen utilities. More...

#include "TestFramework.h"
#include "CanFrame.h"
#include "CanOpenUtils.h"
#include <cstring>
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
Include dependency graph for canopen_utils_comprehensive_test.cpp:

Functions

static bool test_can_frame_default () noexcept
 
static bool test_can_frame_data () noexcept
 
static bool test_sdo_download_frame () noexcept
 
static bool test_nmt_commands () noexcept
 
void app_main (void)
 

Variables

static const char * TAG = "CANopen_Utils_Test"
 
static TestResults g_test_results
 
static constexpr bool ENABLE_CAN_FRAME_TESTS = true
 
static constexpr bool ENABLE_SDO_TESTS = true
 
static constexpr bool ENABLE_NMT_TESTS = true
 

Detailed Description

Comprehensive test suite for hf-utils-canopen utilities.

Tests: CanFrame construction, SDO protocol helpers, NMT state machine, COB-ID calculation, and frame data encoding/decoding.

Note
This is a software-only test suite that validates CAN frame structures and protocol utilities without requiring actual CAN hardware.
Author
HardFOC Team
Date
2025-2026

Function Documentation

◆ app_main()

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

◆ test_can_frame_data()

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

◆ test_can_frame_default()

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

◆ test_nmt_commands()

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

◆ test_sdo_download_frame()

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

Variable Documentation

◆ ENABLE_CAN_FRAME_TESTS

constexpr bool ENABLE_CAN_FRAME_TESTS = true
staticconstexpr

◆ ENABLE_NMT_TESTS

constexpr bool ENABLE_NMT_TESTS = true
staticconstexpr

◆ ENABLE_SDO_TESTS

constexpr bool ENABLE_SDO_TESTS = true
staticconstexpr

◆ g_test_results

TestResults g_test_results
static

◆ TAG

const char* TAG = "CANopen_Utils_Test"
static