API
 
Loading...
Searching...
No Matches

Unit tests for the ocam2KCtrl application. More...

Collaboration diagram for ocam2KCtrl Unit Tests:

Namespaces

namespace  libXWCTest::ocam2KCtrlTest
 Namespace for ocam2KCtrl lifecycle unit tests.
 

Functions

 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl lifecycle entrypoints handle startup failures and POWERON logic", "[ocam2KCtrl]")
 Verify lifecycle entrypoints cover startup failure handling and the POWERON fast-return path.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl sync stream creation uses a 1x1 uint8 layout", "[ocam2KCtrl]")
 Verify the sync stream is created as a 1x1 uint8 ImageStreamIO buffer.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl sync stream publication mirrors metadata and posts semaphores", "[ocam2KCtrl]")
 Verify the sync stream mirrors main-stream metadata and posts a semaphore.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl ensureSyncStream reuses and replaces existing stream state", "[ocam2KCtrl]")
 Verify sync-stream preparation reuses valid streams and recovers from stale or mismatched ones.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl stateString reports mode fps gain and setpoint", "[ocam2KCtrl]")
 Verify the stdCamera state string is assembled from the OCAM state members.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl stateStringValid requires OPERATING and on-target temperature control", "[ocam2KCtrl]")
 Verify the state string validity depends on operating state and temperature lock.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl configuration loading handles defaults and supported gain limits", "[ocam2KCtrl]")
 Verify OCAM-specific configuration values load defaults, overrides, and gain clamps.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl getTemps handles valid and malformed serial responses", "[ocam2KCtrl]")
 Verify temperature queries handle valid and malformed serial responses.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl getFPS handles valid and malformed serial responses", "[ocam2KCtrl]")
 Verify FPS queries handle valid and malformed serial responses, plus synchro mode.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl temperature control helpers handle valid and invalid requests", "[ocam2KCtrl]")
 Verify the temperature-control helpers handle safe, unsafe, and valid setpoint requests.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl setShutter rejects invalid shutter requests", "[ocam2KCtrl]")
 Verify the shutter adapter rejects invalid requests before touching the DSS threads.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl helper interfaces reset local state and power-off lifecycle flags", "[ocam2KCtrl]")
 Verify simple helper methods update local app state without hardware dependencies.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl startAcquisition resets frame tracking and starts EDT buffers", "[ocam2KCtrl]")
 Verify acquisition startup requests EDT buffering and resets the image counter.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl acquireAndCheckValid handles valid, skipped, and corrupt frame numbers", "[ocam2KCtrl]")
 Verify frame acquisition timestamps and frame-number handling across valid and invalid sequences.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl loadImageIntoStream uses the OCAM descramble output", "[ocam2KCtrl]")
 Verify the raw image pointer is passed through to the OCAM descramble routine.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl serial gain helpers handle valid and invalid responses", "[ocam2KCtrl]")
 Verify the serial gain helpers accept valid responses and handle malformed or tripped ones.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl serial setter commands send the expected sequence", "[ocam2KCtrl]")
 Verify the serial setter commands send the expected OCAM command sequence.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl configureAcquisition handles valid and invalid OCAM modes", "[ocam2KCtrl]")
 Verify acquisition configuration programs the OCAM mode and handles invalid frame shapes.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl INDI callbacks update local state", "[ocam2KCtrl]")
 Verify the INDI callbacks update confirmation state and sync-frequency-driven reconfiguration.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl static INDI callback wrappers forward requests to the instance", "[ocam2KCtrl]")
 Verify the generated static INDI wrappers forward into the instance callbacks.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl telemetry wrappers record snapshots and stale intervals", "[ocam2KCtrl]")
 Verify telemetry wrapper helpers emit their records and interval checks trigger stale telemetry.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl appLogic handles connection and housekeeping flow", "[ocam2KCtrl]")
 Verify appLogic covers connection transitions, error handling, and READY-state housekeeping.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl reconfig reloads the next mode through edtCamera", "[ocam2KCtrl]")
 Verify reconfiguration reloads the requested mode and leaves the app in READY.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl utility helpers parse temperature responses", "[ocamUtils]")
 Verify parseTemps() accepts a valid OCAM temperature response and rejects truncated data.
 
 libXWCTest::ocam2KCtrlTest::TEST_CASE ("ocam2KCtrl utility helpers parse gain responses", "[ocamUtils]")
 Verify parseEMGain() accepts valid OCAM gain responses and rejects malformed strings.
 

Detailed Description

Unit tests for the ocam2KCtrl application.

Additional utility tests for the ocam2KCtrl application.

Additional lifecycle tests for the ocam2KCtrl application.

Function Documentation

◆ TEST_CASE() [1/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl acquireAndCheckValid handles  valid,
skipped  ,
and corrupt frame numbers"  ,
""  [ocam2KCtrl] 
)

Verify frame acquisition timestamps and frame-number handling across valid and invalid sequences.

