API
 
Loading...
Searching...
No Matches
mcp3208Ctrl_test.cpp File Reference

Catch2 tests for the mcp3208Ctrl app. More...

#include "../../../tests/testXWC.hpp"
#include <vector>
#include "../mcp3208Ctrl.hpp"
Include dependency graph for mcp3208Ctrl_test.cpp:

Go to the source code of this file.

Namespaces

namespace  MCP3208Lib
 
namespace  libXWCTest
 Namespace for all libXWC tests.
 
namespace  libXWCTest::mcp3208CtrlTest
 Namespace for mcp3208Ctrl unit tests.
 

Macros

#define protected   public
 

Functions

 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl Doxygen references are preserved", "[mcp3208Ctrl]")
 Preserve Doxygen links for the real mcp3208Ctrl APIs exercised by the tests.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl configuration defaults load synchronized settings", "[mcp3208Ctrl]")
 Verify synchronized-acquisition defaults load from configuration.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl configuration overrides load synchronized settings", "[mcp3208Ctrl]")
 Verify synchronized-acquisition overrides load from configuration.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl fps callback updates trigger metadata", "[mcp3208Ctrl]")
 Verify the user fps callback still updates cadence metadata.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl fps source callback updates trigger metadata", "[mcp3208Ctrl]")
 Verify the external fps source callback still updates cadence metadata.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl configuration clamps synchronized alpha", "[mcp3208Ctrl]")
 Verify synchronized alpha configuration is clamped to the valid range.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl alpha callback updates and clamps", "[mcp3208Ctrl]")
 Verify alpha callback updates and clamps the global EMA coefficient.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchroDelay callback updates signed offsets", "[mcp3208Ctrl]")
 Verify synchronized-delay callback updates delay state with signed offsets.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl timing diagnostics publish synchronized loop metrics", "[mcp3208Ctrl]")
 Verify synchronized-mode timing diagnostics publish loop state and derived error.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl timing diagnostics track mode transitions", "[mcp3208Ctrl]")
 Verify timing diagnostics report timer mode and update mode code across transitions.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl timing diagnostics compute wrapped phase error and lock thresholds", "[mcp3208Ctrl]")
 Verify timing diagnostics wrap phase error and require both lock thresholds.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl timing helpers convert between nanoseconds and timespec", "[mcp3208Ctrl]")
 Verify nanosecond and timespec conversions preserve normalized values.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl updateTriggerTiming uses measured semaphore period for delay model", "[mcp3208Ctrl]")
 Verify synchronized timing uses only the measured semaphore period for delay modeling.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl updateTriggerTiming applies positive synchroDelay offset", "[mcp3208Ctrl]")
 Verify synchronized timing applies a positive user offset to the modeled delay target.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl updateTriggerTiming applies negative synchroDelay offset with wrap", "[mcp3208Ctrl]")
 Verify synchronized timing applies a negative user offset with modulo wrap into the current period.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl updateTriggerTiming falls back to EMA period when fps is invalid", "[mcp3208Ctrl]")
 Verify synchronized timing falls back to EMA period when WFS fps is unavailable.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl updateTriggerTiming wraps delay with modulo period", "[mcp3208Ctrl]")
 Verify synchronized timing wraps negative raw delays into the current WFS period.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl updateTriggerTiming preserves positive raw delay", "[mcp3208Ctrl]")
 Verify synchronized timing leaves positive raw delays unchanged by modulo wrapping.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl updateTriggerTiming uses configurable timing constants", "[mcp3208Ctrl]")
 Verify synchronized timing constants directly control the modeled delay target.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl updateTriggerTiming guards non-positive period", "[mcp3208Ctrl]")
 Verify synchronized timing leaves trigger time unchanged when period estimate is non-positive.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl timer mode configureAcquisition sizes the output frame", "[mcp3208Ctrl]")
 Verify timer-driven acquisition configures the published frame geometry.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl timer mode reads configured channels", "[mcp3208Ctrl]")
 Verify timer-driven acquisition still reads one frame of ADC values.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl timer mode trigger interval initializes then measures", "[mcp3208Ctrl]")
 Verify timer-mode trigger interval diagnostics initialize then report measured intervals.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl loadImageIntoStream copies the current values", "[mcp3208Ctrl]")
 Verify the current MCP3208 values are copied into the output image buffer.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl loadImageIntoStream updates frame mapping counters", "[mcp3208Ctrl]")
 Verify published-frame counters track local and synchronized stream writes.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized mode reads on semaphore wake", "[mcp3208Ctrl]")
 Verify synchronized acquisition performs one ADC sweep per semaphore wake.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized mode tracks producer cadence from metadata", "[mcp3208Ctrl]")
 Verify synchronized mode derives producer cadence from stream metadata counters and timestamps.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized read latency EMA initializes and smooths", "[mcp3208Ctrl]")
 Verify synchronized read-latency EMA initializes from the first sample and smooths subsequent samples.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized non-delay service EMA uses global alpha", "[mcp3208Ctrl]")
 Verify synchronized non-delay service EMA uses the configurable global alpha.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized delay controller uses read latency EMA", "[mcp3208Ctrl]")
 Verify synchronized delay control uses read-latency EMA for the integrator correction.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized delay controller clamps to zero", "[mcp3208Ctrl]")
 Verify synchronized delay control clamps at zero when the control step overshoots.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized delay controller applies anti-windup at cap", "[mcp3208Ctrl]")
 Verify synchronized delay control blocks integrator windup while cadence capping is active.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized timeout requests reconfig for a stale stream", "[mcp3208Ctrl]")
 Verify synchronized timeout requests reconfiguration when the trigger stream is stale.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl synchronized stale helper detects missing streams", "[mcp3208Ctrl]")
 Verify stale-stream detection notices a missing synchronization stream backing file.
 
 libXWCTest::mcp3208CtrlTest::TEST_CASE ("mcp3208Ctrl reconfig clears cached synchronization state", "[mcp3208Ctrl]")
 Verify reconfig() clears cached synchronization state.
 

Detailed Description

Catch2 tests for the mcp3208Ctrl app.

Author
Jared R. Males (jared.nosp@m.male.nosp@m.s@gma.nosp@m.il.c.nosp@m.om)

Definition in file mcp3208Ctrl_test.cpp.

Macro Definition Documentation

◆ protected

#define protected   public

Definition at line 12 of file mcp3208Ctrl_test.cpp.