API
 
Loading...
Searching...
No Matches
MagAOX::app::dev::dm< derivedT, realT > Class Template Reference

#include <dm.hpp>

Collaboration diagram for MagAOX::app::dev::dm< derivedT, realT >:
Collaboration graph

Public Member Functions

 ~dm ()
 Destructor.
 
const std::string & calibPath () const
 Get the.
 
const std::string & flatPath () const
 Get the.
 
const std::string & testPath () const
 Get the.
 
const std::string & flatDefault () const
 Get the.
 
const std::string & testDefault () const
 Get the.
 
const std::string & shmimFlat () const
 Get the.
 
const std::string & shmimTest () const
 Get the.
 
const std::string & shmimSat () const
 Get the.
 
const std::string & shmimSatPerc () const
 Get the stream name for saturation percentage.
 
int satAvgInt () const
 Get the saturation accumulation interval.
 
int satThreadPrio () const
 Get the saturation thread priority.
 
const std::string & shmimShape () const
 Get the.
 
const std::string & shmimDelta () const
 Get the.
 
uint32_t dmWidth () const
 Get the DM Width.
 
uint32_t dmHeight () const
 Get the DM Height.
 
uint8_t dmDataType () const
 Get the DM data type.
 
float percThreshold () const
 Get the saturation percentage threshold.
 
float intervalSatThreshold () const
 Get the interval saturation threshold.
 
int intervalSatCountThreshold () const
 Get the interval saturation count threshold.
 
const std::vector< std::string > & satTriggerDevice () const
 Get the saturation trigger device(s)
 
const std::vector< std::string > & satTriggerProperty () const
 Get the saturation trigger property(ies)
 
const std::string & calibRelDir () const
 
int numChannels () const
 
const mx::improc::eigenImage< uint8_t > & instSatMap () const
 
const mx::improc::eigenImage< uint16_t > & accumSatMap () const
 
const mx::improc::eigenImage< float > & satPercMap () const
 
const std::vector< std::string > & deltaChannels () const
 
const std::vector< size_t > & notDeltas () const
 
const mx::improc::eigenImage< float > & totalFlat () const
 
int setupConfig (mx::app::appConfigurator &config)
 Setup the configuration system.
 
int loadConfig (mx::app::appConfigurator &config)
 load the configuration system results
 
int appStartup ()
 Startup function.
 
int appLogic ()
 DM application logic.
 
int appShutdown ()
 DM shutdown.
 
int onPowerOff ()
 DM Poweroff.
 
int whilePowerOff ()
 DM Poweroff Updates.
 
int findDMChannels ()
 Find the DM comb channels.
 
int allocate (const dev::shmimT &sp)
 Called after shmimMonitor connects to the dmXXdisp stream. Checks for proper size.
 
int processImage (void *curr_src, const dev::shmimT &sp)
 
int baseInitDM ()
 Calls derived()->initDM()
 
int baseReleaseDM ()
 Calls derived()->releaseDM() and then 0s all channels and the sat map.
 
int checkFlats ()
 Check the flats directory and update the list of flats if anything changes.
 
int loadFlat (const std::string &target)
 Load a flat file.
 
int setFlat (bool update=false)
 Send the current flat command to the DM.
 
int zeroFlat ()
 Zero the flat command on the DM.
 
int checkTests ()
 Check the tests directory and update the list of tests if anything changes.
 
int loadTest (const std::string &target)
 Load a test file.
 
int setTest ()
 Send the current test command to the DM.
 
int zeroTest ()
 Zero the test command on the DM.
 
int zeroAll (bool nosem=false)
 Zero all channels.
 
int makeDelta ()
 Calculate the delta command from the output shape.
 
int clearSat ()
 Clear the saturation maps and zero the shared memory.
 

Protected Attributes

std::string m_calibRelDir
 
int m_numChannels { 0 }
 The number of dmcomb channels found as part of allocation.
 
std::vector< mx::improc::milkImage< realT > * > m_channels
 
std::map< std::string, std::string > m_flatCommands
 Map of flat file name to full path.
 
std::string m_flatCurrent
 The name of the current flat command.
 
mx::improc::eigenImage< realT > m_flatCommand
 Data storage for the flat command.
 
bool m_flatLoaded { false }
 Flag indicating whether a flat is loaded in memory.
 
IMAGE m_flatImageStream
 The ImageStreamIO shared memory buffer for the flat.
 
bool m_flatSet { false }
 Flag indicating whether the flat command has been set.
 
mx::improc::milkImage< realT > m_actMask
 
std::map< std::string, std::string > m_testCommands
 Map of test file name to full path.
 
std::string m_testCurrent
 
mx::improc::eigenImage< realT > m_testCommand
 Data storage for the test command.
 
bool m_testLoaded { false }
 Flag indicating whether a test command is loaded in memory.
 
IMAGE m_testImageStream
 The ImageStreamIO shared memory buffer for the test.
 
bool m_testSet { false }
 Flag indicating whether the test command has been set.
 
mx::improc::eigenImage< uint8_t > m_instSatMap
 
mx::improc::eigenImage< uint16_t > m_accumSatMap
 
mx::improc::eigenImage< float > m_satPercMap
 
IMAGE m_satImageStream
 The ImageStreamIO shared memory buffer for the sat map.
 
IMAGE m_satPercImageStream
 The ImageStreamIO shared memory buffer for the sat percentage map.
 
int m_overSatAct { 0 }
 
int m_intervalSatExceeds { 0 }
 
bool m_intervalSatTrip { 0 }
 
mx::improc::milkImage< realT > m_outputShape
 The true output shape after saturation.
 
std::vector< std::string > m_deltaChannels
 The names of channels which are treated as delta commands.
 
std::vector< size_t > m_deltas
 Indices of the channels which are delta commands.
 
std::vector< size_t > m_notDeltas
 Indices of the channels which are not delta commands.
 
