Unit tests for the ocam2KCtrl application. More...

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. | |
Unit tests for the ocam2KCtrl application.
Additional utility tests for the ocam2KCtrl application.
Additional lifecycle tests for the ocam2KCtrl application.
| 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.
| libXWCTest::ocam2KCtrlTest::TEST_CASE | ( | "ocam2KCtrl appLogic handles connection and housekeeping flow" | , |
| "" | [ocam2KCtrl] | ||
| ) |
Verify appLogic covers connection transitions, error handling, and READY-state housekeeping.
Definition at line 2417 of file ocam2KCtrl_test.cpp.
References MagAOX::app::ocam2KCtrl::appLogic(), MagAOX::app::stateCodes::CONNECTED, MagAOX::app::stateCodes::ERROR, MagAOX::app::stateCodes::FAILURE, MagAOX::app::stateCodes::NOTCONNECTED, MagAOX::app::stateCodes::POWEROFF, MagAOX::app::stateCodes::READY, and XWCTEST_DOXYGEN_REF.
| 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.
| 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.
Definition at line 1891 of file ocam2KCtrl_test.cpp.
References MagAOX::app::ocam2KCtrl::configureAcquisition(), MagAOX::app::dev::cameraConfig::m_binningX, MagAOX::app::dev::cameraConfig::m_binningY, MagAOX::app::dev::cameraConfig::m_digitalBinX, MagAOX::app::dev::cameraConfig::m_digitalBinY, MagAOX::app::dev::cameraConfig::m_serialCommand, OCAM2_BINNING, OCAM2_BINNING1x3, OCAM2_BINNING1x4, OCAM2_ERROR, OCAM2_NORMAL, MagAOX::app::stateCodes::OPERATING, and XWCTEST_DOXYGEN_REF.
| 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.
| 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.
| 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.
| 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.
Definition at line 1323 of file ocam2KCtrl_test.cpp.
References MagAOX::app::ocam2KCtrl::appShutdown(), MagAOX::app::ocam2KCtrl::fps(), MagAOX::app::ocam2KCtrl::onPowerOff(), MagAOX::app::ocam2KCtrl::powerOnDefaults(), MagAOX::app::ocam2KCtrl::setExpTime(), MagAOX::app::ocam2KCtrl::setNextROI(), MagAOX::app::ocam2KCtrl::whilePowerOff(), and XWCTEST_DOXYGEN_REF.
| 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.
| 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.
Definition at line 31 of file ocam2KCtrl_lifecycle_test.cpp.
References MagAOX::app::ocam2KCtrl::appLogic(), MagAOX::app::ocam2KCtrl::appStartup(), MagAOX::app::MagAOXApp< _useINDI >::m_powerState, MagAOX::app::MagAOXApp< _useINDI >::m_powerTargetState, MagAOX::app::stateCodes::POWERON, and XWCTEST_DOXYGEN_REF.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
Definition at line 2334 of file ocam2KCtrl_test.cpp.
References MagAOX::app::ocam2KCtrl::checkRecordTimes(), MagAOX::logger::ocam_temps::lastRecord, MagAOX::logger::telem_fgtimings::lastRecord, MagAOX::logger::telem_stdcam::lastRecord, MagAOX::app::ocam2KCtrl::recordTelem(), and XWCTEST_DOXYGEN_REF.
| 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.
| 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().
| libXWCTest::ocam2KCtrlTest::TEST_CASE | ( | "ocam2KCtrl utility helpers parse temperature responses" | , |
| "" | [ocamUtils] | ||
| ) |
Verify parseTemps() accepts a valid OCAM temperature response and rejects truncated data.
Definition at line 33 of file ocamUtils_test.cpp.
References MagAOX::app::ocamTemps::BIAS, MagAOX::app::ocamTemps::CCD, MagAOX::app::ocamTemps::COOLING_POWER, MagAOX::app::ocamTemps::CPU, MagAOX::app::ocamTemps::LEFT, MagAOX::app::parseTemps(), MagAOX::app::ocamTemps::POWER, MagAOX::app::ocamTemps::RIGHT, MagAOX::app::ocamTemps::SET, and MagAOX::app::ocamTemps::WATER.