28#include "../../libMagAOX/libMagAOX.hpp"
29#include "../../magaox_git_version.h"
33#include <irisao.mirrors.h>
203 config.add(
"dm.mserialNumber",
"",
"dm.mserialNumber", argType::Required,
"dm",
"mserialNumber",
false,
"string",
"The IrisAO MIRROR serial number used to find correct DM Profile.");
204 config.add(
"dm.dserialNumber",
"",
"dm.dserialNumber", argType::Required,
"dm",
"dserialNumber",
false,
"string",
"The IrisAO DRIVER serial number used to find correct DM Profile.");
205 config.add(
"dm.hardwareDisable",
"",
"dm.hardwareDisable", argType::Required,
"dm",
"hardwareDisable",
false,
"bool",
"Set to true to disable hardware for testing purposes.");
206 config.add(
"dm.calibRelDir",
"",
"dm.calibRelDir", argType::Required,
"dm",
"calibRelDir",
false,
"string",
"Used to find the default config directory.");
The base-class for MagAO-X applications.
stateCodes::stateCodeT state()
Get the current state code.
int shutdown()
Get the value of the shutdown flag.
static int log(const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT)
Make a log entry.
std::string m_calibRelDir
The directory relative to the calibPath. Set this before calling dm<derivedT,realT>::loadConfig().
int appShutdown()
DM shutdown.
mx::improc::eigenImage< uint8_t > m_instSatMap
The instantaneous saturation map, 0/1, set by the commandDM() function of the derived class.
int loadConfig(mx::app::appConfigurator &config)
load the configuration system results
int appStartup()
Startup function.
int setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
int appLogic()
DM application logic.
std::thread m_smThread
A separate thread for the actual monitoring.
The MagAO-X IrisAO DM Controller.
bool m_hardwareDisable
Hardware disable flag (set to true to disable sending commands)
int loadConfigImpl(mx::app::appConfigurator &_config)
Implementation of loadConfig logic, separated for testing.
~irisaoCtrl() noexcept
D'tor.
virtual int appStartup()
Startup function.
std::string m_dserialNumber
The IrisAO DRIVER serial number.
virtual int appLogic()
Implementation of the FSM for irisaoCtrl.
int commandDM(void *curr_src)
Send a command to the DM.
double * m_dminputs
Pre-allocated command vector, used only in commandDM.
bool m_dmopen
Track whether the DM connection has been opened.
MirrorHandle m_dm
IrisAO SDK handle for the DM.
virtual void setupConfig()
Setup the configuration system.
int zeroDM()
Zero all commands on the DM.
virtual int whilePowerOff()
Maintenace while powered off.
irisaoCtrl()
Default c'tor.
virtual void loadConfig()
Load the configuration.
uint32_t m_nbAct
The number of actuators.
int initDM()
Initialize the DM and prepare for operation.
virtual int appShutdown()
Shutdown the app.
std::string m_mserialNumber
The IrisAO MIRROR serial number.
virtual int onPowerOff()
Cleanup after a power off.
float realT
This defines the datatype used to signal the DM using the ImageStreamIO library.
int releaseDM()
Release the DM, making it safe to turn off power.
friend class irisaoCtrl_test
@ OPERATING
The device is operating, other than homing.
@ POWEROFF
The device power is off.
@ READY
The device is ready for operation, but is not operating.
@ POWERON
The device power is on.
static constexpr logPrioT LOG_NOTICE
A normal but significant condition.
static constexpr logPrioT LOG_WARNING
A condition has occurred which may become an error, but the process continues.
static constexpr logPrioT LOG_ERROR
An error has occured which the software will attempt to correct.