mx::improc::eigenImage< realT > m_totalFlat
 the total of all non-delta channels
 
mx::improc::eigenImage< realT > m_totalDelta
 the total of all delta channels
 
mx::improc::milkImage< realT > m_outputDelta
 The true output delta command after saturation.
 
mx::improc::milkImage< realT > m_outputDiff
 The difference between command and true delta command after saturation.
 
Saturation Thread Data

This thread processes the saturation maps

sem_t m_satSemaphore
 Semaphore used to tell the saturation thread to run.
 
bool m_satThreadInit { true }
 Synchronizer for thread startup, to allow priority setting to finish.
 
pid_t m_satThreadID { 0 }
 The ID of the saturation thread.
 
pcf::IndiProperty m_satThreadProp
 The property to hold the saturation thread details.
 
std::thread m_satThread
 A separate thread for the actual saturation processing.
 

Private Types

typedef mx::verbose::vvv verboseT
 

Private Member Functions

derivedT & derived ()
 

Configurable Parameters

std::string m_calibPath
 The path to this DM's calibration files.
 
std::string m_flatPath
 The path to this DM's flat files (usually the same as calibPath)
 
std::string m_testPath
 The path to this DM's test files (default is calibPath/tests;.
 
std::string m_actMaskPath
 The file name of the actuator mask for this DM.
 
std::string m_flatDefault
 
std::string m_testDefault
 
std::string m_shmimFlat
 The name of the shmim stream to write the flat to.
 
std::string m_shmimTest
 The name of the shmim stream to write the test to.
 
std::string m_shmimSat
 The name of the shmim stream to write the saturation map to.
 
std::string m_shmimSatPerc
 The name of the shmim stream to write the saturation percentage map to.
 
int m_satAvgInt { 100 }
 The time in milliseconds to accumulate saturation over.
 
int m_satThreadPrio { 0 }
 Priority of the saturation thread. Usually ok to be 0.
 
std::string m_shmimShape
 The name of the shmim stream to write the desaturated true shape to.
 
std::string m_shmimDelta
 The name of the shmim stream to write the desaturated delta command to.
 
std::string m_shmimDiff
 The name of the shmim stream to write the difference to.
 
uint32_t m_dmWidth { 0 }
 The width of the images in the stream.
 
uint32_t m_dmHeight { 0 }
 The height of the images in the stream.
 
float m_percThreshold { 0.98 }
 Threshold on percentage of frames an actuator is saturated over an interval.
 
float m_intervalSatThreshold { 0.50 }
 
int m_intervalSatCountThreshold { 10 }
 
std::vector< std::string > m_satTriggerDevice
 Device(s) with a toggle switch to toggle on saturation trigger.
 
std::vector< std::string > m_satTriggerProperty
 
static constexpr uint8_t m_dmDataType = ImageStreamTypeCode<realT>()
 The ImageStreamIO type code.
 

INDI

pcf::IndiProperty m_indiP_flat
 Property used to set and report the current flat.
 
pcf::IndiProperty m_indiP_init
 
pcf::IndiProperty m_indiP_zero
 
pcf::IndiProperty m_indiP_release
 
pcf::IndiProperty m_indiP_flats
 INDI Selection switch containing the flat files.
 
pcf::IndiProperty m_indiP_flatShmim
 Publish the shmim being used for the flat.
 
pcf::IndiProperty m_indiP_setFlat
 INDI toggle switch to set the current flat.
 
pcf::IndiProperty m_indiP_tests
 INDI Selection switch containing the test pattern files.
 
pcf::IndiProperty m_indiP_testShmim
 Publish the shmim being used for the test command.
 
pcf::IndiProperty m_indiP_setTest
 INDI toggle switch to set the current test pattern.
 
pcf::IndiProperty m_indiP_zeroAll
 
int newCallBack_init (const pcf::IndiProperty &ipRecv)
 The callback called by the static version, to actually process the new request.
 
int newCallBack_zero (const pcf::IndiProperty &ipRecv)
 The callback called by the static version, to actually process the new request.
 
int newCallBack_release (const pcf::IndiProperty &ipRecv)
 The callback called by the static version, to actually process the new request.
 
int newCallBack_flats (const pcf::IndiProperty &ipRecv)
 The callback called by the static version, to actually process the new request.
 
int newCallBack_setFlat (const pcf::IndiProperty &ipRecv)
 The callback called by the static version, to actually process the new request.
 
int newCallBack_tests (const pcf::IndiProperty &ipRecv)
 The callback called by the static version, to actually process the new request.
 
int newCallBack_setTest (const pcf::IndiProperty &ipRecv)
 The callback called by the static version, to actually process the new request.
 
int newCallBack_zeroAll (const pcf::IndiProperty &ipRecv)
 The callback for the zeroAll toggle switch, called by the static version.
 
int updateINDI ()
 Update the INDI properties for this device controller.
 