Definition at line 1406 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::acquireAndCheckValid(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [2/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl appLogic handles connection and housekeeping flow"  ,
""  [ocam2KCtrl] 
)

◆ TEST_CASE() [3/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl configuration loading handles defaults and supported gain limits"  ,
""  [ocam2KCtrl] 
)

Verify OCAM-specific configuration values load defaults, overrides, and gain clamps.

Definition at line 889 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::loadConfig(), MagAOX::app::ocam2KCtrl::setupConfig(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [4/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl configureAcquisition handles valid and invalid OCAM modes"  ,
""  [ocam2KCtrl] 
)

◆ TEST_CASE() [5/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl ensureSyncStream reuses and replaces existing stream state"  ,
""  [ocam2KCtrl] 
)

Verify sync-stream preparation reuses valid streams and recovers from stale or mismatched ones.

Definition at line 748 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::ensureSyncStream(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [6/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl getFPS handles valid and malformed serial responses"  ,
""  [ocam2KCtrl] 
)

Verify FPS queries handle valid and malformed serial responses, plus synchro mode.

Definition at line 1077 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::getFPS(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [7/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl getTemps handles valid and malformed serial responses"  ,
""  [ocam2KCtrl] 
)

Verify temperature queries handle valid and malformed serial responses.

Definition at line 972 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::getTemps(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [8/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl helper interfaces reset local state and power-off lifecycle flags"  ,
""  [ocam2KCtrl] 
)

◆ TEST_CASE() [9/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl INDI callbacks update local state"  ,
""  [ocam2KCtrl] 
)

Verify the INDI callbacks update confirmation state and sync-frequency-driven reconfiguration.

Definition at line 2145 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ipRecv, and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [10/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl lifecycle entrypoints handle startup failures and POWERON logic"  ,
""  [ocam2KCtrl] 
)

◆ TEST_CASE() [11/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl loadImageIntoStream uses the OCAM descramble output"  ,
""  [ocam2KCtrl] 
)

Verify the raw image pointer is passed through to the OCAM descramble routine.

Definition at line 1494 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::loadImageIntoStream(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [12/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl reconfig reloads the next mode through edtCamera"  ,
""  [ocam2KCtrl] 
)

Verify reconfiguration reloads the requested mode and leaves the app in READY.

Definition at line 2808 of file ocam2KCtrl_test.cpp.

References MagAOX::app::dev::cameraConfig::m_configFile, MagAOX::app::stateCodes::OPERATING, MagAOX::app::stateCodes::READY, MagAOX::app::ocam2KCtrl::reconfig(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [13/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl serial gain helpers handle valid and invalid responses"  ,
""  [ocam2KCtrl] 
)

Verify the serial gain helpers accept valid responses and handle malformed or tripped ones.

Definition at line 1557 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::getEMGain(), MagAOX::app::ocam2KCtrl::resetEMProtection(), MagAOX::app::ocam2KCtrl::setEMGain(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [14/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl serial setter commands send the expected sequence"  ,
""  [ocam2KCtrl] 
)

Verify the serial setter commands send the expected OCAM command sequence.

Definition at line 1727 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::setFPS(), MagAOX::app::ocam2KCtrl::setSynchro(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [15/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl setShutter rejects invalid shutter requests"  ,
""  [ocam2KCtrl] 
)

Verify the shutter adapter rejects invalid requests before touching the DSS threads.

Definition at line 1304 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::setShutter(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [16/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl startAcquisition resets frame tracking and starts EDT buffers"  ,
""  [ocam2KCtrl] 
)

Verify acquisition startup requests EDT buffering and resets the image counter.

Definition at line 1381 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::startAcquisition(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [17/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl stateString reports mode fps gain and setpoint"  ,
""  [ocam2KCtrl] 
)

Verify the stdCamera state string is assembled from the OCAM state members.

Definition at line 837 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::stateString(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [18/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl stateStringValid requires OPERATING and on-target temperature control"  ,
""  [ocam2KCtrl] 
)

Verify the state string validity depends on operating state and temperature lock.

Definition at line 861 of file ocam2KCtrl_test.cpp.

References MagAOX::app::stateCodes::OPERATING, MagAOX::app::stateCodes::READY, MagAOX::app::ocam2KCtrl::stateStringValid(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [19/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl static INDI callback wrappers forward requests to the instance"  ,
""  [ocam2KCtrl] 
)

Verify the generated static INDI wrappers forward into the instance callbacks.

Definition at line 2276 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ipRecv, and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [20/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl sync stream creation uses a 1x1 uint8 layout"  ,
""  [ocam2KCtrl] 
)

Verify the sync stream is created as a 1x1 uint8 ImageStreamIO buffer.

Definition at line 648 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::ensureSyncStream(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [21/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl sync stream publication mirrors metadata and posts semaphores"  ,
""  [ocam2KCtrl] 
)

Verify the sync stream mirrors main-stream metadata and posts a semaphore.

Definition at line 681 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::frameGrabberPostPublish(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [22/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl telemetry wrappers record snapshots and stale intervals"  ,
""  [ocam2KCtrl] 
)

◆ TEST_CASE() [23/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl temperature control helpers handle valid and invalid requests"  ,
""  [ocam2KCtrl] 
)

Verify the temperature-control helpers handle safe, unsafe, and valid setpoint requests.

Definition at line 1162 of file ocam2KCtrl_test.cpp.

References MagAOX::app::ocam2KCtrl::setTempControl(), MagAOX::app::ocam2KCtrl::setTempSetPt(), and XWCTEST_DOXYGEN_REF.

◆ TEST_CASE() [24/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl utility helpers parse gain responses"  ,
""  [ocamUtils] 
)

Verify parseEMGain() accepts valid OCAM gain responses and rejects malformed strings.

Definition at line 75 of file ocamUtils_test.cpp.

References MagAOX::app::parseEMGain().

◆ TEST_CASE() [25/25]

libXWCTest::ocam2KCtrlTest::TEST_CASE ( "ocam2KCtrl utility helpers parse temperature responses"  ,
""  [ocamUtils] 
)