static int st_newCallBack_init (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for initializing the DM.
 
static int st_newCallBack_zero (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for initializing the DM.
 
static int st_newCallBack_release (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for initializing the DM.
 
static int st_newCallBack_flats (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for selecting the flat file.
 
static int st_newCallBack_setFlat (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for setting the flat.
 
static int st_newCallBack_tests (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for selecting the test file.
 
static int st_newCallBack_setTest (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for setting the test shape.
 
static int st_newCallBack_zeroAll (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for zeroing all channels.
 

Saturation Thread Functions

This thread processes the saturation maps

static void satThreadStart (dm *d)
 Thread starter, called by MagAOXApp::threadStart on thread construction. Calls satThreadExec.
 
void satThreadExec ()
 Execute saturation processing.
 
void intervalSatTrip ()
 Trigger loop openings because of excessive saturation.
 

Detailed Description

template<class derivedT, typename realT>
class MagAOX::app::dev::dm< derivedT, realT >

MagAO-X generic deformable mirror controller

The derived class derivedT must meet the following requirements:

Definition at line 89 of file dm.hpp.

Member Typedef Documentation

◆ verboseT

template<class derivedT , typename realT >
typedef mx::verbose::vvv MagAOX::app::dev::dm< derivedT, realT >::verboseT
private

Definition at line 92 of file dm.hpp.

Constructor & Destructor Documentation

◆ ~dm()

template<class derivedT , typename realT >
MagAOX::app::dev::dm< derivedT, realT >::~dm ( )

Destructor.

deallocates the m_channels vector

Definition at line 810 of file dm.hpp.

Member Function Documentation

◆ accumSatMap()

template<class derivedT , typename realT >
const mx::improc::eigenImage< uint16_t > & MagAOX::app::dev::dm< derivedT, realT >::accumSatMap ( ) const

Definition at line 954 of file dm.hpp.

◆ allocate()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::allocate ( const dev::shmimT sp)

Called after shmimMonitor connects to the dmXXdisp stream. Checks for proper size.

Returns
0 on success
-1 if incorrect size or data type in stream.

Definition at line 1746 of file dm.hpp.

◆ appLogic()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::appLogic ( )

DM application logic.

This should be called in derivedT::appLogic as

int appLogic()
DM application logic.
Definition dm.hpp:1551

with appropriate error checking.

Returns
0 on success
-1 on error, which is logged.

Definition at line 1551 of file dm.hpp.

Referenced by MagAOX::app::irisaoCtrl::appLogic().

◆ appShutdown()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::appShutdown ( )

DM shutdown.

This should be called in derivedT::appShutdown as

with appropriate error checking.

Returns
0 on success
-1 on error, which is logged.

Definition at line 1617 of file dm.hpp.

Referenced by MagAOX::app::irisaoCtrl::appShutdown().

◆ appStartup()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::appStartup ( )

Startup function.

This should be called in derivedT::appStartup as

int appStartup()
Startup function.
Definition dm.hpp:1405

with appropriate error checking.

Returns
0 on success
-1 on error, which is logged.

Definition at line 1405 of file dm.hpp.

Referenced by MagAOX::app::irisaoCtrl::appStartup().

◆ baseInitDM()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::baseInitDM ( )

Calls derived()->initDM()

Returns
0 on success
-1 on error from derived()->initDM()

Definition at line 1919 of file dm.hpp.

References MagAOX::app::stateCodes::ERROR, MagAOX::app::stateCodes::HOMING, and MagAOX::app::stateCodes::NOTHOMED.

◆ baseReleaseDM()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::baseReleaseDM ( )

Calls derived()->releaseDM() and then 0s all channels and the sat map.

This is called by the relevant INDI callback

Returns
0 on success
-1 on error

Definition at line 1942 of file dm.hpp.

References MagAOX::app::stateCodes::ERROR, MagAOX::app::stateCodes::NOTHOMED, and MagAOX::app::stateCodes::POWEROFF.

◆ calibPath()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::calibPath ( ) const

Get the.

Returns
the current value of

Definition at line 822 of file dm.hpp.

Referenced by TEST_CASE().

◆ calibRelDir()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::calibRelDir ( ) const

Definition at line 936 of file dm.hpp.

◆ checkFlats()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::checkFlats ( )

Check the flats directory and update the list of flats if anything changes.

This is called once per appLogic and whilePowerOff loops.

Returns
0 on success
-1 on error

Definition at line 1968 of file dm.hpp.

References MagAOX::app::it.

◆ checkTests()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::checkTests ( )

Check the tests directory and update the list of tests if anything changes.

This is called once per appLogic and whilePowerOff loops.

Returns
0 on success
-1 on error

Definition at line 2387 of file dm.hpp.

References MagAOX::app::it.

◆ clearSat()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::clearSat ( )

Clear the saturation maps and zero the shared memory.

Returns
0 on success
-1 on error

Definition at line 2826 of file dm.hpp.

References INDI_IDLE.

◆ deltaChannels()

template<class derivedT , typename realT >
const std::vector< std::string > & MagAOX::app::dev::dm< derivedT, realT >::deltaChannels ( ) const

Definition at line 966 of file dm.hpp.

◆ derived()

template<class derivedT , typename realT >
derivedT & MagAOX::app::dev::dm< derivedT, realT >::derived ( )
inlineprivate

Definition at line 803 of file dm.hpp.

◆ dmDataType()

template<class derivedT , typename realT >
uint8_t MagAOX::app::dev::dm< derivedT, realT >::dmDataType ( ) const

Get the DM data type.

Returns
the current value of m_dmDataType

Definition at line 900 of file dm.hpp.

◆ dmHeight()

template<class derivedT , typename realT >
uint32_t MagAOX::app::dev::dm< derivedT, realT >::dmHeight ( ) const

Get the DM Height.

Returns
the current value of m_dmHeight

Definition at line 894 of file dm.hpp.

◆ dmWidth()

template<class derivedT , typename realT >
uint32_t MagAOX::app::dev::dm< derivedT, realT >::dmWidth ( ) const

Get the DM Width.

Returns
the current value of m_dmWidth

Definition at line 888 of file dm.hpp.

◆ findDMChannels()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::findDMChannels ( )

Find the DM comb channels.

Introspectively finds all dmXXdispYY channels, zeroes them, and raises the semapahore on the last to cause dmcomb to update.

Definition at line 1652 of file dm.hpp.

◆ flatDefault()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::flatDefault ( ) const

Get the.

Returns
the current value of

Definition at line 840 of file dm.hpp.

◆ flatPath()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::flatPath ( ) const

Get the.

Returns
the current value of

Definition at line 828 of file dm.hpp.

◆ instSatMap()

template<class derivedT , typename realT >
const mx::improc::eigenImage< uint8_t > & MagAOX::app::dev::dm< derivedT, realT >::instSatMap ( ) const

Definition at line 948 of file dm.hpp.

◆ intervalSatCountThreshold()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::intervalSatCountThreshold ( ) const

Get the interval saturation count threshold.

Returns
the current value of m_intervalSatCountThreshold

Definition at line 918 of file dm.hpp.

◆ intervalSatThreshold()

template<class derivedT , typename realT >
float MagAOX::app::dev::dm< derivedT, realT >::intervalSatThreshold ( ) const

Get the interval saturation threshold.

Returns
the current value of m_intervalSatThreshold

Definition at line 912 of file dm.hpp.

◆ intervalSatTrip()

template<class derivedT , typename realT >
void MagAOX::app::dev::dm< derivedT, realT >::intervalSatTrip ( )
protected

Trigger loop openings because of excessive saturation.

Definition at line 3092 of file dm.hpp.

◆ loadConfig()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::loadConfig ( mx::app::appConfigurator &  config)

load the configuration system results

This should be called in derivedT::loadConfig as

int loadConfig(mx::app::appConfigurator &config)
load the configuration system results
Definition dm.hpp:1255

with appropriate error checking.

Parameters
[in]configthe derived classes configurator

Definition at line 1255 of file dm.hpp.

Referenced by MagAOX::app::irisaoCtrl::loadConfigImpl(), and TEST_CASE().

◆ loadFlat()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::loadFlat ( const std::string &  target)

Load a flat file.

Uses the target argument for lookup in m_flatCommands to find the path and loads the command in the local memory. Calls setFlat if the flat is currently set.

Returns
0 on success
-1 on error
Parameters
[in]targetthe name of the flat to load

Definition at line 2103 of file dm.hpp.

◆ loadTest()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::loadTest ( const std::string &  target)

Load a test file.

Uses the target argument for lookup in m_testCommands to find the path and loads the command in the local memory. Calls setTest if the test is currently set.

Definition at line 2482 of file dm.hpp.

◆ makeDelta()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::makeDelta ( )

Calculate the delta command from the output shape.

Definition at line 2797 of file dm.hpp.

◆ newCallBack_flats()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::newCallBack_flats ( const pcf::IndiProperty &  ipRecv)

The callback called by the static version, to actually process the new request.

Returns
0 on success.
-1 on error.
Parameters
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3216 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ newCallBack_init()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::newCallBack_init ( const pcf::IndiProperty &  ipRecv)

The callback called by the static version, to actually process the new request.

Returns
0 on success.
-1 on error.
Parameters
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3137 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ newCallBack_release()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::newCallBack_release ( const pcf::IndiProperty &  ipRecv)

The callback called by the static version, to actually process the new request.

Returns
0 on success.
-1 on error.
Parameters
[in]ipRecvthe INDI property sent with the new property request.

Definition at line 3192 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ newCallBack_setFlat()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::newCallBack_setFlat ( const pcf::IndiProperty &  ipRecv)

The callback called by the static version, to actually process the new request.

Returns
0 on success.
-1 on error.
Parameters
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3267 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ newCallBack_setTest()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::newCallBack_setTest ( const pcf::IndiProperty &  ipRecv)

The callback called by the static version, to actually process the new request.

Returns
0 on success.
-1 on error.
Parameters
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3345 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ newCallBack_tests()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::newCallBack_tests ( const pcf::IndiProperty &  ipRecv)

The callback called by the static version, to actually process the new request.

Returns
0 on success.
-1 on error.
Parameters
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3294 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ newCallBack_zero()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::newCallBack_zero ( const pcf::IndiProperty &  ipRecv)

The callback called by the static version, to actually process the new request.

Returns
0 on success.
-1 on error.
Parameters
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3168 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ newCallBack_zeroAll()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::newCallBack_zeroAll ( const pcf::IndiProperty &  ipRecv)

The callback for the zeroAll toggle switch, called by the static version.

Returns
0 on success.
-1 on error.
Parameters
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3372 of file dm.hpp.

References INDI_BUSY, MagAOX::app::ipRecv, and MagAOX::app::indi::updateSwitchIfChanged().

◆ notDeltas()

template<class derivedT , typename realT >
const std::vector< size_t > & MagAOX::app::dev::dm< derivedT, realT >::notDeltas ( ) const

Definition at line 972 of file dm.hpp.

◆ numChannels()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::numChannels ( ) const

Definition at line 942 of file dm.hpp.

◆ onPowerOff()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::onPowerOff ( )

DM Poweroff.

This should be called in derivedT::onPowerOff as

with appropriate error checking.

Returns
0 on success
-1 on error, which is logged.

Definition at line 1635 of file dm.hpp.

◆ percThreshold()

template<class derivedT , typename realT >
float MagAOX::app::dev::dm< derivedT, realT >::percThreshold ( ) const

Get the saturation percentage threshold.

Returns
the current value of m_percThreshold

Definition at line 906 of file dm.hpp.

◆ processImage()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::processImage ( void *  curr_src,
const dev::shmimT sp 
)

Called by shmimMonitor when a new DM command is available. This is just a pass-through to derivedT::commandDM(char*).

Definition at line 1844 of file dm.hpp.

◆ satAvgInt()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::satAvgInt ( ) const

Get the saturation accumulation interval.

Returns
the current value of m_satAvgInt

◆ satPercMap()

template<class derivedT , typename realT >
const mx::improc::eigenImage< float > & MagAOX::app::dev::dm< derivedT, realT >::satPercMap ( ) const

Definition at line 960 of file dm.hpp.

◆ satThreadExec()

template<class derivedT , typename realT >
void MagAOX::app::dev::dm< derivedT, realT >::satThreadExec ( )
protected

Execute saturation processing.

Definition at line 2893 of file dm.hpp.

References IMAGESTRUCT_FLOAT, and IMAGESTRUCT_UINT8.

Referenced by MagAOX::app::dev::dm< derivedT, realT >::satThreadStart().

◆ satThreadPrio()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::satThreadPrio ( ) const

Get the saturation thread priority.

Returns
the current value of m_satThreadPrio

◆ satThreadStart()

template<class derivedT , typename realT >
void MagAOX::app::dev::dm< derivedT, realT >::satThreadStart ( dm< derivedT, realT > *  d)
staticprotected

Thread starter, called by MagAOXApp::threadStart on thread construction. Calls satThreadExec.

Parameters
[in]da pointer to a dm instance (normally this)

Definition at line 2887 of file dm.hpp.

References MagAOX::app::dev::dm< derivedT, realT >::satThreadExec().

◆ satTriggerDevice()

template<class derivedT , typename realT >
const std::vector< std::string > & MagAOX::app::dev::dm< derivedT, realT >::satTriggerDevice ( ) const

Get the saturation trigger device(s)

Returns
the current value of m_satTriggerDevice

Definition at line 924 of file dm.hpp.

◆ satTriggerProperty()

template<class derivedT , typename realT >
const std::vector< std::string > & MagAOX::app::dev::dm< derivedT, realT >::satTriggerProperty ( ) const

Get the saturation trigger property(ies)

Returns
the current value of m_satTriggerProperty

Definition at line 930 of file dm.hpp.

◆ setFlat()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::setFlat ( bool  update = false)

Send the current flat command to the DM.

Writes the command to the designated shmim.

Returns
0 on success
-1 on error
Todo:
we are assuming that dmXXcomYY is not a cube. This might be true, but we should add cnt1 handling here anyway. With bounds checks b/c not everyone handles cnt1 properly.
Parameters
[in]updateIf true, this is an update rather than a new set

Definition at line 2207 of file dm.hpp.

References MagAOX::app::stateCodes::OPERATING, and MagAOX::app::stateCodes::READY.

◆ setTest()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::setTest ( )

Send the current test command to the DM.

Writes the command to the designated shmim.

Returns
0 on success
-1 on error
Todo:
we are assuming that dmXXcomYY is not a cube. This might be true, but we should add cnt1 handling here anyway. With bounds checks b/c not everyone handles cnt1 properly.

Definition at line 2562 of file dm.hpp.

◆ setupConfig()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::setupConfig ( mx::app::appConfigurator &  config)

Setup the configuration system.

This should be called in derivedT::setupConfig as

int setupConfig(mx::app::appConfigurator &config)
Setup the configuration system.
Definition dm.hpp:984

with appropriate error checking.

Todo:
shmimMonitor now has configSection so this isn't necessary.
Parameters
[out]configthe derived classes configurator

Definition at line 984 of file dm.hpp.

Referenced by MagAOX::app::irisaoCtrl::setupConfig(), and TEST_CASE().

◆ shmimDelta()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::shmimDelta ( ) const

Get the.

Returns
the current value of

Definition at line 882 of file dm.hpp.

◆ shmimFlat()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::shmimFlat ( ) const

Get the.

Returns
the current value of

Definition at line 852 of file dm.hpp.

◆ shmimSat()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::shmimSat ( ) const

Get the.

Returns
the current value of

Definition at line 864 of file dm.hpp.

◆ shmimSatPerc()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::shmimSatPerc ( ) const

Get the stream name for saturation percentage.

Returns
the current value of m_shmimSatPerc

Definition at line 870 of file dm.hpp.

◆ shmimShape()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::shmimShape ( ) const

Get the.

Returns
the current value of

Definition at line 876 of file dm.hpp.

◆ shmimTest()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::shmimTest ( ) const

Get the.

Returns
the current value of

Definition at line 858 of file dm.hpp.

◆ st_newCallBack_flats()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::st_newCallBack_flats ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
static

The static callback function to be registered for selecting the flat file.

Returns
0 on success.
-1 on error.
Parameters
[in]appa pointer to this, will be static_cast-ed to derivedT.
[in]ipRecvthe INDI property sent with the new property request.

Definition at line 3210 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ st_newCallBack_init()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::st_newCallBack_init ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
static

The static callback function to be registered for initializing the DM.

Returns
0 on success.
-1 on error.
Parameters
[in]appa pointer to this, will be static_cast-ed to derivedT.
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3131 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ st_newCallBack_release()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::st_newCallBack_release ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
static

The static callback function to be registered for initializing the DM.

Returns
0 on success.
-1 on error.
Parameters
[in]appa pointer to this, will be static_cast-ed to derivedT.
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3186 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ st_newCallBack_setFlat()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::st_newCallBack_setFlat ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
static

The static callback function to be registered for setting the flat.

Returns
0 on success.
-1 on error.
Parameters
[in]appa pointer to this, will be static_cast-ed to derivedT.
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3261 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ st_newCallBack_setTest()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::st_newCallBack_setTest ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
static

The static callback function to be registered for setting the test shape.

Returns
0 on success.
-1 on error.
Parameters
[in]appa pointer to this, will be static_cast-ed to derivedT.
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3339 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ st_newCallBack_tests()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::st_newCallBack_tests ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
static

The static callback function to be registered for selecting the test file.

Returns
0 on success.
-1 on error.
Parameters
[in]appa pointer to this, will be static_cast-ed to derivedT.
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3288 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ st_newCallBack_zero()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::st_newCallBack_zero ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
static

The static callback function to be registered for initializing the DM.

Returns
0 on success.
-1 on error.
Parameters
[in]appa pointer to this, will be static_cast-ed to derivedT.
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3162 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ st_newCallBack_zeroAll()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::st_newCallBack_zeroAll ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
static

The static callback function to be registered for zeroing all channels.

Returns
0 on success.
-1 on error.
Parameters
[in]appa pointer to this, will be static_cast-ed to derivedT.
[in]ipRecvthe INDI property sent with the the new property request.

Definition at line 3366 of file dm.hpp.

References MagAOX::app::ipRecv.

◆ testDefault()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::testDefault ( ) const

Get the.

Returns
the current value of

Definition at line 846 of file dm.hpp.

◆ testPath()

template<class derivedT , typename realT >
const std::string & MagAOX::app::dev::dm< derivedT, realT >::testPath ( ) const

Get the.

Returns
the current value of

Definition at line 834 of file dm.hpp.

◆ totalFlat()

template<class derivedT , typename realT >
const mx::improc::eigenImage< float > & MagAOX::app::dev::dm< derivedT, realT >::totalFlat ( ) const

Definition at line 978 of file dm.hpp.

◆ updateINDI()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::updateINDI ( )

Update the INDI properties for this device controller.

You should call this once per main loop. It is not called automatically.

Returns
0 on success.
-1 on error.

Definition at line 3120 of file dm.hpp.

◆ whilePowerOff()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::whilePowerOff ( )

DM Poweroff Updates.

This should be called in derivedT::whilePowerOff as

int whilePowerOff()
DM Poweroff Updates.
Definition dm.hpp:1643

with appropriate error checking.

Returns
0 on success
-1 on error, which is logged.

Definition at line 1643 of file dm.hpp.

◆ zeroAll()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::zeroAll ( bool  nosem = false)

Zero all channels.

Returns
0 on sucess
<0 on an error
Parameters
[in]nosem[optional] if true then the semaphore is not raised after zeroing all channels

Definition at line 2711 of file dm.hpp.

References INDI_IDLE, MagAOX::app::stateCodes::OPERATING, and MagAOX::app::stateCodes::READY.

◆ zeroFlat()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::zeroFlat ( )

Zero the flat command on the DM.

Writes a 0 array the designated shmim.

Returns
0 on success
-1 on error
Todo:
we are assuming that dmXXcomYY is not a cube. This might be true, but we should add cnt1 handling here anyway. With bounds checks b/c not everyone handles cnt1 properly.

Definition at line 2311 of file dm.hpp.

References MagAOX::app::stateCodes::OPERATING, and MagAOX::app::stateCodes::READY.

◆ zeroTest()

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::zeroTest ( )

Zero the test command on the DM.

Writes a 0 array the designated shmim.

Returns
0 on success
-1 on error
Todo:
we are assuming that dmXXcomYY is not a cube. This might be true, but we should add cnt1 handling here anyway. With bounds checks b/c not everyone handles cnt1 properly.

Definition at line 2653 of file dm.hpp.

Member Data Documentation

◆ m_accumSatMap

template<class derivedT , typename realT >
mx::improc::eigenImage<uint16_t> MagAOX::app::dev::dm< derivedT, realT >::m_accumSatMap
protected

The accumulated saturation map, which acccumulates for m_satAvgInt then is publised as a 0/1 image.

Definition at line 173 of file dm.hpp.

◆ m_actMask

template<class derivedT , typename realT >
mx::improc::milkImage<realT> MagAOX::app::dev::dm< derivedT, realT >::m_actMask
protected

Definition at line 159 of file dm.hpp.

◆ m_actMaskPath

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_actMaskPath
protected

The file name of the actuator mask for this DM.

Definition at line 103 of file dm.hpp.

◆ m_calibPath

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_calibPath
protected

The path to this DM's calibration files.

Definition at line 99 of file dm.hpp.

◆ m_calibRelDir

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_calibRelDir
protected

The directory relative to the calibPath. Set this before calling dm<derivedT,realT>::loadConfig().

Definition at line 143 of file dm.hpp.

◆ m_channels

template<class derivedT , typename realT >
std::vector<mx::improc::milkImage<realT> *> MagAOX::app::dev::dm< derivedT, realT >::m_channels
protected

Definition at line 148 of file dm.hpp.

◆ m_deltaChannels

template<class derivedT , typename realT >
std::vector<std::string> MagAOX::app::dev::dm< derivedT, realT >::m_deltaChannels
protected

The names of channels which are treated as delta commands.

Definition at line 188 of file dm.hpp.

◆ m_deltas

template<class derivedT , typename realT >
std::vector<size_t> MagAOX::app::dev::dm< derivedT, realT >::m_deltas
protected

Indices of the channels which are delta commands.

Definition at line 190 of file dm.hpp.

◆ m_dmDataType

template<class derivedT , typename realT >
constexpr uint8_t MagAOX::app::dev::dm< derivedT, realT >::m_dmDataType = ImageStreamTypeCode<realT>()
staticconstexprprotected

The ImageStreamIO type code.

Definition at line 126 of file dm.hpp.

◆ m_dmHeight

template<class derivedT , typename realT >
uint32_t MagAOX::app::dev::dm< derivedT, realT >::m_dmHeight { 0 }
protected

The height of the images in the stream.

Definition at line 124 of file dm.hpp.

◆ m_dmWidth

template<class derivedT , typename realT >
uint32_t MagAOX::app::dev::dm< derivedT, realT >::m_dmWidth { 0 }
protected

The width of the images in the stream.

Definition at line 123 of file dm.hpp.

◆ m_flatCommand

template<class derivedT , typename realT >
mx::improc::eigenImage<realT> MagAOX::app::dev::dm< derivedT, realT >::m_flatCommand
protected

Data storage for the flat command.

Definition at line 153 of file dm.hpp.

◆ m_flatCommands

template<class derivedT , typename realT >
std::map<std::string, std::string> MagAOX::app::dev::dm< derivedT, realT >::m_flatCommands
protected

Map of flat file name to full path.

Definition at line 150 of file dm.hpp.

◆ m_flatCurrent

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_flatCurrent
protected

The name of the current flat command.

Definition at line 151 of file dm.hpp.

◆ m_flatDefault

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_flatDefault
protected

The file name of the this DM's default flat command. Path and extension will be ignored and can be omitted.

Definition at line 105 of file dm.hpp.

◆ m_flatImageStream

template<class derivedT , typename realT >
IMAGE MagAOX::app::dev::dm< derivedT, realT >::m_flatImageStream
protected

The ImageStreamIO shared memory buffer for the flat.

Definition at line 156 of file dm.hpp.

◆ m_flatLoaded

template<class derivedT , typename realT >
bool MagAOX::app::dev::dm< derivedT, realT >::m_flatLoaded { false }
protected

Flag indicating whether a flat is loaded in memory.

Definition at line 154 of file dm.hpp.

◆ m_flatPath

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_flatPath
protected

The path to this DM's flat files (usually the same as calibPath)

Definition at line 100 of file dm.hpp.

◆ m_flatSet

template<class derivedT , typename realT >
bool MagAOX::app::dev::dm< derivedT, realT >::m_flatSet { false }
protected

Flag indicating whether the flat command has been set.

Definition at line 157 of file dm.hpp.

◆ m_indiP_flat

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_flat
protected

Property used to set and report the current flat.

Definition at line 588 of file dm.hpp.

◆ m_indiP_flats

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_flats
protected

INDI Selection switch containing the flat files.

Definition at line 594 of file dm.hpp.

◆ m_indiP_flatShmim

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_flatShmim
protected

Publish the shmim being used for the flat.

Definition at line 595 of file dm.hpp.

◆ m_indiP_init

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_init
protected

Definition at line 590 of file dm.hpp.

◆ m_indiP_release

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_release
protected

Definition at line 592 of file dm.hpp.

◆ m_indiP_setFlat

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_setFlat
protected

INDI toggle switch to set the current flat.

Definition at line 596 of file dm.hpp.

◆ m_indiP_setTest

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_setTest
protected

INDI toggle switch to set the current test pattern.

Definition at line 600 of file dm.hpp.

◆ m_indiP_tests

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_tests
protected

INDI Selection switch containing the test pattern files.

Definition at line 598 of file dm.hpp.

◆ m_indiP_testShmim

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_testShmim
protected

Publish the shmim being used for the test command.

Definition at line 599 of file dm.hpp.

◆ m_indiP_zero

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_zero
protected

Definition at line 591 of file dm.hpp.

◆ m_indiP_zeroAll

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_indiP_zeroAll
protected

Definition at line 602 of file dm.hpp.

◆ m_instSatMap

template<class derivedT , typename realT >
mx::improc::eigenImage<uint8_t> MagAOX::app::dev::dm< derivedT, realT >::m_instSatMap
protected

The instantaneous saturation map, 0/1, set by the commandDM() function of the derived class.

Definition at line 170 of file dm.hpp.

◆ m_intervalSatCountThreshold

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::m_intervalSatCountThreshold { 10 }
protected

Threshold on number of consecutive intervals the intervalSatThreshold is exceeded.

Definition at line 133 of file dm.hpp.

◆ m_intervalSatExceeds

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::m_intervalSatExceeds { 0 }
protected

Definition at line 183 of file dm.hpp.

◆ m_intervalSatThreshold

template<class derivedT , typename realT >
float MagAOX::app::dev::dm< derivedT, realT >::m_intervalSatThreshold { 0.50 }
protected

Threshold on percentage of actuators which exceed percThreshold in an interval.

Definition at line 130 of file dm.hpp.

◆ m_intervalSatTrip

template<class derivedT , typename realT >
bool MagAOX::app::dev::dm< derivedT, realT >::m_intervalSatTrip { 0 }
protected

Definition at line 184 of file dm.hpp.

◆ m_notDeltas

template<class derivedT , typename realT >
std::vector<size_t> MagAOX::app::dev::dm< derivedT, realT >::m_notDeltas
protected

Indices of the channels which are not delta commands.

Definition at line 191 of file dm.hpp.

◆ m_numChannels

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::m_numChannels { 0 }
protected

The number of dmcomb channels found as part of allocation.

Definition at line 146 of file dm.hpp.

◆ m_outputDelta

template<class derivedT , typename realT >
mx::improc::milkImage<realT> MagAOX::app::dev::dm< derivedT, realT >::m_outputDelta
protected

The true output delta command after saturation.

Definition at line 196 of file dm.hpp.

◆ m_outputDiff

template<class derivedT , typename realT >
mx::improc::milkImage<realT> MagAOX::app::dev::dm< derivedT, realT >::m_outputDiff
protected

The difference between command and true delta command after saturation.

Definition at line 198 of file dm.hpp.

◆ m_outputShape

template<class derivedT , typename realT >
mx::improc::milkImage<realT> MagAOX::app::dev::dm< derivedT, realT >::m_outputShape
protected

The true output shape after saturation.

Definition at line 186 of file dm.hpp.

◆ m_overSatAct

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::m_overSatAct { 0 }
protected

Definition at line 182 of file dm.hpp.

◆ m_percThreshold

template<class derivedT , typename realT >
float MagAOX::app::dev::dm< derivedT, realT >::m_percThreshold { 0.98 }
protected

Threshold on percentage of frames an actuator is saturated over an interval.

Definition at line 128 of file dm.hpp.

◆ m_satAvgInt

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::m_satAvgInt { 100 }
protected

The time in milliseconds to accumulate saturation over.

Definition at line 115 of file dm.hpp.

◆ m_satImageStream

template<class derivedT , typename realT >
IMAGE MagAOX::app::dev::dm< derivedT, realT >::m_satImageStream
protected

The ImageStreamIO shared memory buffer for the sat map.

Definition at line 179 of file dm.hpp.

◆ m_satPercImageStream

template<class derivedT , typename realT >
IMAGE MagAOX::app::dev::dm< derivedT, realT >::m_satPercImageStream
protected

The ImageStreamIO shared memory buffer for the sat percentage map.

Definition at line 180 of file dm.hpp.

◆ m_satPercMap

template<class derivedT , typename realT >
mx::improc::eigenImage<float> MagAOX::app::dev::dm< derivedT, realT >::m_satPercMap
protected

Map of the percentage of time each actuator was saturated during the avg. interval.

Definition at line 176 of file dm.hpp.

◆ m_satSemaphore

template<class derivedT , typename realT >
sem_t MagAOX::app::dev::dm< derivedT, realT >::m_satSemaphore
protected

Semaphore used to tell the saturation thread to run.

Definition at line 205 of file dm.hpp.

◆ m_satThread

template<class derivedT , typename realT >
std::thread MagAOX::app::dev::dm< derivedT, realT >::m_satThread
protected

A separate thread for the actual saturation processing.

Definition at line 213 of file dm.hpp.

◆ m_satThreadID

template<class derivedT , typename realT >
pid_t MagAOX::app::dev::dm< derivedT, realT >::m_satThreadID { 0 }
protected

The ID of the saturation thread.

Definition at line 209 of file dm.hpp.

◆ m_satThreadInit

template<class derivedT , typename realT >
bool MagAOX::app::dev::dm< derivedT, realT >::m_satThreadInit { true }
protected

Synchronizer for thread startup, to allow priority setting to finish.

Definition at line 207 of file dm.hpp.

◆ m_satThreadPrio

template<class derivedT , typename realT >
int MagAOX::app::dev::dm< derivedT, realT >::m_satThreadPrio { 0 }
protected

Priority of the saturation thread. Usually ok to be 0.

Definition at line 117 of file dm.hpp.

◆ m_satThreadProp

template<class derivedT , typename realT >
pcf::IndiProperty MagAOX::app::dev::dm< derivedT, realT >::m_satThreadProp
protected

The property to hold the saturation thread details.

Definition at line 211 of file dm.hpp.

◆ m_satTriggerDevice

template<class derivedT , typename realT >
std::vector<std::string> MagAOX::app::dev::dm< derivedT, realT >::m_satTriggerDevice
protected

Device(s) with a toggle switch to toggle on saturation trigger.

Definition at line 136 of file dm.hpp.

◆ m_satTriggerProperty

template<class derivedT , typename realT >
std::vector<std::string> MagAOX::app::dev::dm< derivedT, realT >::m_satTriggerProperty
protected

Property with a toggle switch to toggle on saturation trigger, one per entry in satTriggerDevice.

Definition at line 138 of file dm.hpp.

◆ m_shmimDelta

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_shmimDelta
protected

The name of the shmim stream to write the desaturated delta command to.

Definition at line 120 of file dm.hpp.

◆ m_shmimDiff

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_shmimDiff
protected

The name of the shmim stream to write the difference to.

Definition at line 121 of file dm.hpp.

◆ m_shmimFlat

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_shmimFlat
protected

The name of the shmim stream to write the flat to.

Definition at line 110 of file dm.hpp.

◆ m_shmimSat

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_shmimSat
protected

The name of the shmim stream to write the saturation map to.

Definition at line 112 of file dm.hpp.

◆ m_shmimSatPerc

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_shmimSatPerc
protected

The name of the shmim stream to write the saturation percentage map to.

Definition at line 113 of file dm.hpp.

◆ m_shmimShape

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_shmimShape
protected

The name of the shmim stream to write the desaturated true shape to.

Definition at line 119 of file dm.hpp.

◆ m_shmimTest

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_shmimTest
protected

The name of the shmim stream to write the test to.

Definition at line 111 of file dm.hpp.

◆ m_testCommand

template<class derivedT , typename realT >
mx::improc::eigenImage<realT> MagAOX::app::dev::dm< derivedT, realT >::m_testCommand
protected

Data storage for the test command.

Definition at line 164 of file dm.hpp.

◆ m_testCommands

template<class derivedT , typename realT >
std::map<std::string, std::string> MagAOX::app::dev::dm< derivedT, realT >::m_testCommands
protected

Map of test file name to full path.

Definition at line 161 of file dm.hpp.

◆ m_testCurrent

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_testCurrent
protected

Definition at line 162 of file dm.hpp.

◆ m_testDefault

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_testDefault
protected

The file name of the this DM's default test command. Path and extension will be ignored and can be omitted.

Definition at line 107 of file dm.hpp.

◆ m_testImageStream

template<class derivedT , typename realT >
IMAGE MagAOX::app::dev::dm< derivedT, realT >::m_testImageStream
protected

The ImageStreamIO shared memory buffer for the test.

Definition at line 167 of file dm.hpp.

◆ m_testLoaded

template<class derivedT , typename realT >
bool MagAOX::app::dev::dm< derivedT, realT >::m_testLoaded { false }
protected

Flag indicating whether a test command is loaded in memory.

Definition at line 165 of file dm.hpp.

◆ m_testPath

template<class derivedT , typename realT >
std::string MagAOX::app::dev::dm< derivedT, realT >::m_testPath
protected

The path to this DM's test files (default is calibPath/tests;.

Definition at line 101 of file dm.hpp.

◆ m_testSet

template<class derivedT , typename realT >
bool MagAOX::app::dev::dm< derivedT, realT >::m_testSet { false }
protected

Flag indicating whether the test command has been set.

Definition at line 168 of file dm.hpp.

◆ m_totalDelta

template<class derivedT , typename realT >
mx::improc::eigenImage<realT> MagAOX::app::dev::dm< derivedT, realT >::m_totalDelta
protected

the total of all delta channels

Definition at line 194 of file dm.hpp.

◆ m_totalFlat

template<class derivedT , typename realT >
mx::improc::eigenImage<realT> MagAOX::app::dev::dm< derivedT, realT >::m_totalFlat
protected

the total of all non-delta channels

Definition at line 193 of file dm.hpp.


The documentation for this class was generated from the following file: