API
MagAOX::app::pupilFit Class Reference

The MagAO-X Pyramid Pupil Fitter. More...

#include <pupilFit.hpp>

Inheritance diagram for MagAOX::app::pupilFit:
Inheritance graph
Collaboration diagram for MagAOX::app::pupilFit:
Collaboration graph

Public Types

typedef dev::shmimMonitor< pupilFitshmimMonitorT
 
typedef dev::shmimMonitor< pupilFit, refShmimTrefShmimMonitorT
 
typedef dev::frameGrabber< pupilFitframeGrabberT
 
typedef dev::telemeter< pupilFittelemeterT
 
typedef float realT
 Floating point type in which to do all calculations. More...
 
typedef logger::logManager< MagAOXApp< _useINDI >, logFileRawlogManagerT
 The log manager type. More...
 
enum  fgFlip
 
typedef logger::logManager< pupilFit, logFileRaw > logManagerT
 The log manager type. More...
 

Public Member Functions

 pupilFit ()
 Default c'tor. More...
 
 ~pupilFit () noexcept
 D'tor, declared and defined for noexcept. More...
 
virtual void setupConfig ()
 
int loadConfigImpl (mx::app::appConfigurator &_config)
 Implementation of loadConfig logic, separated for testing. More...
 
virtual void loadConfig ()
 
virtual int appStartup ()
 Startup function. More...
 
virtual int appLogic ()
 Implementation of the FSM for pupilFit. More...
 
virtual int appShutdown ()
 Shutdown the app. More...
 
int allocate (const dev::shmimT &)
 
int processImage (void *curr_src, const dev::shmimT &)
 
int allocate (const refShmimT &)
 
int processImage (void *curr_src, const refShmimT &)
 
int shutdown ()
 Get the value of the shutdown flag. More...
 
virtual void setDefaults (int argc, char **argv)
 Set the paths for config files. More...
 
virtual void setupBasicConfig ()
 The basic MagAO-X configuration setup method. Should not normally be overridden. More...
 
virtual void loadBasicConfig ()
 The basic MagAO-X configuration processing method. Should not normally be overridden. More...
 
virtual void checkConfig ()
 Check for unused and unrecognized config options and settings. More...
 
virtual int execute ()
 The execute method implementing the standard main loop. Should not normally be overridden. More...
 
void setupConfig (mx::app::appConfigurator &config)
 Setup the configuration system. More...
 
void loadConfig (mx::app::appConfigurator &config)
 load the configuration system results More...
 
void setupConfig (mx::app::appConfigurator &config)
 Setup the configuration system. More...
 
void loadConfig (mx::app::appConfigurator &config)
 load the configuration system results More...
 
void setupConfig (mx::app::appConfigurator &config)
 Setup the configuration system. More...
 
void loadConfig (mx::app::appConfigurator &config)
 load the configuration system results More...
 
int onPowerOff ()
 On power off, sets m_reconfig to true. More...
 
int telem (const typename telT::messageT &msg)
 Make a telemetry recording. More...
 
int telem ()
 Make a telemetry recording, for an empty record. More...
 
int setupConfig (appConfigurator &config)
 Setup an application configurator for the device section. More...
 
int loadConfig (appConfigurator &config)
 Load the device section from an application configurator. More...
 
int checkRecordTimes (const telT &tel, telTs... tels)
 Check the time of the last record for each telemetry type and make an entry if needed. More...
 
int checkRecordTimes (timespec &ts, const telT &tel, telTs... tels)
 Worker function to actually perform the record time checking logic. More...
 
int checkRecordTimes (timespec &ts)
 Empty function called at the end of the template list. More...
 
dev::frameGrabber interface
int configureAcquisition ()
 Implementation of the framegrabber configureAcquisition interface. More...
 
float fps ()
 Implementation of the framegrabber fps interface. More...
 
int startAcquisition ()
 Implementation of the framegrabber startAcquisition interface. More...
 
int acquireAndCheckValid ()
 Implementation of the framegrabber acquireAndCheckValid interface. More...
 
int loadImageIntoStream (void *dest)
 Implementation of the framegrabber loadImageIntoStream interface. More...
 
int reconfig ()
 Implementation of the framegrabber reconfig interface. More...
 
Threads
int threadStart (std::thread &thrd, bool &thrdInit, pid_t &tpid, pcf::IndiProperty &thProp, int thrdPrio, const std::string &cpuset, const std::string &thrdName, thisPtr *thrdThis, Function &&thrdStart)
 Start a thread, using this class's privileges to set priority, etc. More...
 
Member Accessors
std::string configName ()
 Get the config name. More...
 
std::string configDir ()
 Get the config directory. More...
 
std::string driverInName ()
 Get the INDI input FIFO file name. More...
 
std::string driverOutName ()
 Get the INDI output FIFO file name. More...
 
std::string driverCtrlName ()
 Get the INDI control FIFO file name. More...
 
Telemeter Interface
int recordFGTimings (bool force=false)
 

Public Attributes

logManagerT m_tel
 
double m_maxInterval
 The maximum interval, in seconds, between telemetry records. Default is 10.0 seconds. More...
 

Static Public Attributes

app::dev Configurations
static constexpr bool c_frameGrabber_flippable = false
 app:dev config to tell framegrabber these images can not be flipped More...
 

Protected Types

typedef uint16_t cbIndexT
 

Protected Member Functions

void * loadImageIntoStreamCopy (void *dest, void *src, size_t width, size_t height, size_t szof)
 
Telemeter Interface
int checkRecordTimes ()
 
int recordTelem (const telem_fgtimings *)
 

Protected Attributes

mx::improc::eigenImage< float > m_refIm
 
mx::improc::eigenImage< float > m_fitIm
 
mx::improc::eigenImage< float > m_edgeIm
 
pupilFitter< realTm_fitter
 
IMAGE m_threshShmim
 
bool m_threshShmimConnected {false}
 
IMAGE m_edgeShmim
 
bool m_edgeShmimConnected {false}
 
double m_defSetx1 {29.5}
 
double m_defSety1 {29.5}
 
double m_defSetD1 {56.0}
 
double m_defSetx2 {89.5}
 
double m_defSety2 {29.5}
 
double m_defSetD2 {56.0}
 
double m_defSetx3 {29.5}
 
double m_defSety3 {89.5}
 
double m_defSetD3 {56.0}
 
double m_defSetx4 {89.5}
 
double m_defSety4 {89.5}
 
double m_defSetD4 {56.0}
 
double m_userSetx1 {29.5}
 
double m_userSety1 {29.5}
 
double m_userSetD1 {56.0}
 
double m_userSetx2 {89.5}
 
double m_userSety2 {29.5}
 
double m_userSetD2 {56.0}
 
double m_userSetx3 {29.5}
 
double m_userSety3 {89.5}
 
double m_userSetD3 {56.0}
 
double m_userSetx4 {89.5}
 
double m_userSety4 {89.5}
 
double m_userSetD4 {56.0}
 
int m_setPointSource {USEDEFSET}
 
bool m_refUpdated {false}
 Flag set if the online reference update is used. More...
 
double m_setx1 {29.5}
 
double m_sety1 {29.5}
 
double m_setD1 {56.0}
 
double m_setx2 {89.5}
 
double m_sety2 {29.5}
 
double m_setD2 {56.0}
 
double m_setx3 {29.5}
 
double m_sety3 {89.5}
 
double m_setD3 {56.0}
 
double m_setx4 {89.5}
 
double m_sety4 {89.5}
 
double m_setD4 {56.0}
 
double m_avg_dx
 
double m_avg_dy
 
bool m_averaging {false}
 
size_t m_navg {0}
 
double m_avgx1_accum {0}
 
double m_avgx1sq_accum {0}
 
double m_avgy1_accum {0}
 
double m_avgy1sq_accum {0}
 
double m_avgD1_accum {0}
 
double m_avgD1sq_accum {0}
 
double m_avgmed1_accum {0}
 
double m_avgmed1sq_accum {0}
 
double m_avgx1 {0}
 
double m_varx1 {0}
 
double m_avgy1 {0}
 
double m_vary1 {0}
 
double m_avgD1 {0}
 
double m_varD1 {0}
 
double m_avgmed1 {0}
 
double m_varmed1 {0}
 
double m_avgx2_accum {0}
 
double m_avgx2sq_accum {0}
 
double m_avgy2_accum {0}
 
double m_avgy2sq_accum {0}
 
double m_avgD2_accum {0}
 
double m_avgD2sq_accum {0}
 
double m_avgmed2_accum {0}
 
double m_avgmed2sq_accum {0}
 
double m_avgx2 {0}
 
double m_varx2 {0}
 
double m_avgy2 {0}
 
double m_vary2 {0}
 
double m_avgD2 {0}
 
double m_varD2 {0}
 
double m_avgmed2 {0}
 
double m_varmed2 {0}
 
double m_avgx3_accum {0}
 
double m_avgx3sq_accum {0}
 
double m_avgy3_accum {0}
 
double m_avgy3sq_accum {0}
 
double m_avgD3_accum {0}
 
double m_avgD3sq_accum {0}
 
double m_avgmed3_accum {0}
 
double m_avgmed3sq_accum {0}
 
double m_avgx3 {0}
 
double m_varx3 {0}
 
double m_avgy3 {0}
 
double m_vary3 {0}
 
double m_avgD3 {0}
 
double m_varD3 {0}
 
double m_avgmed3 {0}
 
double m_varmed3 {0}
 
double m_avgx4_accum {0}
 
double m_avgx4sq_accum {0}
 
double m_avgy4_accum {0}
 
double m_avgy4sq_accum {0}
 
double m_avgD4_accum {0}
 
double m_avgD4sq_accum {0}
 
double m_avgmed4_accum {0}
 
double m_avgmed4sq_accum {0}
 
double m_avgx4 {0}
 
double m_varx4 {0}
 
double m_avgy4 {0}
 
double m_vary4 {0}
 
double m_avgD4 {0}
 
double m_varD4 {0}
 
double m_avgmed4 {0}
 
double m_varmed4 {0}
 
double m_avgxAll_accum {0}
 
double m_avgxAllsq_accum {0}
 
double m_avgyAll_accum {0}
 
double m_avgyAllsq_accum {0}
 
double m_avgDAll_accum {0}
 
double m_avgDAllsq_accum {0}
 
double m_avgmedAll_accum {0}
 
double m_avgmedAllsq_accum {0}
 
double m_avgxAll {0}
 
double m_varxAll {0}
 
double m_avgyAll {0}
 
double m_varyAll {0}
 
double m_avgDAll {0}
 
double m_varDAll {0}
 
double m_avgmedAll {0}
 
double m_varmedAll {0}
 
bool m_updated {false}
 
sem_t m_smSemaphore {0}
 Semaphore used to synchronize the fg thread and the sm thread. More...
 
std::string MagAOXPath
 The base path of the MagAO-X system. More...
 
std::string m_configName
 The name of the configuration file (minus .conf). More...
 
std::string m_configDir
 The path to configuration files for MagAOX. More...
 
std::string m_configBase
 The name of a base config class for this app (minus .conf). More...
 
std::string m_calibDir
 The path to calibration files for MagAOX. More...
 
std::string sysPath
 The path to the system directory, for PID file, etc. More...
 
std::string secretsPath
 Path to the secrets directory, where passwords, etc, are stored. More...
 
unsigned long m_loopPause
 The time in nanoseconds to pause the main loop. The appLogic() function of the derived class is called every m_loopPause nanoseconds. Default is 1,000,000,000 ns. Config with loopPause=X. More...
 
int m_shutdown
 Flag to signal it's time to shutdown. When not 0, the main loop exits. More...
 
bool m_getExistingFirst
 If set to true by derivedT, any existing image will be grabbed and sent to processImage before waiting on the semaphore. More...
 
int m_semaphoreNumber
 The image structure semaphore index. More...
 
uint32_t m_width
 The width of the images in the stream. More...
 
uint32_t m_height
 The height of the images in the stream. More...
 
uint32_t m_depth
 The depth of the circular buffer in the stream. More...
 
uint8_t m_dataType
 The ImageStreamIO type code. More...
 
size_t m_typeSize
 The size of the type, in bytes. Result of sizeof. More...
 
IMAGE m_imageStream
 The ImageStreamIO shared memory buffer. More...
 
ino_t m_inode
 The inode of the image stream file. More...
 
bool m_getExistingFirst
 If set to true by derivedT, any existing image will be grabbed and sent to processImage before waiting on the semaphore. More...
 
int m_semaphoreNumber
 The image structure semaphore index. More...
 
uint32_t m_width
 The width of the images in the stream. More...
 
uint32_t m_height
 The height of the images in the stream. More...
 
uint32_t m_depth
 The depth of the circular buffer in the stream. More...
 
uint8_t m_dataType
 The ImageStreamIO type code. More...
 
size_t m_typeSize
 The size of the type, in bytes. Result of sizeof. More...
 
IMAGE m_imageStream
 The ImageStreamIO shared memory buffer. More...
 
ino_t m_inode
 The inode of the image stream file. More...
 
int m_currentFlip
 
uint32_t m_width
 The width of the image, once deinterlaced etc. More...
 
uint32_t m_height
 The height of the image, once deinterlaced etc. More...
 
uint8_t m_dataType
 The ImageStreamIO type code. More...
 
size_t m_typeSize
 The size of the type, in bytes. Result of sizeof. More...
 
int m_xbinning
 The x-binning according to the framegrabber. More...
 
int m_ybinning
 The y-binning according to the framegrabber. More...
 
timespec m_currImageTimestamp
 The timestamp of the current image. More...
 
bool m_reconfig
 Flag to set if a camera reconfiguration requires a framegrabber reset. More...
 
IMAGE * m_imageStream
 The ImageStreamIO shared memory buffer. More...
 
mx::sigproc::circularBufferIndex< timespec, cbIndexTm_atimes
 
mx::sigproc::circularBufferIndex< timespec, cbIndexTm_wtimes
 
std::vector< double > m_atimesD
 
std::vector< double > m_wtimesD
 
std::vector< double > m_watimesD
 
timespec m_dummy_ts
 
uint64_t m_dummy_cnt
 
char m_dummy_c
 
double m_mna
 
double m_vara
 
double m_mnw
 
double m_varw
 
double m_mnwa
 
double m_varwa
 
Configurable Parameters
std::string m_threshShmimName {"camwfs_thresh"}
 The name of the image stream for the thresholded images. Default is camwfs_thresh. More...
 
std::string m_edgeShmimName {"camwfs_edge"}
 The name of the image stream for the edge images. Default is camwfs_edge. More...
 
float m_threshold {0.5}
 
int m_numPupils {4}
 The number of pupils. Default is 4. 3 is also supported. More...
 
cpusets

The path to the cpusets mount is configured by the environment varialbe defined by MAGOX_env_cpuset in environment.hpp. This environment varialbe is normally named "CGROUPS1_CPUSET_MOUNTPOINT". If the environment variable is not set, the default defined by MAGAOX_cpusetPath in paths.hpp is used. This is normally "/opt/MagAOX/cpuset/"

std::string m_cpusetPath
 
Configurable Parameters
std::string m_shmimName
 The name of the shared memory image, is used in /tmp/<shmimName>.im.shm. Derived classes should set a default. More...
 
int m_smThreadPrio
 Priority of the shmimMonitor thread, should normally be > 00. More...
 
std::string m_smCpuset
 The cpuset to assign the shmimMonitor thread to. Ignored if empty (the default). More...
 
std::string m_shmimName
 The name of the shared memory image, is used in /tmp/<shmimName>.im.shm. Derived classes should set a default. More...
 
int m_smThreadPrio
 Priority of the shmimMonitor thread, should normally be > 00. More...
 
std::string m_smCpuset
 The cpuset to assign the shmimMonitor thread to. Ignored if empty (the default). More...
 
Configurable Parameters
std::string m_shmimName
 The name of the shared memory image, is used in /tmp/<shmimName>.im.shm. Derived classes should set a default. More...
 
int m_fgThreadPrio
 Priority of the framegrabber thread, should normally be > 00. More...
 
std::string m_fgCpuset
 The cpuset to assign the framegrabber thread to. Not used if empty, the default. More...
 
uint32_t m_circBuffLength
 Length of the circular buffer, in frames. More...
 
uint16_t m_latencyCircBuffMaxLength
 Maximum length of the latency measurement circular buffers. More...
 
float m_latencyCircBuffMaxTime
 Maximum time of the latency meaurement circular buffers. More...
 
int m_defaultFlip
 

Private Member Functions

int clearFSMAlert ()
 Clear the FSM alert state. More...
 
pupilFitderived ()
 

Friends

class pupilFit_test
 
class dev::shmimMonitor< pupilFit >
 
class dev::shmimMonitor< pupilFit, refShmimT >
 
class dev::frameGrabber< pupilFit >
 
class dev::telemeter< pupilFit >
 

INDI Interface

For reference: "Get" and "New" refer to properties we own. "Set" refers to properties owned by others. So we respond to GetProperties by listing our own properties, and NewProperty is a request to change a property we own. Whereas SetProperty is a notification that someone else has changed a property.

typedef std::pair< std::string, indiCallBack > callBackValueType
 Value type of the indiCallBack map. More...
 
typedef std::unordered_map< std::string, indiCallBack >::iterator callBackIterator
 Iterator type of the indiCallBack map. More...
 
typedef std::pair< callBackIterator, bool > callBackInsertResult
 Return type of insert on the indiCallBack map. More...
 
std::unordered_map< std::string, indiCallBack > m_indiNewCallBacks
 Map to hold the NewProperty indiCallBacks for this App, with fast lookup by property name. More...
 
std::unordered_map< std::string, indiCallBack > m_indiSetCallBacks
 Map to hold the SetProperty indiCallBacks for this App, with fast lookup by property name. More...
 
bool m_allDefsReceived
 Flag indicating that all registered Set properties have been updated since last Get. More...
 
std::string m_driverInName
 Full path name of the INDI driver input FIFO. More...
 
std::string m_driverOutName
 Full path name of the INDI driver output FIFO. More...
 
std::string m_driverCtrlName
 Full path name of the INDI driver control FIFO. More...
 
pcf::IndiProperty m_indiP_state
 indi Property to report the application state. More...
 
pcf::IndiProperty m_indiP_clearFSMAlert
 indi Property to clear an FSM alert. More...
 
int createStandardIndiText (pcf::IndiProperty &prop, const std::string &propName, const std::string &label="", const std::string &group="")
 Create a standard R/W INDI Text property with target and current elements. More...
 
int createROIndiText (pcf::IndiProperty &prop, const std::string &propName, const std::string &elName, const std::string &propLabel="", const std::string &propGroup="", const std::string &elLabel="")
 Create a standard ReadOnly INDI Text property, with at least one element. More...
 
int createStandardIndiNumber (pcf::IndiProperty &prop, const std::string &name, const T &min, const T &max, const T &step, const std::string &format, const std::string &label="", const std::string &group="")
 Create a standard R/W INDI Number property with target and current elements. More...
 
int createROIndiNumber (pcf::IndiProperty &prop, const std::string &propName, const std::string &propLabel="", const std::string &propGroup="")
 Create a ReadOnly INDI Number property. More...
 
int createStandardIndiToggleSw (pcf::IndiProperty &prop, const std::string &name, const std::string &label="", const std::string &group="")
 Create a standard R/W INDI switch with a single toggle element. More...
 
int createStandardIndiRequestSw (pcf::IndiProperty &prop, const std::string &name, const std::string &label="", const std::string &group="")
 Create a standard R/W INDI switch with a single request element. More...
 
int createStandardIndiSelectionSw (pcf::IndiProperty &prop, const std::string &name, const std::vector< std::string > &elements, const std::vector< std::string > &elementLabels, const std::string &label="", const std::string &group="")
 Create a standard R/W INDI selection (one of many) switch with vector of elements and element labels. More...
 
int createStandardIndiSelectionSw (pcf::IndiProperty &prop, const std::string &name, const std::vector< std::string > &elements, const std::string &label="", const std::string &group="")
 Create a standard R/W INDI selection (one of many) switch with vector of elements using the element strings as their own labels. More...
 
int registerIndiPropertyReadOnly (pcf::IndiProperty &prop)
 Register an INDI property which is read only. More...
 
int registerIndiPropertyReadOnly (pcf::IndiProperty &prop, const std::string &propName, const pcf::IndiProperty::Type &propType, const pcf::IndiProperty::PropertyPermType &propPerm, const pcf::IndiProperty::PropertyStateType &propState)
 Register an INDI property which is read only. More...
 
int registerIndiPropertyNew (pcf::IndiProperty &prop, int(*)(void *, const pcf::IndiProperty &))
 Register an INDI property which is exposed for others to request a New Property for. More...
 
int registerIndiPropertyNew (pcf::IndiProperty &prop, const std::string &propName, const pcf::IndiProperty::Type &propType, const pcf::IndiProperty::PropertyPermType &propPerm, const pcf::IndiProperty::PropertyStateType &propState, int(*)(void *, const pcf::IndiProperty &))
 Register an INDI property which is exposed for others to request a New Property for. More...
 
int registerIndiPropertyNew (pcf::IndiProperty &prop, const std::string &propName, const pcf::IndiProperty::Type &propType, const pcf::IndiProperty::PropertyPermType &propPerm, const pcf::IndiProperty::PropertyStateType &propState, const pcf::IndiProperty::SwitchRuleType &propRule, int(*)(void *, const pcf::IndiProperty &))
 Register an INDI property which is exposed for others to request a New Property for, with a switch rule. More...
 
int registerIndiPropertySet (pcf::IndiProperty &prop, const std::string &devName, const std::string &propName, int(*)(void *, const pcf::IndiProperty &))
 Register an INDI property which is monitored for updates from others. More...
 
void sendGetPropertySetList (bool all=false)
 
void handleDefProperty (const pcf::IndiProperty &ipRecv)
 Handler for the DEF INDI properties notification. More...
 
void handleGetProperties (const pcf::IndiProperty &ipRecv)
 Handler for the get INDI properties request. More...
 
void handleNewProperty (const pcf::IndiProperty &ipRecv)
 Handler for the new INDI property request. More...
 
void handleSetProperty (const pcf::IndiProperty &ipRecv)
 Handler for the set INDI property request. More...
 
int createINDIFIFOS ()
 Create the INDI FIFOs. More...
 
int startINDI ()
 Start INDI Communications. More...
 
void updateIfChanged (pcf::IndiProperty &p, const std::string &el, const T &newVal, pcf::IndiProperty::PropertyStateType ipState=pcf::IndiProperty::Ok)
 Update an INDI property element value if it has changed. More...
 
void updateIfChanged (pcf::IndiProperty &p, const std::string &el, const char *newVal, pcf::IndiProperty::PropertyStateType ipState=pcf::IndiProperty::Ok)
 Update an INDI property element value if it has changed. More...
 
void updateIfChanged (pcf::IndiProperty &p, const std::string &el, const std::vector< T > &newVals, pcf::IndiProperty::PropertyStateType ipState=pcf::IndiProperty::Ok)
 Update an INDI property if values have changed. More...
 
void updateIfChanged (pcf::IndiProperty &p, const std::vector< std::string > &els, const std::vector< T > &newVals)
 Update an INDI property if values have changed. More...
 
void updateSwitchIfChanged (pcf::IndiProperty &p, const std::string &el, const pcf::IndiElement::SwitchStateType &newVal, pcf::IndiProperty::PropertyStateType ipState=pcf::IndiProperty::Ok)
 Update an INDI switch element value if it has changed. More...
 
int indiTargetUpdate (pcf::IndiProperty &localProperty, T &localTarget, const pcf::IndiProperty &remoteProperty, bool setBusy=true)
 Get the target element value from an new property. More...
 
int sendNewProperty (const pcf::IndiProperty &ipSend, const std::string &el, const T &newVal)
 Send a newProperty command to another device (using the INDI Client interface) More...
 
int sendNewProperty (const pcf::IndiProperty &ipSend)
 Send a newProperty command to another device (using the INDI Client interface) More...
 
int sendNewStandardIndiToggle (const std::string &device, const std::string &property, bool onoff)
 Send a new property commmand for a standard toggle switch. More...
 
int newCallBack_clearFSMAlert (const pcf::IndiProperty &ipRecv)
 The callback called by the static version, to actually process the FSM Alert Clear request. More...
 
constexpr static bool m_useINDI
 Flag controlling whether INDI is used. If false, then no INDI code executes. More...
 
indiDriver< MagAOXApp > * m_indiDriver
 The INDI driver wrapper. Constructed and initialized by execute, which starts and stops communications. More...
 
std::mutex m_indiMutex
 Mutex for locking INDI communications. More...
 
static int st_newCallBack_clearFSMAlert (void *app, const pcf::IndiProperty &ipRecv)
 The static callback function to be registered for requesting to clear the FSM alert. More...
 

Logging

static logManagerT m_log
 
void logMessage (bufferPtrT &b)
 Handle a log message from the logging system. More...
 
static int log (const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT)
 Make a log entry. More...
 
static int log (logPrioT level=logPrio::LOG_DEFAULT)
 Make a log entry. More...
 
static void configLog (const std::string &name, const int &code, const std::string &value, const std::string &source)
 Callback for config system logging. More...
 

INDI

pcf::IndiProperty m_indiP_thresh
 
pcf::IndiProperty m_indiP_averaging
 
pcf::IndiProperty m_indiP_numPupils
 
pcf::IndiProperty m_indiP_quad1
 
pcf::IndiProperty m_indiP_quad2
 
pcf::IndiProperty m_indiP_quad3
 
pcf::IndiProperty m_indiP_quad4
 
pcf::IndiProperty m_indiP_avg
 
pcf::IndiProperty m_indiP_reload
 
pcf::IndiProperty m_indiP_update
 
pcf::IndiProperty m_indiP_refmode
 
 INDI_NEWCALLBACK_DECL (pupilFit, m_indiP_thresh)
 
 INDI_NEWCALLBACK_DECL (pupilFit, m_indiP_averaging)
 
 INDI_NEWCALLBACK_DECL (pupilFit, m_indiP_reload)
 
 INDI_NEWCALLBACK_DECL (pupilFit, m_indiP_update)
 
 INDI_NEWCALLBACK_DECL (pupilFit, m_indiP_refmode)
 

PID Locking

Each MagAOXApp has a PID lock file in the system directory. The app will not startup if it detects that the PID is already locked, preventing duplicates. This is based on the configured name, not the invoked name (argv[0]).

std::string pidFileName
 The name of the PID file. More...
 
pid_t m_pid
 This process's PID. More...
 
int lockPID ()
 Attempt to lock the PID by writing it to a file. Fails if a process is already running with the same config name. More...
 
int unlockPID ()
 Remove the PID file. More...
 

Power Management

For devices which have remote power management (e.g. from one of the PDUs) we implement a standard power state monitoring and management component for the FSM. This needs to be enabled in the derived app constructor. To stay enabled, m_powerDevice and m_powerChannel must be not empty strings after the configuration. These could be set in the derived app defaults.

If power management is enabled, then while power is off, appLogic will not be called. Instead a parrallel set of virtual functions is called, onPowerOff (to allow apps to perform cleanup) and whilePowerOff (to allow apps to keep variables updated, etc). Note that these could merely call appLogic if desired.

bool m_powerMgtEnabled
 Flag controls whether power mgt is used. Set this in the constructor of a derived app. If true, then if after loadConfig the powerDevice and powerChannel are empty, then the app will exit with a critical error. More...
 
std::string m_powerDevice
 The INDI device name of the power controller. More...
 
std::string m_powerChannel
 The INDI property name of the channel controlling this device's power. More...
 
std::string m_powerElement
 The INDI element name to monitor for this device's power state. More...
 
std::string m_powerTargetElement
 The INDI element name to monitor for this device's power state. More...
 
unsigned long m_powerOnWait
 Time in sec to wait for device to boot after power on. More...
 
int m_powerOnCounter
 Counts numer of loops after power on, implements delay for device bootup. If -1, then device was NOT powered off on app startup. More...
 
int m_powerState
 Current power state, 1=On, 0=Off, -1=Unk. More...
 
int m_powerTargetState
 Current target power state, 1=On, 0=Off, -1=Unk. More...
 
pcf::IndiProperty m_indiP_powerChannel
 INDI property used to communicate power state. More...
 
int powerState ()
 Returns the current power state. More...
 
int powerStateTarget ()
 Returns the target power state. More...
 
 INDI_SETCALLBACK_DECL (MagAOXApp, m_indiP_powerChannel)
 
virtual int onPowerOff ()
 This method is called when the change to poweroff is detected. More...
 
virtual int whilePowerOff ()
 This method is called while the power is off, once per FSM loop. More...
 
bool powerOnWaitElapsed ()
 This method tests whether the power on wait time has elapsed. More...
 

SIGSEGV & SIGBUS signal handling

These signals occur as a result of a ImageStreamIO source server resetting (e.g. changing frame sizes). When they occur a restart of the shmim monitor thread main loops is triggered.

bool m_restart
 Flag indicating tha the shared memory should be reinitialized. More...
 
bool m_restart
 Flag indicating tha the shared memory should be reinitialized. More...
 
int setSigSegvHandler ()
 Sets the handler for SIGSEGV and SIGBUS. More...
 
void handlerSigSegv (int signum, siginfo_t *siginf, void *ucont)
 Handles SIGSEGV and SIGBUS. Sets m_restart to true. More...
 
int setSigSegvHandler ()
 Sets the handler for SIGSEGV and SIGBUS. More...
 
void handlerSigSegv (int signum, siginfo_t *siginf, void *ucont)
 Handles SIGSEGV and SIGBUS. Sets m_restart to true. More...
 
static shmimMonitor * m_selfMonitor
 Static pointer to this (set in constructor). Used for getting out of the static SIGSEGV handler. More...
 
static shmimMonitor * m_selfMonitor
 Static pointer to this (set in constructor). Used for getting out of the static SIGSEGV handler. More...
 
static void _handlerSigSegv (int signum, siginfo_t *siginf, void *ucont)
 The handler called when SIGSEGV or SIGBUS is received, which will be due to ImageStreamIO server resets. Just a wrapper for handlerSigSegv. More...
 
static void _handlerSigSegv (int signum, siginfo_t *siginf, void *ucont)
 The handler called when SIGSEGV or SIGBUS is received, which will be due to ImageStreamIO server resets. Just a wrapper for handlerSigSegv. More...
 

shmimmonitor Thread

This thread actually monitors the shared memory buffer

bool m_smThreadInit
 Synchronizer for thread startup, to allow priority setting to finish. More...
 
pid_t m_smThreadID
 The s.m. thread PID. More...
 
pcf::IndiProperty m_smThreadProp
 The property to hold the s.m. thread details. More...
 
std::thread m_smThread
 A separate thread for the actual monitoring. More...
 
bool m_smThreadInit
 Synchronizer for thread startup, to allow priority setting to finish. More...
 
pid_t m_smThreadID
 The s.m. thread PID. More...
 
pcf::IndiProperty m_smThreadProp
 The property to hold the s.m. thread details. More...
 
std::thread m_smThread
 A separate thread for the actual monitoring. More...
 
void smThreadExec ()
 Execute the monitoring thread. More...
 
void smThreadExec ()
 Execute the monitoring thread. More...
 
static void smThreadStart (shmimMonitor *s)
 Thread starter, called by MagAOXApp::threadStart on thread construction. Calls smThreadExec. More...
 
static void smThreadStart (shmimMonitor *s)
 Thread starter, called by MagAOXApp::threadStart on thread construction. Calls smThreadExec. More...
 

INDI

pcf::IndiProperty m_indiP_shmimName
 Property used to report the shmim buffer name. More...
 
pcf::IndiProperty m_indiP_frameSize
 Property used to report the current frame size. More...
 
pcf::IndiProperty m_indiP_shmimName
 Property used to report the shmim buffer name. More...
 
pcf::IndiProperty m_indiP_frameSize
 Property used to report the current frame size. More...
 
int updateINDI ()
 Update the INDI properties for this device controller. More...
 
int updateINDI ()
 Update the INDI properties for this device controller. More...
 

Framegrabber Thread

This thread actually manages the framegrabbing hardware

bool m_fgThreadInit
 Synchronizer for thread startup, to allow priority setting to finish. More...
 
pid_t m_fgThreadID
 The ID of the framegrabber thread. More...
 
pcf::IndiProperty m_fgThreadProp
 The property to hold the f.g. thread details. More...
 
std::thread m_fgThread
 A separate thread for the actual framegrabbings. More...
 
void fgThreadExec ()
 Execute framegrabbing. More...
 
static void fgThreadStart (frameGrabber *o)
 Thread starter, called by MagAOXApp::threadStart on thread construction. Calls fgThreadExec. More...
 

INDI

pcf::IndiProperty m_indiP_shmimName
 Property used to report the shmim buffer name. More...
 
pcf::IndiProperty m_indiP_frameSize
 Property used to report the current frame size. More...
 
pcf::IndiProperty m_indiP_timing
 
int updateINDI ()
 Update the INDI properties for this device controller. More...
 

Application State

stateCodes::stateCodeT state ()
 Get the current state code. More...
 
void state (const stateCodes::stateCodeT &s, bool stateAlert=false)
 Set the current state code. More...
 
int stateLogged ()
 Updates and returns the value of m_stateLogged. Will be 0 on first call after a state change, >0 afterwards. More...
 
stateCodes::stateCodeT m_state
 The application's state. Never ever set this directly, use state(const stateCodeT & s). More...
 
bool m_stateAlert
 
bool m_gitAlert
 
int m_stateLogged
 Counter and flag for use to log errors just once. Never ever access directly, use stateLogged(). More...
 

Signal Handling

libMagAOX/logger/types/software_log.hpp

static MagAOXAppm_self
 Static pointer to this (set in constructor). Used to test whether a a MagAOXApp is already instatiated (a fatal error) and used for getting out of static signal handlers. More...
 
static void _handlerSigTerm (int signum, siginfo_t *siginf, void *ucont)
 The handler called when SIGTERM, SIGQUIT, or SIGINT is received. Just a wrapper for handlerSigTerm. More...
 
int setSigTermHandler ()
 Sets the handler for SIGTERM, SIGQUIT, and SIGINT. More...
 
void handlerSigTerm (int signum, siginfo_t *siginf, void *ucont)
 Handles SIGTERM, SIGQUIT, and SIGINT. Sets m_shutdown to 1 and logs the signal. More...
 

Privilege Management

uid_t m_euidReal
 The real user id of the proces (i.e. the lower privileged id of the user) More...
 
uid_t m_euidCalled
 The user id of the process as called (i.e. the higher privileged id of the owner, root if setuid). More...
 
uid_t m_suid
 The save-set user id of the process. More...
 
int setEuidCalled ()
 Set the effective user ID to the called value, i.e. the highest possible. More...
 
int setEuidReal ()
 Set the effective user ID to the real value, i.e. the file owner. More...
 

Detailed Description

The MagAO-X Pyramid Pupil Fitter.

Definition at line 54 of file pupilFit.hpp.

Member Typedef Documentation

◆ callBackInsertResult

typedef std::pair<callBackIterator,bool> MagAOX::app::MagAOXApp< _useINDI >::callBackInsertResult
inherited

Return type of insert on the indiCallBack map.

Definition at line 561 of file MagAOXApp.hpp.

◆ callBackIterator

typedef std::unordered_map<std::string, indiCallBack>::iterator MagAOX::app::MagAOXApp< _useINDI >::callBackIterator
inherited

Iterator type of the indiCallBack map.

Definition at line 558 of file MagAOXApp.hpp.

◆ callBackValueType

typedef std::pair<std::string, indiCallBack> MagAOX::app::MagAOXApp< _useINDI >::callBackValueType
inherited

Value type of the indiCallBack map.

Definition at line 555 of file MagAOXApp.hpp.

◆ cbIndexT

typedef uint16_t MagAOX::app::dev::frameGrabber< pupilFit >::cbIndexT
protectedinherited

Definition at line 120 of file frameGrabber.hpp.

◆ frameGrabberT

◆ logManagerT [1/2]

The log manager type.

Definition at line 54 of file telemeter.hpp.

◆ logManagerT [2/2]

typedef logger::logManager<MagAOXApp<_useINDI>, logFileRaw> MagAOX::app::MagAOXApp< _useINDI >::logManagerT
inherited

The log manager type.

Definition at line 82 of file MagAOXApp.hpp.

◆ realT

Floating point type in which to do all calculations.

Definition at line 78 of file pupilFit.hpp.

◆ refShmimMonitorT

◆ shmimMonitorT

◆ telemeterT

Member Enumeration Documentation

◆ fgFlip

Definition at line 81 of file frameGrabber.hpp.

Constructor & Destructor Documentation

◆ pupilFit()

MagAOX::app::pupilFit::pupilFit ( )
inline

Default c'tor.

Definition at line 445 of file pupilFit.hpp.

◆ ~pupilFit()

MagAOX::app::pupilFit::~pupilFit ( )
inlinenoexcept

D'tor, declared and defined for noexcept.

Definition at line 452 of file pupilFit.hpp.

Member Function Documentation

◆ _handlerSigSegv() [1/2]

void MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::_handlerSigSegv ( int  signum,
siginfo_t *  siginf,
void *  ucont 
)
staticprotectedinherited

The handler called when SIGSEGV or SIGBUS is received, which will be due to ImageStreamIO server resets. Just a wrapper for handlerSigSegv.

Definition at line 185 of file shmimMonitor.hpp.

◆ _handlerSigSegv() [2/2]

void MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::_handlerSigSegv ( int  signum,
siginfo_t *  siginf,
void *  ucont 
)
staticprotectedinherited

The handler called when SIGSEGV or SIGBUS is received, which will be due to ImageStreamIO server resets. Just a wrapper for handlerSigSegv.

Definition at line 185 of file shmimMonitor.hpp.

◆ _handlerSigTerm()

void MagAOX::app::MagAOXApp< _useINDI >::_handlerSigTerm ( int  signum,
siginfo_t *  siginf,
void *  ucont 
)
staticprivateinherited

The handler called when SIGTERM, SIGQUIT, or SIGINT is received. Just a wrapper for handlerSigTerm.

Parameters
[in]signumspecifies the signal.
[in]siginfignored by MagAOXApp
[in]ucontignored by MagAOXApp

Definition at line 297 of file MagAOXApp.hpp.

◆ acquireAndCheckValid()

int MagAOX::app::pupilFit::acquireAndCheckValid ( )
inline

Implementation of the framegrabber acquireAndCheckValid interface.

Returns
0 on success
-1 on error

Definition at line 1316 of file pupilFit.hpp.

◆ allocate() [1/2]

int MagAOX::app::pupilFit::allocate ( const dev::shmimT dummy)
inline

Definition at line 783 of file pupilFit.hpp.

◆ allocate() [2/2]

int MagAOX::app::pupilFit::allocate ( const refShmimT dummy)
inline

Definition at line 1262 of file pupilFit.hpp.

◆ appLogic()

int MagAOX::app::pupilFit::appLogic ( )
inlinevirtual

Implementation of the FSM for pupilFit.

Returns
0 on no critical error
-1 on an error requiring shutdown

Implements MagAOX::app::MagAOXApp< true >.

Definition at line 715 of file pupilFit.hpp.

◆ appShutdown()

int MagAOX::app::pupilFit::appShutdown ( )
inlinevirtual

Shutdown the app.

Implements MagAOX::app::MagAOXApp< true >.

Definition at line 772 of file pupilFit.hpp.

◆ appStartup()

int MagAOX::app::pupilFit::appStartup ( )
inlinevirtual

Startup function.

Implements MagAOX::app::MagAOXApp< true >.

Definition at line 544 of file pupilFit.hpp.

◆ checkConfig()

void MagAOX::app::MagAOXApp< _useINDI >::checkConfig
virtualinherited

Check for unused and unrecognized config options and settings.

Logs the unused targets as warnings. Unrecognized and unused options are logged as critical, and m_shutdown is set. Any command line argument (not an option) will also be critical and cause shutdown.

Definition at line 174 of file MagAOXApp.hpp.

◆ checkRecordTimes() [1/4]

int MagAOX::app::pupilFit::checkRecordTimes ( )
inlineprotected

Definition at line 1573 of file pupilFit.hpp.

◆ checkRecordTimes() [2/4]

int MagAOX::app::dev::telemeter< pupilFit >::checkRecordTimes ( const telT &  tel,
telTs...  tels 
)
inherited

Check the time of the last record for each telemetry type and make an entry if needed.

This must be called from derivedT::checkRecordTimes(), with one template parameter for ach telemetry log type being recorded.

Returns
0 on succcess
-1 on error
Parameters
[in]tel[unused] object of the telemetry type to record
[in]tels[unused] objects of the additional telemetry types to record

Definition at line 131 of file telemeter.hpp.

◆ checkRecordTimes() [3/4]

int MagAOX::app::dev::telemeter< pupilFit >::checkRecordTimes ( timespec &  ts)
inherited

Empty function called at the end of the template list.

Returns
0 on succcess
-1 on error
Parameters
[in]ts[unused] the timestamp that records are compared to

Definition at line 152 of file telemeter.hpp.

◆ checkRecordTimes() [4/4]

int MagAOX::app::dev::telemeter< pupilFit >::checkRecordTimes ( timespec &  ts,
const telT &  tel,
telTs...  tels 
)
inherited

Worker function to actually perform the record time checking logic.

Recursively calls itself until the variadic template list is exhausted.

Returns
0 on succcess
-1 on error
Parameters
[in]ts[unused] the timestamp that records are compared to
[in]tel[unused] objects of the telemetry type to record
[in]tels[unused] objects of the additional telemetry types to record

Definition at line 142 of file telemeter.hpp.

◆ clearFSMAlert()

int MagAOX::app::MagAOXApp< _useINDI >::clearFSMAlert
privateinherited

Clear the FSM alert state.

This can only be done from within this class, and this should only be possible via user action via INDI.

Definition at line 519 of file MagAOXApp.hpp.

◆ configDir()

std::string MagAOX::app::MagAOXApp< _useINDI >::configDir
inherited

Get the config directory.

Returns
the current value of m_configDir

Definition at line 1064 of file MagAOXApp.hpp.

◆ configLog()

void MagAOX::app::MagAOXApp< _useINDI >::configLog ( const std::string &  name,
const int &  code,
const std::string &  value,
const std::string &  source 
)
staticprivateinherited

Callback for config system logging.

Called by appConfigurator each time a value is set using the config() operator. You never need to call this directly.

Parameters
[in]nameThe name of the config value
[in]codenumeric code specifying the type
[in]valuethe value read by the config system
[in]sourcethe source of the value.

Definition at line 278 of file MagAOXApp.hpp.

◆ configName()

std::string MagAOX::app::MagAOXApp< _useINDI >::configName
inherited

Get the config name.

Returns
the current value of m_configName

Definition at line 1058 of file MagAOXApp.hpp.

◆ configureAcquisition()

int MagAOX::app::pupilFit::configureAcquisition ( )
inline

Implementation of the framegrabber configureAcquisition interface.

Returns
0 on success
-1 on error

Definition at line 1298 of file pupilFit.hpp.

◆ createINDIFIFOS()

int MagAOX::app::MagAOXApp< _useINDI >::createINDIFIFOS
protectedinherited

Create the INDI FIFOs.

Changes permissions to max available and creates the FIFOs at the configured path.

Todo:
make driver FIFO path full configurable.

Definition at line 776 of file MagAOXApp.hpp.

◆ createROIndiNumber()

int MagAOX::app::MagAOXApp< _useINDI >::createROIndiNumber ( pcf::IndiProperty &  prop,
const std::string &  propName,
const std::string &  propLabel = "",
const std::string &  propGroup = "" 
)
inherited

Create a ReadOnly INDI Number property.

Returns
0 on success
-1 on error
Parameters
[out]propthe property to create and setup
[in]propNamethe name of the property
[in]propLabel[optional] the GUI label suggestion for this property
[in]propGroup[optional] the group for this property

Definition at line 636 of file MagAOXApp.hpp.

◆ createROIndiText()

int MagAOX::app::MagAOXApp< _useINDI >::createROIndiText ( pcf::IndiProperty &  prop,
const std::string &  propName,
const std::string &  elName,
const std::string &  propLabel = "",
const std::string &  propGroup = "",
const std::string &  elLabel = "" 
)
inherited

Create a standard ReadOnly INDI Text property, with at least one element.

Returns
0 on success
-1 on error
Parameters
[out]propthe property to create and setup
[in]propNamethe name of the property
[in]elNamethe name of the element
[in]propLabel[optional] the GUI label suggestion for this property
[in]propGroup[optional] the group for this property
[in]elLabel[optional] the GUI label suggestion for the element

Definition at line 607 of file MagAOXApp.hpp.

◆ createStandardIndiNumber()

int MagAOX::app::MagAOXApp< _useINDI >::createStandardIndiNumber ( pcf::IndiProperty &  prop,
const std::string &  name,
const T &  min,
const T &  max,
const T &  step,
const std::string &  format,
const std::string &  label = "",
const std::string &  group = "" 
)
inherited

Create a standard R/W INDI Number property with target and current elements.

Returns
0 on success
-1 on error
Parameters
[out]propthe property to create and setup
[in]namethe name of the property
[in]minthe minimum value for the elements, applied to both target and current
[in]maxthe minimum value for the elements, applied to both target and current
[in]stepthe step size for the elements, applied to both target and current
[in]formatthe _ value for the elements, applied to both target and current. Set to "" to use the MagAO-X standard for type.
[in]label[optional] the GUI label suggestion for this property
[in]group[optional] the group for this property

Definition at line 621 of file MagAOXApp.hpp.

◆ createStandardIndiRequestSw()

int MagAOX::app::MagAOXApp< _useINDI >::createStandardIndiRequestSw ( pcf::IndiProperty &  prop,
const std::string &  name,
const std::string &  label = "",
const std::string &  group = "" 
)
inherited

Create a standard R/W INDI switch with a single request element.

This switch is intended to function like a momentary switch.

Returns
0 on success
-1 on error
Parameters
[out]propthe property to create and setup
[in]namethe name of the property
[in]label[optional] the GUI label suggestion for this property
[in]group[optional] the group for this property

Definition at line 660 of file MagAOXApp.hpp.

◆ createStandardIndiSelectionSw() [1/2]

int MagAOX::app::MagAOXApp< _useINDI >::createStandardIndiSelectionSw ( pcf::IndiProperty &  prop,
const std::string &  name,
const std::vector< std::string > &  elements,
const std::string &  label = "",
const std::string &  group = "" 
)
inherited

Create a standard R/W INDI selection (one of many) switch with vector of elements using the element strings as their own labels.

This switch is intended to function like drop down menu.

Returns
0 on success
-1 on error
Parameters
[out]propthe property to create and setup
[in]namethe name of the property,
[in]elementsthe element names to give to the switches
[in]label[optional] the GUI label suggestion for this property
[in]group[optional] the group for this property

Definition at line 686 of file MagAOXApp.hpp.

◆ createStandardIndiSelectionSw() [2/2]

int MagAOX::app::MagAOXApp< _useINDI >::createStandardIndiSelectionSw ( pcf::IndiProperty &  prop,
const std::string &  name,
const std::vector< std::string > &  elements,
const std::vector< std::string > &  elementLabels,
const std::string &  label = "",
const std::string &  group = "" 
)
inherited

Create a standard R/W INDI selection (one of many) switch with vector of elements and element labels.

This switch is intended to function like drop down menu.

Returns
0 on success
-1 on error
Parameters
[out]propthe property to create and setup
[in]namethe name of the property,
[in]elementsthe element names to give to the switches
[in]elementLabelsthe element labels to give to the switches
[in]label[optional] the GUI label suggestion for this property
[in]group[optional] the group for this property

Definition at line 672 of file MagAOXApp.hpp.

◆ createStandardIndiText()

int MagAOX::app::MagAOXApp< _useINDI >::createStandardIndiText ( pcf::IndiProperty &  prop,
const std::string &  propName,
const std::string &  label = "",
const std::string &  group = "" 
)
inherited

Create a standard R/W INDI Text property with target and current elements.

Returns
0 on success
-1 on error
Parameters
[out]propthe property to create and setup
[in]propNamethe name of the property
[in]label[optional] the GUI label suggestion for this property
[in]group[optional] the group for this property

Definition at line 596 of file MagAOXApp.hpp.

◆ createStandardIndiToggleSw()

int MagAOX::app::MagAOXApp< _useINDI >::createStandardIndiToggleSw ( pcf::IndiProperty &  prop,
const std::string &  name,
const std::string &  label = "",
const std::string &  group = "" 
)
inherited

Create a standard R/W INDI switch with a single toggle element.

This switch is intended to function like an on/off toggle switch.

Returns
0 on success
-1 on error
Parameters
[out]propthe property to create and setup
[in]namethe name of the property
[in]label[optional] the GUI label suggestion for this property
[in]group[optional] the group for this property

Definition at line 648 of file MagAOXApp.hpp.

◆ derived()

pupilFit & MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::derived ( )
inlineprivateinherited

Definition at line 246 of file shmimMonitor.hpp.

◆ driverCtrlName()

std::string MagAOX::app::MagAOXApp< _useINDI >::driverCtrlName
inherited

Get the INDI control FIFO file name.

Returns
the current value of m_driverCtrlName

Definition at line 1082 of file MagAOXApp.hpp.

◆ driverInName()

std::string MagAOX::app::MagAOXApp< _useINDI >::driverInName
inherited

Get the INDI input FIFO file name.

Returns
the current value of m_driverInName

Definition at line 1070 of file MagAOXApp.hpp.

◆ driverOutName()

std::string MagAOX::app::MagAOXApp< _useINDI >::driverOutName
inherited

Get the INDI output FIFO file name.

Returns
the current value of m_driverOutName

Definition at line 1076 of file MagAOXApp.hpp.

◆ execute()

int MagAOX::app::MagAOXApp< _useINDI >::execute ( void  )
virtualinherited

The execute method implementing the standard main loop. Should not normally be overridden.

Performs final startup steps. That is:

Errors in the above steps will cause a process exit.

Then commences the main event loop. Conditions on entry to the main loop:

  • PID locked
  • Log thread running
  • Signal handling installed
  • appStartup successful
  • INDI communications started successfully (if being used)
  • power state known (if being managed)

In the event loop, the power state is checked (if being managed). If power is off, then onPowerOff is called. If power is on, or power is not managed, appLogic is called. These methods are implemented in derived classes, and are called every m_loopPause interval.

If an error is returned by either onPowerOff or appLogic, or a signal is handled, then the shutdown is managed. This includes shutting down INDI, calling appShutdown, and unlocking the PID. The log thread will shutdown.

Todo:
Need a heartbeat update here.

Definition at line 204 of file MagAOXApp.hpp.

◆ fgThreadExec()

void MagAOX::app::dev::frameGrabber< pupilFit >::fgThreadExec
protectedinherited

Execute framegrabbing.

Todo:
this ought to wait until OPERATING, using READY as a sign of "not integrating"

Definition at line 236 of file frameGrabber.hpp.

◆ fgThreadStart()

void MagAOX::app::dev::frameGrabber< pupilFit >::fgThreadStart ( frameGrabber< pupilFit > *  o)
staticprotectedinherited

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

Parameters
[in]oa pointer to a frameGrabber instance (normally this)

Definition at line 233 of file frameGrabber.hpp.

◆ fps()

float MagAOX::app::pupilFit::fps ( )
inline

Implementation of the framegrabber fps interface.

Todo:
this needs to infer the stream fps and return it

Definition at line 365 of file pupilFit.hpp.

◆ handleDefProperty()

void MagAOX::app::MagAOXApp< _useINDI >::handleDefProperty ( const pcf::IndiProperty &  ipRecv)
inherited

Handler for the DEF INDI properties notification.

Uses the properties registered in m_indiSetCallBacks to process the notification. This is called by m_indiDriver's indiDriver::handleDefProperties.

Parameters
[in]ipRecvThe property being sent.

Definition at line 793 of file MagAOXApp.hpp.

◆ handleGetProperties()

void MagAOX::app::MagAOXApp< _useINDI >::handleGetProperties ( const pcf::IndiProperty &  ipRecv)
inherited

Handler for the get INDI properties request.

Uses the properties registered in m_indiCallBacks to respond to the request. This is called by m_indiDriver's indiDriver::handleGetProperties.

Parameters
[in]ipRecvThe property being requested.

Definition at line 799 of file MagAOXApp.hpp.

◆ handleNewProperty()

void MagAOX::app::MagAOXApp< _useINDI >::handleNewProperty ( const pcf::IndiProperty &  ipRecv)
inherited

Handler for the new INDI property request.

Uses the properties registered in m_indiCallBacks to respond to the request, looking up the callback for this property and calling it.

This is called by m_indiDriver's indiDriver::handleGetProperties.

Todo:
handle errors, are they FATAL?
Parameters
[in]ipRecvThe property being changed.

Definition at line 809 of file MagAOXApp.hpp.

◆ handlerSigSegv() [1/2]

void MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::handlerSigSegv ( int  signum,
siginfo_t *  siginf,
void *  ucont 
)
protectedinherited

Handles SIGSEGV and SIGBUS. Sets m_restart to true.

Definition at line 191 of file shmimMonitor.hpp.

◆ handlerSigSegv() [2/2]

void MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::handlerSigSegv ( int  signum,
siginfo_t *  siginf,
void *  ucont 
)
protectedinherited

Handles SIGSEGV and SIGBUS. Sets m_restart to true.

Definition at line 191 of file shmimMonitor.hpp.

◆ handlerSigTerm()

void MagAOX::app::MagAOXApp< _useINDI >::handlerSigTerm ( int  signum,
siginfo_t *  siginf,
void *  ucont 
)
privateinherited

Handles SIGTERM, SIGQUIT, and SIGINT. Sets m_shutdown to 1 and logs the signal.

Parameters
[in]signumspecifies the signal.
[in]siginfignored by MagAOXApp
[in]ucontignored by MagAOXApp

Definition at line 303 of file MagAOXApp.hpp.

◆ handleSetProperty()

void MagAOX::app::MagAOXApp< _useINDI >::handleSetProperty ( const pcf::IndiProperty &  ipRecv)
inherited

Handler for the set INDI property request.

This is called by m_indiDriver's indiDriver::handleSetProperties.

Todo:
handle errors, are they FATAL?
Todo:
log an error here because callBack should not be null
Todo:
log invalid SetProperty request.
Parameters
[in]ipRecvThe property being changed.

Definition at line 818 of file MagAOXApp.hpp.

◆ INDI_NEWCALLBACK_DECL() [1/5]

MagAOX::app::pupilFit::INDI_NEWCALLBACK_DECL ( pupilFit  ,
m_indiP_averaging   
)
protected

◆ INDI_NEWCALLBACK_DECL() [2/5]

MagAOX::app::pupilFit::INDI_NEWCALLBACK_DECL ( pupilFit  ,
m_indiP_refmode   
)
protected

◆ INDI_NEWCALLBACK_DECL() [3/5]

MagAOX::app::pupilFit::INDI_NEWCALLBACK_DECL ( pupilFit  ,
m_indiP_reload   
)
protected

◆ INDI_NEWCALLBACK_DECL() [4/5]

MagAOX::app::pupilFit::INDI_NEWCALLBACK_DECL ( pupilFit  ,
m_indiP_thresh   
)
protected

◆ INDI_NEWCALLBACK_DECL() [5/5]

MagAOX::app::pupilFit::INDI_NEWCALLBACK_DECL ( pupilFit  ,
m_indiP_update   
)
protected

◆ INDI_SETCALLBACK_DECL()

MagAOX::app::MagAOXApp< _useINDI >::INDI_SETCALLBACK_DECL ( MagAOXApp< true >  ,
m_indiP_powerChannel   
)
inherited

◆ indiTargetUpdate()

int MagAOX::app::MagAOXApp< _useINDI >::indiTargetUpdate ( pcf::IndiProperty &  localProperty,
T &  localTarget,
const pcf::IndiProperty &  remoteProperty,
bool  setBusy = true 
)
protectedinherited

Get the target element value from an new property.

Returns
0 on success
-1 on error
Parameters
[out]localPropertyThe local property to update
[out]localTargetThe local value to update
[in]remotePropertythe new property received
[in]setBusy[optional] set property to busy if true

Definition at line 908 of file MagAOXApp.hpp.

◆ loadBasicConfig()

void MagAOX::app::MagAOXApp< _useINDI >::loadBasicConfig
virtualinherited

The basic MagAO-X configuration processing method. Should not normally be overridden.

This method processes the standard MagAO-X key=value pairs.

Though it is virtual, it should not normally be overridden unless you need to depart from the MagAO-X standard.

Processing of app specific config goes in loadConfig() implemented by the derived class.

Definition at line 168 of file MagAOXApp.hpp.

◆ loadConfig() [1/5]

void MagAOX::app::pupilFit::loadConfig ( )
inlinevirtual

Definition at line 538 of file pupilFit.hpp.

◆ loadConfig() [2/5]

int MagAOX::app::dev::telemeter< pupilFit >::loadConfig ( appConfigurator &  config)
inherited

Load the device section from an application configurator.

Returns
0 on success
-1 on error (nothing implemented yet)
Parameters
[in]configan application configuration from which to load values

Definition at line 95 of file telemeter.hpp.

◆ loadConfig() [3/5]

void MagAOX::app::dev::frameGrabber< pupilFit >::loadConfig ( mx::app::appConfigurator &  config)
inherited

load the configuration system results

This should be called in derivedT::loadConfig as

framegrabber<derivedT>::loadConfig(config);

with appropriate error checking.

Parameters
[in]configthe derived classes configurator

Definition at line 165 of file frameGrabber.hpp.

◆ loadConfig() [4/5]

void MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::loadConfig ( mx::app::appConfigurator &  config)
inherited

load the configuration system results

This should be called in derivedT::loadConfig as

shmimMonitor<derivedT, specificT>::loadConfig(config);

with appropriate error checking.

Parameters
[in]configthe derived classes configurator

Definition at line 128 of file shmimMonitor.hpp.

◆ loadConfig() [5/5]

void MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::loadConfig ( mx::app::appConfigurator &  config)
inherited

load the configuration system results

This should be called in derivedT::loadConfig as

shmimMonitor<derivedT, specificT>::loadConfig(config);

with appropriate error checking.

Parameters
[in]configthe derived classes configurator

Definition at line 128 of file shmimMonitor.hpp.

◆ loadConfigImpl()

int MagAOX::app::pupilFit::loadConfigImpl ( mx::app::appConfigurator &  _config)
inline

Implementation of loadConfig logic, separated for testing.

This is called by loadConfig().

Parameters
[in]_configan application configuration from which to load values

Definition at line 501 of file pupilFit.hpp.

Referenced by loadConfig().

◆ loadImageIntoStream()

int MagAOX::app::pupilFit::loadImageIntoStream ( void *  dest)
inline

Implementation of the framegrabber loadImageIntoStream interface.

Returns
0 on success
-1 on error
Parameters
[in]dest

Definition at line 1347 of file pupilFit.hpp.

◆ loadImageIntoStreamCopy()

void * MagAOX::app::dev::frameGrabber< pupilFit >::loadImageIntoStreamCopy ( void *  dest,
void *  src,
size_t  width,
size_t  height,
size_t  szof 
)
protectedinherited

Definition at line 241 of file frameGrabber.hpp.

◆ lockPID()

int MagAOX::app::MagAOXApp< _useINDI >::lockPID
protectedinherited

Attempt to lock the PID by writing it to a file. Fails if a process is already running with the same config name.

First checks the PID file for an existing PID. If found, interrogates /proc to determine if that process is running and if so if the command line matches. If a matching process is currently running, then this returns an error.

Will not fail if a PID file exists but the stored PID does not correspond to a running process with the same command line name.

Reference: https://linux.die.net/man/3/getpid

Returns
0 on success.
-1 on any error, including creating the PID file or if this app is already running.

Definition at line 407 of file MagAOXApp.hpp.

◆ log() [1/2]

int MagAOX::app::MagAOXApp< _useINDI >::log ( const typename logT::messageT &  msg,
logPrioT  level = logPrio::LOG_DEFAULT 
)
staticinherited

Make a log entry.

Wrapper for logManager::log

Template Parameters
logTthe log entry type
retvalthe value returned by this method.
Parameters
[in]msgthe message to log
[in]level[optional] the log level. The default is used if not specified.

Definition at line 252 of file MagAOXApp.hpp.

◆ log() [2/2]

int MagAOX::app::MagAOXApp< _useINDI >::log ( logPrioT  level = logPrio::LOG_DEFAULT)
staticinherited

Make a log entry.

Wrapper for logManager::log

Template Parameters
logTthe log entry type
retvalthe value returned by this method.
Parameters
[in]level[optional] the log level. The default is used if not specified.

Definition at line 264 of file MagAOXApp.hpp.

◆ logMessage()

void MagAOX::app::MagAOXApp< _useINDI >::logMessage ( bufferPtrT b)
inherited

Handle a log message from the logging system.

This is a callback from the logManager, and is called when the log thread is processing log entries.

Decides whether to display to stderr and whether to send via INDI.

Definition at line 271 of file MagAOXApp.hpp.

◆ newCallBack_clearFSMAlert()

int MagAOX::app::MagAOXApp< _useINDI >::newCallBack_clearFSMAlert ( const pcf::IndiProperty &  ipRecv)
protectedinherited

The callback called by the static version, to actually process the FSM Alert Clear request.

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

Definition at line 964 of file MagAOXApp.hpp.

◆ onPowerOff() [1/2]

int MagAOX::app::dev::frameGrabber< pupilFit >::onPowerOff
inherited

On power off, sets m_reconfig to true.

This should be called in derivedT::onPowerOff as

framegrabber<derivedT>::onPowerOff();

with appropriate error checking.

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

Definition at line 202 of file frameGrabber.hpp.

◆ onPowerOff() [2/2]

int MagAOX::app::MagAOXApp< _useINDI >::onPowerOff
protectedvirtualinherited

This method is called when the change to poweroff is detected.

Returns
0 on success.
-1 on any error which means the app should exit.

Reimplemented in MagAOX::app::zaberLowLevel, MagAOX::app::irisaoCtrl, MagAOX::app::bmcCtrl, and MagAOX::app::alpaoCtrl.

Definition at line 1005 of file MagAOXApp.hpp.

◆ powerOnWaitElapsed()

bool MagAOX::app::MagAOXApp< _useINDI >::powerOnWaitElapsed
protectedinherited

This method tests whether the power on wait time has elapsed.

You would call this once per appLogic loop while in state POWERON. While false, you would return 0.
Once it becomes true, take post-power-on actions and go on with life.

Returns
true if the time since POWERON is greater than the power-on wait, or if power management is not enabled
false otherwise

Definition at line 1021 of file MagAOXApp.hpp.

◆ powerState()

int MagAOX::app::MagAOXApp< _useINDI >::powerState
inherited

Returns the current power state.

If power management is not enabled, this always returns 1=On.

Returns
-1 if power state is unknown
0 if power is off
1 if power is on or m_powerMgtEnabled==false

Definition at line 1032 of file MagAOXApp.hpp.

◆ powerStateTarget()

int MagAOX::app::MagAOXApp< _useINDI >::powerStateTarget
inherited

Returns the target power state.

If power management is not enabled, this always returns 1=On.

Returns
-1 if target power state is unknown
0 if target power state is off
1 if target power is on or m_powerMgtEnabled==false

Definition at line 1041 of file MagAOXApp.hpp.

◆ processImage() [1/2]

int MagAOX::app::pupilFit::processImage ( void *  curr_src,
const dev::shmimT dummy 
)
inline

Definition at line 915 of file pupilFit.hpp.

◆ processImage() [2/2]

int MagAOX::app::pupilFit::processImage ( void *  curr_src,
const refShmimT dummy 
)
inline

Definition at line 1279 of file pupilFit.hpp.

◆ reconfig()

int MagAOX::app::pupilFit::reconfig ( )
inline

Implementation of the framegrabber reconfig interface.

Returns
0 on success
-1 on error

Definition at line 1357 of file pupilFit.hpp.

◆ recordFGTimings()

int MagAOX::app::dev::frameGrabber< pupilFit >::recordFGTimings ( bool  force = false)
inherited

Definition at line 278 of file frameGrabber.hpp.

◆ recordTelem()

int MagAOX::app::pupilFit::recordTelem ( const telem_fgtimings )
inlineprotected

Definition at line 1579 of file pupilFit.hpp.

◆ registerIndiPropertyNew() [1/3]

int MagAOX::app::MagAOXApp< _useINDI >::registerIndiPropertyNew ( pcf::IndiProperty &  prop,
const std::string &  propName,
const pcf::IndiProperty::Type &  propType,
const pcf::IndiProperty::PropertyPermType &  propPerm,
const pcf::IndiProperty::PropertyStateType &  propState,
const pcf::IndiProperty::SwitchRuleType &  propRule,
int(*)(void *, const pcf::IndiProperty &)   
)
inherited

Register an INDI property which is exposed for others to request a New Property for, with a switch rule.

This verison sets up the INDI property according to the arguments.

Returns
0 on success.
-1 on error.
Parameters
[out]propthe property to register
[in]propNamethe name of the property
[in]propTypethe type of the property
[in]propPermthe permissions of the property
[in]propStatethe state of the property
[in]propRulethe switch rule type

◆ registerIndiPropertyNew() [2/3]

int MagAOX::app::MagAOXApp< _useINDI >::registerIndiPropertyNew ( pcf::IndiProperty &  prop,
const std::string &  propName,
const pcf::IndiProperty::Type &  propType,
const pcf::IndiProperty::PropertyPermType &  propPerm,
const pcf::IndiProperty::PropertyStateType &  propState,
int(*)(void *, const pcf::IndiProperty &)   
)
inherited

Register an INDI property which is exposed for others to request a New Property for.

This verison sets up the INDI property according to the arguments.

Returns
0 on success.
-1 on error.
Parameters
[out]propthe property to register
[in]propNamethe name of the property
[in]propTypethe type of the property
[in]propPermthe permissions of the property
[in]propStatethe state of the property

◆ registerIndiPropertyNew() [3/3]

int MagAOX::app::MagAOXApp< _useINDI >::registerIndiPropertyNew ( pcf::IndiProperty &  prop,
int(*)(void *, const pcf::IndiProperty &)   
)
inherited

Register an INDI property which is exposed for others to request a New Property for.

In this version the supplied IndiProperty must be fully set up before passing in.

Returns
0 on success.
-1 on error.
Parameters
[in]propthe property to register, must be fully set up

◆ registerIndiPropertyReadOnly() [1/2]

int MagAOX::app::MagAOXApp< _useINDI >::registerIndiPropertyReadOnly ( pcf::IndiProperty &  prop)
inherited

Register an INDI property which is read only.

This version requires the property be fully set up.

Returns
0 on success.
-1 on error.
Parameters
[in]propthe property to register, must be completely setup

Definition at line 700 of file MagAOXApp.hpp.

◆ registerIndiPropertyReadOnly() [2/2]

int MagAOX::app::MagAOXApp< _useINDI >::registerIndiPropertyReadOnly ( pcf::IndiProperty &  prop,
const std::string &  propName,
const pcf::IndiProperty::Type &  propType,
const pcf::IndiProperty::PropertyPermType &  propPerm,
const pcf::IndiProperty::PropertyStateType &  propState 
)
inherited

Register an INDI property which is read only.

This verison sets up the INDI property according to the arguments.

Returns
0 on success.
-1 on error.
Parameters
[out]propthe property to register, will be configured
[in]propNamethe name of the property
[in]propTypethe type of the property
[in]propPermthe permissions of the property
[in]propStatethe state of the property

Definition at line 709 of file MagAOXApp.hpp.

◆ registerIndiPropertySet()

int MagAOX::app::MagAOXApp< _useINDI >::registerIndiPropertySet ( pcf::IndiProperty &  prop,
const std::string &  devName,
const std::string &  propName,
int(*)(void *, const pcf::IndiProperty &)   
)
inherited

Register an INDI property which is monitored for updates from others.

Returns
0 on success.
-1 on error.
Parameters
[out]propthe property to register
[in]devNamethe device which owns this property
[in]propNamethe name of the property

Definition at line 765 of file MagAOXApp.hpp.

◆ sendGetPropertySetList()

void MagAOX::app::MagAOXApp< _useINDI >::sendGetPropertySetList ( bool  all = false)
inherited

Definition at line 787 of file MagAOXApp.hpp.

◆ sendNewProperty() [1/2]

int MagAOX::app::MagAOXApp< _useINDI >::sendNewProperty ( const pcf::IndiProperty &  ipSend)
protectedinherited

Send a newProperty command to another device (using the INDI Client interface)

Returns
0 on success.
-1 on an error, which will be logged
Parameters
[in]ipSendThe property to send a "new" INDI command for

Definition at line 931 of file MagAOXApp.hpp.

◆ sendNewProperty() [2/2]

int MagAOX::app::MagAOXApp< _useINDI >::sendNewProperty ( const pcf::IndiProperty &  ipSend,
const std::string &  el,
const T &  newVal 
)
protectedinherited

Send a newProperty command to another device (using the INDI Client interface)

Copies the input IndiProperty, then updates the element with the new value.

Returns
0 on success.
-1 on an errory.
Parameters
[in]ipSendThe property to send a "new" INDI command for
[in]elThe element of the property to change
[in]newValThe value to request for the element.

Definition at line 921 of file MagAOXApp.hpp.

◆ sendNewStandardIndiToggle()

int MagAOX::app::MagAOXApp< _useINDI >::sendNewStandardIndiToggle ( const std::string &  device,
const std::string &  property,
bool  onoff 
)
protectedinherited

Send a new property commmand for a standard toggle switch.

Returns
0 on success
-1 on an error, which will be logged.
Parameters
[in]deviceThe device name
[in]propertyThe property name
[in]onoffSwitch state to send: true = on, false = off

Definition at line 938 of file MagAOXApp.hpp.

◆ setDefaults()

void MagAOX::app::MagAOXApp< _useINDI >::setDefaults ( int  argc,
char **  argv 
)
virtualinherited

Set the paths for config files.

Replaces the mx::application defaults with the MagAO-X config system.

This function parses the CL for "-n" or "--name".

Do not override this unless you intend to depart from the MagAO-X standard.

Parameters
[in]argcstandard command line result specifying number of arguments in argv
[in]argvstandard command line result containing the arguments.

Definition at line 146 of file MagAOXApp.hpp.

◆ setEuidCalled()

int MagAOX::app::MagAOXApp< _useINDI >::setEuidCalled
privateinherited

Set the effective user ID to the called value, i.e. the highest possible.

If setuid is set on the file, this will be super-user privileges.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/seteuid.html

Returns
0 on success
-1 on error from setuid().

Definition at line 368 of file MagAOXApp.hpp.

◆ setEuidReal()

int MagAOX::app::MagAOXApp< _useINDI >::setEuidReal
privateinherited

Set the effective user ID to the real value, i.e. the file owner.

Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/seteuid.html

Returns
0 on success
-1 on error from setuid().

Definition at line 377 of file MagAOXApp.hpp.

◆ setSigSegvHandler() [1/2]

int MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::setSigSegvHandler
protectedinherited

Sets the handler for SIGSEGV and SIGBUS.

These are caused by ImageStreamIO server resets.

Definition at line 182 of file shmimMonitor.hpp.

◆ setSigSegvHandler() [2/2]

int MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::setSigSegvHandler
protectedinherited

Sets the handler for SIGSEGV and SIGBUS.

These are caused by ImageStreamIO server resets.

Definition at line 182 of file shmimMonitor.hpp.

◆ setSigTermHandler()

int MagAOX::app::MagAOXApp< _useINDI >::setSigTermHandler
privateinherited

Sets the handler for SIGTERM, SIGQUIT, and SIGINT.

Definition at line 294 of file MagAOXApp.hpp.

◆ setupBasicConfig()

void MagAOX::app::MagAOXApp< _useINDI >::setupBasicConfig
virtualinherited

The basic MagAO-X configuration setup method. Should not normally be overridden.

This method sets up the config system with the standard MagAO-X key=value pairs.

Though it is virtual, it should not normally be overridden unless you need to depart from the MagAO-X standard.

Setting up app specific config goes in setupConfig() implemented in the derived class.

Definition at line 158 of file MagAOXApp.hpp.

◆ setupConfig() [1/5]

void MagAOX::app::pupilFit::setupConfig ( )
inlinevirtual

Definition at line 466 of file pupilFit.hpp.

◆ setupConfig() [2/5]

int MagAOX::app::dev::telemeter< pupilFit >::setupConfig ( appConfigurator &  config)
inherited

Setup an application configurator for the device section.

Returns
0 on success.
-1 on error (nothing implemented yet)
Parameters
[in]configan application configuration to setup

Definition at line 87 of file telemeter.hpp.

◆ setupConfig() [3/5]

void MagAOX::app::dev::frameGrabber< pupilFit >::setupConfig ( mx::app::appConfigurator &  config)
inherited

Setup the configuration system.

This should be called in derivedT::setupConfig as

framegrabber<derivedT>::setupConfig(config);

with appropriate error checking.

Parameters
[out]configthe derived classes configurator

Definition at line 155 of file frameGrabber.hpp.

◆ setupConfig() [4/5]

void MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::setupConfig ( mx::app::appConfigurator &  config)
inherited

Setup the configuration system.

This should be called in derivedT::setupConfig as

shmimMonitor<derivedT, specificT>::setupConfig(config);

with appropriate error checking.

Parameters
[out]configthe derived classes configurator

Definition at line 118 of file shmimMonitor.hpp.

◆ setupConfig() [5/5]

void MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::setupConfig ( mx::app::appConfigurator &  config)
inherited

Setup the configuration system.

This should be called in derivedT::setupConfig as

shmimMonitor<derivedT, specificT>::setupConfig(config);

with appropriate error checking.

Parameters
[out]configthe derived classes configurator

Definition at line 118 of file shmimMonitor.hpp.

◆ shutdown()

int MagAOX::app::MagAOXApp< _useINDI >::shutdown
inherited

Get the value of the shutdown flag.

Returns
the current value of m_shutdown

Definition at line 136 of file MagAOXApp.hpp.

◆ smThreadExec() [1/2]

void MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::smThreadExec
protectedinherited

Execute the monitoring thread.

<

Todo:
this isn't right--> isn't there a define in cacao to use?

< The semaphore to monitor for new image data

Todo:
change to naxis?
Todo:
change to naxis?

Definition at line 214 of file shmimMonitor.hpp.

◆ smThreadExec() [2/2]

void MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::smThreadExec
protectedinherited

Execute the monitoring thread.

<

Todo:
this isn't right--> isn't there a define in cacao to use?

< The semaphore to monitor for new image data

Todo:
change to naxis?
Todo:
change to naxis?

Definition at line 214 of file shmimMonitor.hpp.

◆ smThreadStart() [1/2]

void MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::smThreadStart ( shmimMonitor< pupilFit, refShmimT > *  s)
staticprotectedinherited

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

Parameters
[in]sa pointer to a shmimMonitor instance (normally this)

Definition at line 211 of file shmimMonitor.hpp.

◆ smThreadStart() [2/2]

void MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::smThreadStart ( shmimMonitor< pupilFit > *  s)
staticprotectedinherited

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

Parameters
[in]sa pointer to a shmimMonitor instance (normally this)

Definition at line 211 of file shmimMonitor.hpp.

◆ st_newCallBack_clearFSMAlert()

int MagAOX::app::MagAOXApp< _useINDI >::st_newCallBack_clearFSMAlert ( void *  app,
const pcf::IndiProperty &  ipRecv 
)
staticprotectedinherited

The static callback function to be registered for requesting to clear the FSM alert.

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

Definition at line 955 of file MagAOXApp.hpp.

◆ startAcquisition()

int MagAOX::app::pupilFit::startAcquisition ( )
inline

Implementation of the framegrabber startAcquisition interface.

Returns
0 on success
-1 on error

Definition at line 1310 of file pupilFit.hpp.

◆ startINDI()

int MagAOX::app::MagAOXApp< _useINDI >::startINDI
protectedinherited

Start INDI Communications.

Returns
0 on success
-1 on error. This is fatal.

Definition at line 783 of file MagAOXApp.hpp.

◆ state() [1/2]

stateCodes::stateCodeT MagAOX::app::MagAOXApp< _useINDI >::state
inherited

Get the current state code.

Returns
m_state

Definition at line 480 of file MagAOXApp.hpp.

◆ state() [2/2]

void MagAOX::app::MagAOXApp< _useINDI >::state ( const stateCodes::stateCodeT s,
bool  stateAlert = false 
)
inherited

Set the current state code.

Todo:
move this to a function in stateCodes
Parameters
[in]sThe new application state
[in]stateAlert[optional] flag to set the alert state of the FSM property.

Definition at line 488 of file MagAOXApp.hpp.

◆ stateLogged()

int MagAOX::app::MagAOXApp< _useINDI >::stateLogged
inherited

Updates and returns the value of m_stateLogged. Will be 0 on first call after a state change, >0 afterwards.

This method exists to facilitate logging the reason for a state change once, but not logging it on subsequent event loops. Returns the current value upon entry, but updates before returning so that the next call returns the incremented value. Example usage:

if( connection_failed ) //some condition set this to true
{
if(!stateLogged()) log<text_log>("Not connected");
}
stateCodes::stateCodeT state()
Get the current state code.
Definition: MagAOXApp.hpp:2082
int stateLogged()
Updates and returns the value of m_stateLogged. Will be 0 on first call after a state change,...
Definition: MagAOXApp.hpp:2140
@ NOTCONNECTED
The application is not connected to the device or service.
Definition: stateCodes.hpp:44

In this example, the log entry is made the first time the state changes. If there are no changes to a different state in the mean time, then when the event loop gets here again and decides it is not connected, the log entry will not be made.

Returns
current value of m_stateLogged, that is the value before it is incremented.

Definition at line 509 of file MagAOXApp.hpp.

◆ telem() [1/2]

int MagAOX::app::dev::telemeter< pupilFit >::telem
inherited

Make a telemetry recording, for an empty record.

Wrapper for logManager::log, which updates telT::lastRecord.

Template Parameters
logTthe log entry type
retvalthe value returned by this method.

Definition at line 80 of file telemeter.hpp.

◆ telem() [2/2]

int MagAOX::app::dev::telemeter< pupilFit >::telem ( const typename telT::messageT &  msg)
inherited

Make a telemetry recording.

Wrapper for logManager::log, which updates telT::lastRecord.

Template Parameters
logTthe log entry type
retvalthe value returned by this method.
Parameters
[in]msgthe data to log

Definition at line 70 of file telemeter.hpp.

◆ threadStart()

int MagAOX::app::MagAOXApp< _useINDI >::threadStart ( std::thread &  thrd,
bool &  thrdInit,
pid_t &  tpid,
pcf::IndiProperty &  thProp,
int  thrdPrio,
const std::string &  cpuset,
const std::string &  thrdName,
thisPtr *  thrdThis,
Function &&  thrdStart 
)
inherited

Start a thread, using this class's privileges to set priority, etc.

The thread initialization synchronizer bool is set to true at the beginning of this function, then is set to false once all initialization is complete. The thread exec function should wait until this is false before doing anything except setting the pid. This is to avoid privilege escalation bugs.

The interface of the thread start function is:

static void impl::myThreadStart( impl * o )
{
o->myThreadExec(); //A member function which actually executes the thread
}

where impl is the derived class, and mThreadStart and myThreadExec are members of impl.

Returns
0 on success
-1 on error
Parameters
[out]thrdThe thread object to start executing
thrdInit[in/out] The thread initilization synchronizer.
tpid[in/out] The thread pid to be filled in by thrdStart immediately upon call
thProp[in/out] The INDI property to publish the thread details
[in]thrdPrioThe r/t priority to set for this thread
[in]cpusetthe cpuset to place this thread on. Ignored if "".
[in]thrdNameThe name of the thread (just for logging)
[in]thrdThisThe `this` pointer to pass to the thread starter function
[in]thrdStartThe thread starting function, a static function taking a `this` pointer as argument.

Definition at line 450 of file MagAOXApp.hpp.

◆ unlockPID()

int MagAOX::app::MagAOXApp< _useINDI >::unlockPID
protectedinherited

Remove the PID file.

Definition at line 410 of file MagAOXApp.hpp.

◆ updateIfChanged() [1/4]

void MagAOX::app::MagAOXApp< _useINDI >::updateIfChanged ( pcf::IndiProperty &  p,
const std::string &  el,
const char *  newVal,
pcf::IndiProperty::PropertyStateType  ipState = pcf::IndiProperty::Ok 
)
protectedinherited

Update an INDI property element value if it has changed.

Will only peform a SetProperty if the new element value has changed compared to the stored value, or if the property state has changed.

This comparison is done in the true type of the value.

This is a specialization for const char * to std::string.

For a property with multiple elements, you should use the vector version to minimize network traffic. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
p[in/out] The property containing the element to possibly update
[in]elThe element name
[in]newValthe new value

Definition at line 850 of file MagAOXApp.hpp.

◆ updateIfChanged() [2/4]

void MagAOX::app::MagAOXApp< _useINDI >::updateIfChanged ( pcf::IndiProperty &  p,
const std::string &  el,
const std::vector< T > &  newVals,
pcf::IndiProperty::PropertyStateType  ipState = pcf::IndiProperty::Ok 
)
protectedinherited

Update an INDI property if values have changed.

Will only peform a SetProperty if at least one value has changed compared to the stored value, or if the property state has changed.

Constructs the element names for each value as elX where X is the index of the vector.

This comparison is done in the true type of the value.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
p[in/out] The property containing the element to possibly update
[in]elBeginning of each element name
[in]newValsthe new values
[in]ipState[optional] the new state

Definition at line 880 of file MagAOXApp.hpp.

◆ updateIfChanged() [3/4]

void MagAOX::app::MagAOXApp< _useINDI >::updateIfChanged ( pcf::IndiProperty &  p,
const std::string &  el,
const T &  newVal,
pcf::IndiProperty::PropertyStateType  ipState = pcf::IndiProperty::Ok 
)
protectedinherited

Update an INDI property element value if it has changed.

Will only peform a SetProperty if the new element value has changed compared to the stored value, or if the property state has changed.

This comparison is done in the true type of the value.

For a property with multiple elements, you should use the vector version to minimize network traffic.

Parameters
p[in/out] The property containing the element to possibly update
[in]elThe element name
[in]newValthe new value

Definition at line 832 of file MagAOXApp.hpp.

◆ updateIfChanged() [4/4]

void MagAOX::app::MagAOXApp< _useINDI >::updateIfChanged ( pcf::IndiProperty &  p,
const std::vector< std::string > &  els,
const std::vector< T > &  newVals 
)
protectedinherited

Update an INDI property if values have changed.

Will only peform a SetProperty if at least one value has changed compared to the stored value, or if the property state has changed.

This comparison is done in the true type of the value.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
p[in/out] The property containing the element to possibly update
[in]elsString vector of element names
[in]newValsthe new values

Definition at line 897 of file MagAOXApp.hpp.

◆ updateINDI() [1/3]

int MagAOX::app::dev::frameGrabber< pupilFit >::updateINDI
inherited

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 270 of file frameGrabber.hpp.

◆ updateINDI() [2/3]

int MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::updateINDI
inherited

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 241 of file shmimMonitor.hpp.

◆ updateINDI() [3/3]

int MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::updateINDI
inherited

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 241 of file shmimMonitor.hpp.

◆ updateSwitchIfChanged()

void MagAOX::app::MagAOXApp< _useINDI >::updateSwitchIfChanged ( pcf::IndiProperty &  p,
const std::string &  el,
const pcf::IndiElement::SwitchStateType &  newVal,
pcf::IndiProperty::PropertyStateType  ipState = pcf::IndiProperty::Ok 
)
protectedinherited

Update an INDI switch element value if it has changed.

Will only peform a SetProperty if the new element switch state has changed, or the propery state has changed.

Parameters
p[in/out] The property containing the element to possibly update
[in]elThe element name
[in]newValthe new value

Definition at line 861 of file MagAOXApp.hpp.

◆ whilePowerOff()

int MagAOX::app::MagAOXApp< _useINDI >::whilePowerOff
protectedvirtualinherited

This method is called while the power is off, once per FSM loop.

Returns
0 on success.
-1 on any error which means the app should exit.

Reimplemented in MagAOX::app::zaberLowLevel, MagAOX::app::irisaoCtrl, MagAOX::app::bmcCtrl, and MagAOX::app::alpaoCtrl.

Definition at line 1012 of file MagAOXApp.hpp.

Friends And Related Function Documentation

◆ dev::frameGrabber< pupilFit >

friend class dev::frameGrabber< pupilFit >
friend

Definition at line 57 of file pupilFit.hpp.

◆ dev::shmimMonitor< pupilFit >

friend class dev::shmimMonitor< pupilFit >
friend

Definition at line 57 of file pupilFit.hpp.

◆ dev::shmimMonitor< pupilFit, refShmimT >

friend class dev::shmimMonitor< pupilFit, refShmimT >
friend

Definition at line 57 of file pupilFit.hpp.

◆ dev::telemeter< pupilFit >

friend class dev::telemeter< pupilFit >
friend

Definition at line 57 of file pupilFit.hpp.

◆ pupilFit_test

friend class pupilFit_test
friend

Definition at line 57 of file pupilFit.hpp.

Member Data Documentation

◆ c_frameGrabber_flippable

constexpr bool MagAOX::app::pupilFit::c_frameGrabber_flippable = false
staticconstexpr

app:dev config to tell framegrabber these images can not be flipped

Definition at line 84 of file pupilFit.hpp.

◆ m_allDefsReceived

bool MagAOX::app::MagAOXApp< _useINDI >::m_allDefsReceived
protectedinherited

Flag indicating that all registered Set properties have been updated since last Get.

Definition at line 576 of file MagAOXApp.hpp.

◆ m_atimes

mx::sigproc::circularBufferIndex<timespec, cbIndexT> MagAOX::app::dev::frameGrabber< pupilFit >::m_atimes
protectedinherited

Definition at line 122 of file frameGrabber.hpp.

◆ m_atimesD

std::vector<double> MagAOX::app::dev::frameGrabber< pupilFit >::m_atimesD
protectedinherited

Definition at line 125 of file frameGrabber.hpp.

◆ m_averaging

bool MagAOX::app::pupilFit::m_averaging {false}
protected

Definition at line 169 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avg_dx

double MagAOX::app::pupilFit::m_avg_dx
protected

Definition at line 166 of file pupilFit.hpp.

Referenced by loadImageIntoStream(), and processImage().

◆ m_avg_dy

double MagAOX::app::pupilFit::m_avg_dy
protected

Definition at line 167 of file pupilFit.hpp.

Referenced by loadImageIntoStream(), and processImage().

◆ m_avgD1

double MagAOX::app::pupilFit::m_avgD1 {0}
protected

Definition at line 190 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD1_accum

double MagAOX::app::pupilFit::m_avgD1_accum {0}
protected

Definition at line 178 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD1sq_accum

double MagAOX::app::pupilFit::m_avgD1sq_accum {0}
protected

Definition at line 179 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD2

double MagAOX::app::pupilFit::m_avgD2 {0}
protected

Definition at line 214 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD2_accum

double MagAOX::app::pupilFit::m_avgD2_accum {0}
protected

Definition at line 202 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD2sq_accum

double MagAOX::app::pupilFit::m_avgD2sq_accum {0}
protected

Definition at line 203 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD3

double MagAOX::app::pupilFit::m_avgD3 {0}
protected

Definition at line 238 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD3_accum

double MagAOX::app::pupilFit::m_avgD3_accum {0}
protected

Definition at line 226 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD3sq_accum

double MagAOX::app::pupilFit::m_avgD3sq_accum {0}
protected

Definition at line 227 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD4

double MagAOX::app::pupilFit::m_avgD4 {0}
protected

Definition at line 262 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD4_accum

double MagAOX::app::pupilFit::m_avgD4_accum {0}
protected

Definition at line 250 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgD4sq_accum

double MagAOX::app::pupilFit::m_avgD4sq_accum {0}
protected

Definition at line 251 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgDAll

double MagAOX::app::pupilFit::m_avgDAll {0}
protected

Definition at line 286 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgDAll_accum

double MagAOX::app::pupilFit::m_avgDAll_accum {0}
protected

Definition at line 274 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgDAllsq_accum

double MagAOX::app::pupilFit::m_avgDAllsq_accum {0}
protected

Definition at line 275 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed1

double MagAOX::app::pupilFit::m_avgmed1 {0}
protected

Definition at line 193 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed1_accum

double MagAOX::app::pupilFit::m_avgmed1_accum {0}
protected

Definition at line 181 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed1sq_accum

double MagAOX::app::pupilFit::m_avgmed1sq_accum {0}
protected

Definition at line 182 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed2

double MagAOX::app::pupilFit::m_avgmed2 {0}
protected

Definition at line 217 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed2_accum

double MagAOX::app::pupilFit::m_avgmed2_accum {0}
protected

Definition at line 205 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed2sq_accum

double MagAOX::app::pupilFit::m_avgmed2sq_accum {0}
protected

Definition at line 206 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed3

double MagAOX::app::pupilFit::m_avgmed3 {0}
protected

Definition at line 241 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed3_accum

double MagAOX::app::pupilFit::m_avgmed3_accum {0}
protected

Definition at line 229 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed3sq_accum

double MagAOX::app::pupilFit::m_avgmed3sq_accum {0}
protected

Definition at line 230 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed4

double MagAOX::app::pupilFit::m_avgmed4 {0}
protected

Definition at line 265 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed4_accum

double MagAOX::app::pupilFit::m_avgmed4_accum {0}
protected

Definition at line 253 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmed4sq_accum

double MagAOX::app::pupilFit::m_avgmed4sq_accum {0}
protected

Definition at line 254 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmedAll

double MagAOX::app::pupilFit::m_avgmedAll {0}
protected

Definition at line 289 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmedAll_accum

double MagAOX::app::pupilFit::m_avgmedAll_accum {0}
protected

Definition at line 277 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgmedAllsq_accum

double MagAOX::app::pupilFit::m_avgmedAllsq_accum {0}
protected

Definition at line 278 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx1

double MagAOX::app::pupilFit::m_avgx1 {0}
protected

Definition at line 184 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx1_accum

double MagAOX::app::pupilFit::m_avgx1_accum {0}
protected

Definition at line 172 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx1sq_accum

double MagAOX::app::pupilFit::m_avgx1sq_accum {0}
protected

Definition at line 173 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx2

double MagAOX::app::pupilFit::m_avgx2 {0}
protected

Definition at line 208 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx2_accum

double MagAOX::app::pupilFit::m_avgx2_accum {0}
protected

Definition at line 196 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx2sq_accum

double MagAOX::app::pupilFit::m_avgx2sq_accum {0}
protected

Definition at line 197 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx3

double MagAOX::app::pupilFit::m_avgx3 {0}
protected

Definition at line 232 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx3_accum

double MagAOX::app::pupilFit::m_avgx3_accum {0}
protected

Definition at line 220 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx3sq_accum

double MagAOX::app::pupilFit::m_avgx3sq_accum {0}
protected

Definition at line 221 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx4

double MagAOX::app::pupilFit::m_avgx4 {0}
protected

Definition at line 256 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx4_accum

double MagAOX::app::pupilFit::m_avgx4_accum {0}
protected

Definition at line 244 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgx4sq_accum

double MagAOX::app::pupilFit::m_avgx4sq_accum {0}
protected

Definition at line 245 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgxAll

double MagAOX::app::pupilFit::m_avgxAll {0}
protected

Definition at line 280 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgxAll_accum

double MagAOX::app::pupilFit::m_avgxAll_accum {0}
protected

Definition at line 268 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgxAllsq_accum

double MagAOX::app::pupilFit::m_avgxAllsq_accum {0}
protected

Definition at line 269 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy1

double MagAOX::app::pupilFit::m_avgy1 {0}
protected

Definition at line 187 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy1_accum

double MagAOX::app::pupilFit::m_avgy1_accum {0}
protected

Definition at line 175 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy1sq_accum

double MagAOX::app::pupilFit::m_avgy1sq_accum {0}
protected

Definition at line 176 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy2

double MagAOX::app::pupilFit::m_avgy2 {0}
protected

Definition at line 211 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy2_accum

double MagAOX::app::pupilFit::m_avgy2_accum {0}
protected

Definition at line 199 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy2sq_accum

double MagAOX::app::pupilFit::m_avgy2sq_accum {0}
protected

Definition at line 200 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy3

double MagAOX::app::pupilFit::m_avgy3 {0}
protected

Definition at line 235 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy3_accum

double MagAOX::app::pupilFit::m_avgy3_accum {0}
protected

Definition at line 223 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy3sq_accum

double MagAOX::app::pupilFit::m_avgy3sq_accum {0}
protected

Definition at line 224 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy4

double MagAOX::app::pupilFit::m_avgy4 {0}
protected

Definition at line 259 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy4_accum

double MagAOX::app::pupilFit::m_avgy4_accum {0}
protected

Definition at line 247 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgy4sq_accum

double MagAOX::app::pupilFit::m_avgy4sq_accum {0}
protected

Definition at line 248 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgyAll

double MagAOX::app::pupilFit::m_avgyAll {0}
protected

Definition at line 283 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgyAll_accum

double MagAOX::app::pupilFit::m_avgyAll_accum {0}
protected

Definition at line 271 of file pupilFit.hpp.

Referenced by processImage().

◆ m_avgyAllsq_accum

double MagAOX::app::pupilFit::m_avgyAllsq_accum {0}
protected

Definition at line 272 of file pupilFit.hpp.

Referenced by processImage().

◆ m_calibDir

std::string MagAOX::app::MagAOXApp< _useINDI >::m_calibDir
protectedinherited

The path to calibration files for MagAOX.

Definition at line 94 of file MagAOXApp.hpp.

◆ m_circBuffLength

uint32_t MagAOX::app::dev::frameGrabber< pupilFit >::m_circBuffLength
protectedinherited

Length of the circular buffer, in frames.

Definition at line 93 of file frameGrabber.hpp.

◆ m_configBase

std::string MagAOX::app::MagAOXApp< _useINDI >::m_configBase
protectedinherited

The name of a base config class for this app (minus .conf).

Definition at line 92 of file MagAOXApp.hpp.

◆ m_configDir

std::string MagAOX::app::MagAOXApp< _useINDI >::m_configDir
protectedinherited

The path to configuration files for MagAOX.

Definition at line 90 of file MagAOXApp.hpp.

◆ m_configName

std::string MagAOX::app::MagAOXApp< _useINDI >::m_configName
protectedinherited

The name of the configuration file (minus .conf).

Definition at line 88 of file MagAOXApp.hpp.

◆ m_cpusetPath

std::string MagAOX::app::MagAOXApp< _useINDI >::m_cpusetPath
protectedinherited

Definition at line 421 of file MagAOXApp.hpp.

◆ m_currentFlip

int MagAOX::app::dev::frameGrabber< pupilFit >::m_currentFlip
protectedinherited

Definition at line 102 of file frameGrabber.hpp.

◆ m_currImageTimestamp

timespec MagAOX::app::dev::frameGrabber< pupilFit >::m_currImageTimestamp
protectedinherited

The timestamp of the current image.

Definition at line 114 of file frameGrabber.hpp.

◆ m_dataType [1/3]

uint8_t MagAOX::app::dev::frameGrabber< pupilFit >::m_dataType
protectedinherited

The ImageStreamIO type code.

Definition at line 107 of file frameGrabber.hpp.

◆ m_dataType [2/3]

uint8_t MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_dataType
protectedinherited

The ImageStreamIO type code.

Definition at line 101 of file shmimMonitor.hpp.

◆ m_dataType [3/3]

uint8_t MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_dataType
protectedinherited

The ImageStreamIO type code.

Definition at line 101 of file shmimMonitor.hpp.

◆ m_defaultFlip

int MagAOX::app::dev::frameGrabber< pupilFit >::m_defaultFlip
protectedinherited

Definition at line 98 of file frameGrabber.hpp.

◆ m_defSetD1

double MagAOX::app::pupilFit::m_defSetD1 {56.0}
protected

Definition at line 116 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSetD2

double MagAOX::app::pupilFit::m_defSetD2 {56.0}
protected

Definition at line 120 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSetD3

double MagAOX::app::pupilFit::m_defSetD3 {56.0}
protected

Definition at line 124 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSetD4

double MagAOX::app::pupilFit::m_defSetD4 {56.0}
protected

Definition at line 128 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSetx1

double MagAOX::app::pupilFit::m_defSetx1 {29.5}
protected

Definition at line 114 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSetx2

double MagAOX::app::pupilFit::m_defSetx2 {89.5}
protected

Definition at line 118 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSetx3

double MagAOX::app::pupilFit::m_defSetx3 {29.5}
protected

Definition at line 122 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSetx4

double MagAOX::app::pupilFit::m_defSetx4 {89.5}
protected

Definition at line 126 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSety1

double MagAOX::app::pupilFit::m_defSety1 {29.5}
protected

Definition at line 115 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSety2

double MagAOX::app::pupilFit::m_defSety2 {29.5}
protected

Definition at line 119 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSety3

double MagAOX::app::pupilFit::m_defSety3 {89.5}
protected

Definition at line 123 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_defSety4

double MagAOX::app::pupilFit::m_defSety4 {89.5}
protected

Definition at line 127 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_depth [1/2]

uint32_t MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_depth
protectedinherited

The depth of the circular buffer in the stream.

Definition at line 99 of file shmimMonitor.hpp.

◆ m_depth [2/2]

uint32_t MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_depth
protectedinherited

The depth of the circular buffer in the stream.

Definition at line 99 of file shmimMonitor.hpp.

◆ m_driverCtrlName

std::string MagAOX::app::MagAOXApp< _useINDI >::m_driverCtrlName
protectedinherited

Full path name of the INDI driver control FIFO.

This is currently only used to signal restarts.

Definition at line 587 of file MagAOXApp.hpp.

◆ m_driverInName

std::string MagAOX::app::MagAOXApp< _useINDI >::m_driverInName
protectedinherited

Full path name of the INDI driver input FIFO.

Definition at line 579 of file MagAOXApp.hpp.

◆ m_driverOutName

std::string MagAOX::app::MagAOXApp< _useINDI >::m_driverOutName
protectedinherited

Full path name of the INDI driver output FIFO.

Definition at line 582 of file MagAOXApp.hpp.

◆ m_dummy_c

char MagAOX::app::dev::frameGrabber< pupilFit >::m_dummy_c
protectedinherited

Definition at line 131 of file frameGrabber.hpp.

◆ m_dummy_cnt

uint64_t MagAOX::app::dev::frameGrabber< pupilFit >::m_dummy_cnt
protectedinherited

Definition at line 130 of file frameGrabber.hpp.

◆ m_dummy_ts

timespec MagAOX::app::dev::frameGrabber< pupilFit >::m_dummy_ts
protectedinherited

Definition at line 129 of file frameGrabber.hpp.

◆ m_edgeIm

mx::improc::eigenImage<float> MagAOX::app::pupilFit::m_edgeIm
protected

Definition at line 104 of file pupilFit.hpp.

Referenced by allocate(), and processImage().

◆ m_edgeShmim

IMAGE MagAOX::app::pupilFit::m_edgeShmim
protected

Definition at line 111 of file pupilFit.hpp.

Referenced by ~pupilFit(), allocate(), and processImage().

◆ m_edgeShmimConnected

bool MagAOX::app::pupilFit::m_edgeShmimConnected {false}
protected

Definition at line 112 of file pupilFit.hpp.

Referenced by ~pupilFit(), and allocate().

◆ m_edgeShmimName

std::string MagAOX::app::pupilFit::m_edgeShmimName {"camwfs_edge"}
protected

The name of the image stream for the edge images. Default is camwfs_edge.

Definition at line 95 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_euidCalled

uid_t MagAOX::app::MagAOXApp< _useINDI >::m_euidCalled
privateinherited

The user id of the process as called (i.e. the higher privileged id of the owner, root if setuid).

Definition at line 315 of file MagAOXApp.hpp.

◆ m_euidReal

uid_t MagAOX::app::MagAOXApp< _useINDI >::m_euidReal
privateinherited

The real user id of the proces (i.e. the lower privileged id of the user)

Definition at line 314 of file MagAOXApp.hpp.

◆ m_fgCpuset

std::string MagAOX::app::dev::frameGrabber< pupilFit >::m_fgCpuset
protectedinherited

The cpuset to assign the framegrabber thread to. Not used if empty, the default.

Definition at line 91 of file frameGrabber.hpp.

◆ m_fgThread

std::thread MagAOX::app::dev::frameGrabber< pupilFit >::m_fgThread
protectedinherited

A separate thread for the actual framegrabbings.

Definition at line 230 of file frameGrabber.hpp.

◆ m_fgThreadID

pid_t MagAOX::app::dev::frameGrabber< pupilFit >::m_fgThreadID
protectedinherited

The ID of the framegrabber thread.

Definition at line 226 of file frameGrabber.hpp.

◆ m_fgThreadInit

bool MagAOX::app::dev::frameGrabber< pupilFit >::m_fgThreadInit
protectedinherited

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

Definition at line 224 of file frameGrabber.hpp.

◆ m_fgThreadPrio

int MagAOX::app::dev::frameGrabber< pupilFit >::m_fgThreadPrio
protectedinherited

Priority of the framegrabber thread, should normally be > 00.

Definition at line 90 of file frameGrabber.hpp.

◆ m_fgThreadProp

pcf::IndiProperty MagAOX::app::dev::frameGrabber< pupilFit >::m_fgThreadProp
protectedinherited

The property to hold the f.g. thread details.

Definition at line 228 of file frameGrabber.hpp.

◆ m_fitIm

mx::improc::eigenImage<float> MagAOX::app::pupilFit::m_fitIm
protected

Definition at line 103 of file pupilFit.hpp.

Referenced by allocate(), and processImage().

◆ m_fitter

pupilFitter<realT> MagAOX::app::pupilFit::m_fitter
protected

Definition at line 106 of file pupilFit.hpp.

Referenced by allocate(), loadConfigImpl(), and processImage().

◆ m_getExistingFirst [1/2]

bool MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_getExistingFirst
protectedinherited

If set to true by derivedT, any existing image will be grabbed and sent to processImage before waiting on the semaphore.

Definition at line 93 of file shmimMonitor.hpp.

◆ m_getExistingFirst [2/2]

bool MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_getExistingFirst
protectedinherited

If set to true by derivedT, any existing image will be grabbed and sent to processImage before waiting on the semaphore.

Definition at line 93 of file shmimMonitor.hpp.

◆ m_gitAlert

bool MagAOX::app::MagAOXApp< _useINDI >::m_gitAlert
privateinherited

Definition at line 472 of file MagAOXApp.hpp.

◆ m_height [1/3]

uint32_t MagAOX::app::dev::frameGrabber< pupilFit >::m_height
protectedinherited

The height of the image, once deinterlaced etc.

Definition at line 105 of file frameGrabber.hpp.

◆ m_height [2/3]

uint32_t MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_height
protectedinherited

The height of the images in the stream.

Definition at line 98 of file shmimMonitor.hpp.

◆ m_height [3/3]

uint32_t MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_height
protectedinherited

The height of the images in the stream.

Definition at line 98 of file shmimMonitor.hpp.

◆ m_imageStream [1/3]

IMAGE* MagAOX::app::dev::frameGrabber< pupilFit >::m_imageStream
protectedinherited

The ImageStreamIO shared memory buffer.

Definition at line 118 of file frameGrabber.hpp.

◆ m_imageStream [2/3]

IMAGE MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_imageStream
protectedinherited

The ImageStreamIO shared memory buffer.

Definition at line 104 of file shmimMonitor.hpp.

◆ m_imageStream [3/3]

IMAGE MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_imageStream
protectedinherited

The ImageStreamIO shared memory buffer.

Definition at line 104 of file shmimMonitor.hpp.

◆ m_indiDriver

indiDriver<MagAOXApp>* MagAOX::app::MagAOXApp< _useINDI >::m_indiDriver
inherited

The INDI driver wrapper. Constructed and initialized by execute, which starts and stops communications.

Todo:
instead of making this public, provide an accessor.

Definition at line 537 of file MagAOXApp.hpp.

◆ m_indiMutex

std::mutex MagAOX::app::MagAOXApp< _useINDI >::m_indiMutex
inherited

Mutex for locking INDI communications.

Definition at line 540 of file MagAOXApp.hpp.

◆ m_indiNewCallBacks

std::unordered_map< std::string, indiCallBack> MagAOX::app::MagAOXApp< _useINDI >::m_indiNewCallBacks
protectedinherited

Map to hold the NewProperty indiCallBacks for this App, with fast lookup by property name.

The key for these is the property name.

Definition at line 567 of file MagAOXApp.hpp.

◆ m_indiP_averaging

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_averaging
protected

Definition at line 410 of file pupilFit.hpp.

Referenced by appStartup().

◆ m_indiP_avg

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_avg
protected

Definition at line 420 of file pupilFit.hpp.

Referenced by appStartup(), and processImage().

◆ m_indiP_clearFSMAlert

pcf::IndiProperty MagAOX::app::MagAOXApp< _useINDI >::m_indiP_clearFSMAlert
protectedinherited

indi Property to clear an FSM alert.

Definition at line 948 of file MagAOXApp.hpp.

◆ m_indiP_frameSize [1/3]

pcf::IndiProperty MagAOX::app::dev::frameGrabber< pupilFit >::m_indiP_frameSize
protectedinherited

Property used to report the current frame size.

Definition at line 258 of file frameGrabber.hpp.

◆ m_indiP_frameSize [2/3]

pcf::IndiProperty MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_indiP_frameSize
protectedinherited

Property used to report the current frame size.

Definition at line 230 of file shmimMonitor.hpp.

◆ m_indiP_frameSize [3/3]

pcf::IndiProperty MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_indiP_frameSize
protectedinherited

Property used to report the current frame size.

Definition at line 230 of file shmimMonitor.hpp.

◆ m_indiP_numPupils

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_numPupils
protected

Definition at line 413 of file pupilFit.hpp.

Referenced by appStartup().

◆ m_indiP_powerChannel

pcf::IndiProperty MagAOX::app::MagAOXApp< _useINDI >::m_indiP_powerChannel
protectedinherited

INDI property used to communicate power state.

Definition at line 998 of file MagAOXApp.hpp.

◆ m_indiP_quad1

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_quad1
protected

Definition at line 415 of file pupilFit.hpp.

Referenced by appStartup(), and processImage().

◆ m_indiP_quad2

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_quad2
protected

Definition at line 416 of file pupilFit.hpp.

Referenced by appStartup(), and processImage().

◆ m_indiP_quad3

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_quad3
protected

Definition at line 417 of file pupilFit.hpp.

Referenced by appStartup(), and processImage().

◆ m_indiP_quad4

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_quad4
protected

Definition at line 418 of file pupilFit.hpp.

Referenced by appStartup(), and processImage().

◆ m_indiP_refmode

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_refmode
protected

Definition at line 428 of file pupilFit.hpp.

Referenced by appLogic(), and appStartup().

◆ m_indiP_reload

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_reload
protected

Definition at line 422 of file pupilFit.hpp.

Referenced by appStartup().

◆ m_indiP_shmimName [1/3]

pcf::IndiProperty MagAOX::app::dev::frameGrabber< pupilFit >::m_indiP_shmimName
protectedinherited

Property used to report the shmim buffer name.

Definition at line 256 of file frameGrabber.hpp.

◆ m_indiP_shmimName [2/3]

pcf::IndiProperty MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_indiP_shmimName
protectedinherited

Property used to report the shmim buffer name.

Definition at line 228 of file shmimMonitor.hpp.

◆ m_indiP_shmimName [3/3]

pcf::IndiProperty MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_indiP_shmimName
protectedinherited

Property used to report the shmim buffer name.

Definition at line 228 of file shmimMonitor.hpp.

◆ m_indiP_state

pcf::IndiProperty MagAOX::app::MagAOXApp< _useINDI >::m_indiP_state
protectedinherited

indi Property to report the application state.

Definition at line 945 of file MagAOXApp.hpp.

◆ m_indiP_thresh

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_thresh
protected

Definition at line 406 of file pupilFit.hpp.

Referenced by appLogic(), and appStartup().

◆ m_indiP_timing

pcf::IndiProperty MagAOX::app::dev::frameGrabber< pupilFit >::m_indiP_timing
protectedinherited

Definition at line 260 of file frameGrabber.hpp.

◆ m_indiP_update

pcf::IndiProperty MagAOX::app::pupilFit::m_indiP_update
protected

Definition at line 425 of file pupilFit.hpp.

Referenced by appStartup().

◆ m_indiSetCallBacks

std::unordered_map< std::string, indiCallBack> MagAOX::app::MagAOXApp< _useINDI >::m_indiSetCallBacks
protectedinherited

Map to hold the SetProperty indiCallBacks for this App, with fast lookup by property name.

The key for these is device.name

Definition at line 572 of file MagAOXApp.hpp.

◆ m_inode [1/2]

ino_t MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_inode
protectedinherited

The inode of the image stream file.

Definition at line 106 of file shmimMonitor.hpp.

◆ m_inode [2/2]

ino_t MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_inode
protectedinherited

The inode of the image stream file.

Definition at line 106 of file shmimMonitor.hpp.

◆ m_latencyCircBuffMaxLength

uint16_t MagAOX::app::dev::frameGrabber< pupilFit >::m_latencyCircBuffMaxLength
protectedinherited

Maximum length of the latency measurement circular buffers.

Definition at line 95 of file frameGrabber.hpp.

◆ m_latencyCircBuffMaxTime

float MagAOX::app::dev::frameGrabber< pupilFit >::m_latencyCircBuffMaxTime
protectedinherited

Maximum time of the latency meaurement circular buffers.

Definition at line 96 of file frameGrabber.hpp.

◆ m_log

MagAOXApp< _useINDI >::logManagerT MagAOX::app::MagAOXApp< _useINDI >::m_log
staticinherited

Definition at line 242 of file MagAOXApp.hpp.

◆ m_loopPause

unsigned long MagAOX::app::MagAOXApp< _useINDI >::m_loopPause
protectedinherited

The time in nanoseconds to pause the main loop. The appLogic() function of the derived class is called every m_loopPause nanoseconds. Default is 1,000,000,000 ns. Config with loopPause=X.

Definition at line 100 of file MagAOXApp.hpp.

◆ m_maxInterval

double MagAOX::app::dev::telemeter< pupilFit >::m_maxInterval
inherited

The maximum interval, in seconds, between telemetry records. Default is 10.0 seconds.

Definition at line 58 of file telemeter.hpp.

◆ m_mna

double MagAOX::app::dev::frameGrabber< pupilFit >::m_mna
protectedinherited

Definition at line 133 of file frameGrabber.hpp.

◆ m_mnw

double MagAOX::app::dev::frameGrabber< pupilFit >::m_mnw
protectedinherited

Definition at line 136 of file frameGrabber.hpp.

◆ m_mnwa

double MagAOX::app::dev::frameGrabber< pupilFit >::m_mnwa
protectedinherited

Definition at line 139 of file frameGrabber.hpp.

◆ m_navg

size_t MagAOX::app::pupilFit::m_navg {0}
protected

Definition at line 170 of file pupilFit.hpp.

Referenced by processImage().

◆ m_numPupils

int MagAOX::app::pupilFit::m_numPupils {4}
protected

The number of pupils. Default is 4. 3 is also supported.

Definition at line 99 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), loadConfigImpl(), and processImage().

◆ m_pid

pid_t MagAOX::app::MagAOXApp< _useINDI >::m_pid
protectedinherited

This process's PID.

Definition at line 394 of file MagAOXApp.hpp.

◆ m_powerChannel

std::string MagAOX::app::MagAOXApp< _useINDI >::m_powerChannel
protectedinherited

The INDI property name of the channel controlling this device's power.

Definition at line 985 of file MagAOXApp.hpp.

◆ m_powerDevice

std::string MagAOX::app::MagAOXApp< _useINDI >::m_powerDevice
protectedinherited

The INDI device name of the power controller.

Definition at line 984 of file MagAOXApp.hpp.

◆ m_powerElement

std::string MagAOX::app::MagAOXApp< _useINDI >::m_powerElement
protectedinherited

The INDI element name to monitor for this device's power state.

Definition at line 986 of file MagAOXApp.hpp.

◆ m_powerMgtEnabled

bool MagAOX::app::MagAOXApp< _useINDI >::m_powerMgtEnabled
protectedinherited

Flag controls whether power mgt is used. Set this in the constructor of a derived app. If true, then if after loadConfig the powerDevice and powerChannel are empty, then the app will exit with a critical error.

Definition at line 981 of file MagAOXApp.hpp.

◆ m_powerOnCounter

int MagAOX::app::MagAOXApp< _useINDI >::m_powerOnCounter
protectedinherited

Counts numer of loops after power on, implements delay for device bootup. If -1, then device was NOT powered off on app startup.

Definition at line 992 of file MagAOXApp.hpp.

◆ m_powerOnWait

unsigned long MagAOX::app::MagAOXApp< _useINDI >::m_powerOnWait
protectedinherited

Time in sec to wait for device to boot after power on.

Definition at line 989 of file MagAOXApp.hpp.

◆ m_powerState

int MagAOX::app::MagAOXApp< _useINDI >::m_powerState
protectedinherited

Current power state, 1=On, 0=Off, -1=Unk.

Definition at line 995 of file MagAOXApp.hpp.

◆ m_powerTargetElement

std::string MagAOX::app::MagAOXApp< _useINDI >::m_powerTargetElement
protectedinherited

The INDI element name to monitor for this device's power state.

Definition at line 987 of file MagAOXApp.hpp.

◆ m_powerTargetState

int MagAOX::app::MagAOXApp< _useINDI >::m_powerTargetState
protectedinherited

Current target power state, 1=On, 0=Off, -1=Unk.

Definition at line 996 of file MagAOXApp.hpp.

◆ m_reconfig

bool MagAOX::app::dev::frameGrabber< pupilFit >::m_reconfig
protectedinherited

Flag to set if a camera reconfiguration requires a framegrabber reset.

Definition at line 116 of file frameGrabber.hpp.

◆ m_refIm

mx::improc::eigenImage<float> MagAOX::app::pupilFit::m_refIm
protected

Definition at line 102 of file pupilFit.hpp.

Referenced by allocate(), and processImage().

◆ m_refUpdated

bool MagAOX::app::pupilFit::m_refUpdated {false}
protected

Flag set if the online reference update is used.

Definition at line 148 of file pupilFit.hpp.

◆ m_restart [1/2]

bool MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_restart
protectedinherited

Flag indicating tha the shared memory should be reinitialized.

Definition at line 175 of file shmimMonitor.hpp.

◆ m_restart [2/2]

bool MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_restart
protectedinherited

Flag indicating tha the shared memory should be reinitialized.

Definition at line 175 of file shmimMonitor.hpp.

◆ m_self

MagAOXApp< _useINDI > * MagAOX::app::MagAOXApp< _useINDI >::m_self
staticprivateinherited

Static pointer to this (set in constructor). Used to test whether a a MagAOXApp is already instatiated (a fatal error) and used for getting out of static signal handlers.

Definition at line 291 of file MagAOXApp.hpp.

◆ m_selfMonitor [1/2]

shmimMonitor< pupilFit , shmimT > * MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_selfMonitor
staticprotectedinherited

Static pointer to this (set in constructor). Used for getting out of the static SIGSEGV handler.

Definition at line 177 of file shmimMonitor.hpp.

◆ m_selfMonitor [2/2]

shmimMonitor< pupilFit , refShmimT > * MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_selfMonitor
staticprotectedinherited

Static pointer to this (set in constructor). Used for getting out of the static SIGSEGV handler.

Definition at line 177 of file shmimMonitor.hpp.

◆ m_semaphoreNumber [1/2]

int MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_semaphoreNumber
protectedinherited

The image structure semaphore index.

Definition at line 95 of file shmimMonitor.hpp.

◆ m_semaphoreNumber [2/2]

int MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_semaphoreNumber
protectedinherited

The image structure semaphore index.

Definition at line 95 of file shmimMonitor.hpp.

◆ m_setD1

double MagAOX::app::pupilFit::m_setD1 {56.0}
protected

Definition at line 152 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_setD2

double MagAOX::app::pupilFit::m_setD2 {56.0}
protected

Definition at line 156 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_setD3

double MagAOX::app::pupilFit::m_setD3 {56.0}
protected

Definition at line 160 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_setD4

double MagAOX::app::pupilFit::m_setD4 {56.0}
protected

Definition at line 164 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_setPointSource

int MagAOX::app::pupilFit::m_setPointSource {USEDEFSET}
protected

Definition at line 146 of file pupilFit.hpp.

Referenced by allocate(), appLogic(), appStartup(), and loadConfigImpl().

◆ m_setx1

double MagAOX::app::pupilFit::m_setx1 {29.5}
protected

Definition at line 150 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_setx2

double MagAOX::app::pupilFit::m_setx2 {89.5}
protected

Definition at line 154 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_setx3

double MagAOX::app::pupilFit::m_setx3 {29.5}
protected

Definition at line 158 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_setx4

double MagAOX::app::pupilFit::m_setx4 {89.5}
protected

Definition at line 162 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_sety1

double MagAOX::app::pupilFit::m_sety1 {29.5}
protected

Definition at line 151 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_sety2

double MagAOX::app::pupilFit::m_sety2 {29.5}
protected

Definition at line 155 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_sety3

double MagAOX::app::pupilFit::m_sety3 {89.5}
protected

Definition at line 159 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_sety4

double MagAOX::app::pupilFit::m_sety4 {89.5}
protected

Definition at line 163 of file pupilFit.hpp.

Referenced by allocate(), appStartup(), and processImage().

◆ m_shmimName [1/3]

std::string MagAOX::app::dev::frameGrabber< pupilFit >::m_shmimName
protectedinherited

The name of the shared memory image, is used in /tmp/<shmimName>.im.shm. Derived classes should set a default.

Definition at line 88 of file frameGrabber.hpp.

◆ m_shmimName [2/3]

std::string MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_shmimName
protectedinherited

The name of the shared memory image, is used in /tmp/<shmimName>.im.shm. Derived classes should set a default.

Definition at line 85 of file shmimMonitor.hpp.

◆ m_shmimName [3/3]

std::string MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_shmimName
protectedinherited

The name of the shared memory image, is used in /tmp/<shmimName>.im.shm. Derived classes should set a default.

Definition at line 85 of file shmimMonitor.hpp.

◆ m_shutdown

int MagAOX::app::MagAOXApp< _useINDI >::m_shutdown
protectedinherited

Flag to signal it's time to shutdown. When not 0, the main loop exits.

Definition at line 102 of file MagAOXApp.hpp.

◆ m_smCpuset [1/2]

std::string MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_smCpuset
protectedinherited

The cpuset to assign the shmimMonitor thread to. Ignored if empty (the default).

Definition at line 89 of file shmimMonitor.hpp.

◆ m_smCpuset [2/2]

std::string MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_smCpuset
protectedinherited

The cpuset to assign the shmimMonitor thread to. Ignored if empty (the default).

Definition at line 89 of file shmimMonitor.hpp.

◆ m_smSemaphore

sem_t MagAOX::app::pupilFit::m_smSemaphore {0}
protected

Semaphore used to synchronize the fg thread and the sm thread.

Definition at line 345 of file pupilFit.hpp.

Referenced by acquireAndCheckValid(), appStartup(), and processImage().

◆ m_smThread [1/2]

std::thread MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_smThread
protectedinherited

A separate thread for the actual monitoring.

Definition at line 208 of file shmimMonitor.hpp.

◆ m_smThread [2/2]

std::thread MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_smThread
protectedinherited

A separate thread for the actual monitoring.

Definition at line 208 of file shmimMonitor.hpp.

◆ m_smThreadID [1/2]

pid_t MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_smThreadID
protectedinherited

The s.m. thread PID.

Definition at line 204 of file shmimMonitor.hpp.

◆ m_smThreadID [2/2]

pid_t MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_smThreadID
protectedinherited

The s.m. thread PID.

Definition at line 204 of file shmimMonitor.hpp.

◆ m_smThreadInit [1/2]

bool MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_smThreadInit
protectedinherited

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

Definition at line 202 of file shmimMonitor.hpp.

◆ m_smThreadInit [2/2]

bool MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_smThreadInit
protectedinherited

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

Definition at line 202 of file shmimMonitor.hpp.

◆ m_smThreadPrio [1/2]

int MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_smThreadPrio
protectedinherited

Priority of the shmimMonitor thread, should normally be > 00.

Definition at line 87 of file shmimMonitor.hpp.

◆ m_smThreadPrio [2/2]

int MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_smThreadPrio
protectedinherited

Priority of the shmimMonitor thread, should normally be > 00.

Definition at line 87 of file shmimMonitor.hpp.

◆ m_smThreadProp [1/2]

pcf::IndiProperty MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_smThreadProp
protectedinherited

The property to hold the s.m. thread details.

Definition at line 206 of file shmimMonitor.hpp.

◆ m_smThreadProp [2/2]

pcf::IndiProperty MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_smThreadProp
protectedinherited

The property to hold the s.m. thread details.

Definition at line 206 of file shmimMonitor.hpp.

◆ m_state

stateCodes::stateCodeT MagAOX::app::MagAOXApp< _useINDI >::m_state
privateinherited

The application's state. Never ever set this directly, use state(const stateCodeT & s).

Definition at line 468 of file MagAOXApp.hpp.

◆ m_stateAlert

bool MagAOX::app::MagAOXApp< _useINDI >::m_stateAlert
privateinherited

Definition at line 470 of file MagAOXApp.hpp.

◆ m_stateLogged

int MagAOX::app::MagAOXApp< _useINDI >::m_stateLogged
privateinherited

Counter and flag for use to log errors just once. Never ever access directly, use stateLogged().

Definition at line 474 of file MagAOXApp.hpp.

◆ m_suid

uid_t MagAOX::app::MagAOXApp< _useINDI >::m_suid
privateinherited

The save-set user id of the process.

Definition at line 316 of file MagAOXApp.hpp.

◆ m_tel

Definition at line 56 of file telemeter.hpp.

◆ m_threshold

float MagAOX::app::pupilFit::m_threshold {0.5}
protected

Definition at line 97 of file pupilFit.hpp.

Referenced by allocate(), appLogic(), appStartup(), loadConfigImpl(), and processImage().

◆ m_threshShmim

IMAGE MagAOX::app::pupilFit::m_threshShmim
protected

Definition at line 108 of file pupilFit.hpp.

Referenced by ~pupilFit(), allocate(), and processImage().

◆ m_threshShmimConnected

bool MagAOX::app::pupilFit::m_threshShmimConnected {false}
protected

Definition at line 109 of file pupilFit.hpp.

Referenced by ~pupilFit(), and allocate().

◆ m_threshShmimName

std::string MagAOX::app::pupilFit::m_threshShmimName {"camwfs_thresh"}
protected

The name of the image stream for the thresholded images. Default is camwfs_thresh.

Definition at line 94 of file pupilFit.hpp.

Referenced by allocate(), and loadConfigImpl().

◆ m_typeSize [1/3]

size_t MagAOX::app::dev::frameGrabber< pupilFit >::m_typeSize
protectedinherited

The size of the type, in bytes. Result of sizeof.

Definition at line 108 of file frameGrabber.hpp.

◆ m_typeSize [2/3]

size_t MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_typeSize
protectedinherited

The size of the type, in bytes. Result of sizeof.

Definition at line 102 of file shmimMonitor.hpp.

◆ m_typeSize [3/3]

size_t MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_typeSize
protectedinherited

The size of the type, in bytes. Result of sizeof.

Definition at line 102 of file shmimMonitor.hpp.

◆ m_updated

bool MagAOX::app::pupilFit::m_updated {false}
protected

Definition at line 343 of file pupilFit.hpp.

Referenced by acquireAndCheckValid(), loadImageIntoStream(), and processImage().

◆ m_useINDI

constexpr static bool MagAOX::app::MagAOXApp< _useINDI >::m_useINDI
staticconstexprprotectedinherited

Flag controlling whether INDI is used. If false, then no INDI code executes.

Definition at line 532 of file MagAOXApp.hpp.

◆ m_userSetD1

double MagAOX::app::pupilFit::m_userSetD1 {56.0}
protected

Definition at line 132 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSetD2

double MagAOX::app::pupilFit::m_userSetD2 {56.0}
protected

Definition at line 136 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSetD3

double MagAOX::app::pupilFit::m_userSetD3 {56.0}
protected

Definition at line 140 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSetD4

double MagAOX::app::pupilFit::m_userSetD4 {56.0}
protected

Definition at line 144 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSetx1

double MagAOX::app::pupilFit::m_userSetx1 {29.5}
protected

Definition at line 130 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSetx2

double MagAOX::app::pupilFit::m_userSetx2 {89.5}
protected

Definition at line 134 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSetx3

double MagAOX::app::pupilFit::m_userSetx3 {29.5}
protected

Definition at line 138 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSetx4

double MagAOX::app::pupilFit::m_userSetx4 {89.5}
protected

Definition at line 142 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSety1

double MagAOX::app::pupilFit::m_userSety1 {29.5}
protected

Definition at line 131 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSety2

double MagAOX::app::pupilFit::m_userSety2 {29.5}
protected

Definition at line 135 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSety3

double MagAOX::app::pupilFit::m_userSety3 {89.5}
protected

Definition at line 139 of file pupilFit.hpp.

Referenced by allocate().

◆ m_userSety4

double MagAOX::app::pupilFit::m_userSety4 {89.5}
protected

Definition at line 143 of file pupilFit.hpp.

Referenced by allocate().

◆ m_vara

double MagAOX::app::dev::frameGrabber< pupilFit >::m_vara
protectedinherited

Definition at line 134 of file frameGrabber.hpp.

◆ m_varD1

double MagAOX::app::pupilFit::m_varD1 {0}
protected

Definition at line 191 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varD2

double MagAOX::app::pupilFit::m_varD2 {0}
protected

Definition at line 215 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varD3

double MagAOX::app::pupilFit::m_varD3 {0}
protected

Definition at line 239 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varD4

double MagAOX::app::pupilFit::m_varD4 {0}
protected

Definition at line 263 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varDAll

double MagAOX::app::pupilFit::m_varDAll {0}
protected

Definition at line 287 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varmed1

double MagAOX::app::pupilFit::m_varmed1 {0}
protected

Definition at line 194 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varmed2

double MagAOX::app::pupilFit::m_varmed2 {0}
protected

Definition at line 218 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varmed3

double MagAOX::app::pupilFit::m_varmed3 {0}
protected

Definition at line 242 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varmed4

double MagAOX::app::pupilFit::m_varmed4 {0}
protected

Definition at line 266 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varmedAll

double MagAOX::app::pupilFit::m_varmedAll {0}
protected

Definition at line 290 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varw

double MagAOX::app::dev::frameGrabber< pupilFit >::m_varw
protectedinherited

Definition at line 137 of file frameGrabber.hpp.

◆ m_varwa

double MagAOX::app::dev::frameGrabber< pupilFit >::m_varwa
protectedinherited

Definition at line 140 of file frameGrabber.hpp.

◆ m_varx1

double MagAOX::app::pupilFit::m_varx1 {0}
protected

Definition at line 185 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varx2

double MagAOX::app::pupilFit::m_varx2 {0}
protected

Definition at line 209 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varx3

double MagAOX::app::pupilFit::m_varx3 {0}
protected

Definition at line 233 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varx4

double MagAOX::app::pupilFit::m_varx4 {0}
protected

Definition at line 257 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varxAll

double MagAOX::app::pupilFit::m_varxAll {0}
protected

Definition at line 281 of file pupilFit.hpp.

Referenced by processImage().

◆ m_vary1

double MagAOX::app::pupilFit::m_vary1 {0}
protected

Definition at line 188 of file pupilFit.hpp.

Referenced by processImage().

◆ m_vary2

double MagAOX::app::pupilFit::m_vary2 {0}
protected

Definition at line 212 of file pupilFit.hpp.

Referenced by processImage().

◆ m_vary3

double MagAOX::app::pupilFit::m_vary3 {0}
protected

Definition at line 236 of file pupilFit.hpp.

Referenced by processImage().

◆ m_vary4

double MagAOX::app::pupilFit::m_vary4 {0}
protected

Definition at line 260 of file pupilFit.hpp.

Referenced by processImage().

◆ m_varyAll

double MagAOX::app::pupilFit::m_varyAll {0}
protected

Definition at line 284 of file pupilFit.hpp.

Referenced by processImage().

◆ m_watimesD

std::vector<double> MagAOX::app::dev::frameGrabber< pupilFit >::m_watimesD
protectedinherited

Definition at line 127 of file frameGrabber.hpp.

◆ m_width [1/3]

uint32_t MagAOX::app::dev::frameGrabber< pupilFit >::m_width
protectedinherited

The width of the image, once deinterlaced etc.

Definition at line 104 of file frameGrabber.hpp.

◆ m_width [2/3]

uint32_t MagAOX::app::dev::shmimMonitor< pupilFit , refShmimT >::m_width
protectedinherited

The width of the images in the stream.

Definition at line 97 of file shmimMonitor.hpp.

◆ m_width [3/3]

uint32_t MagAOX::app::dev::shmimMonitor< pupilFit , shmimT >::m_width
protectedinherited

The width of the images in the stream.

Definition at line 97 of file shmimMonitor.hpp.

◆ m_wtimes

mx::sigproc::circularBufferIndex<timespec, cbIndexT> MagAOX::app::dev::frameGrabber< pupilFit >::m_wtimes
protectedinherited

Definition at line 123 of file frameGrabber.hpp.

◆ m_wtimesD

std::vector<double> MagAOX::app::dev::frameGrabber< pupilFit >::m_wtimesD
protectedinherited

Definition at line 126 of file frameGrabber.hpp.

◆ m_xbinning

int MagAOX::app::dev::frameGrabber< pupilFit >::m_xbinning
protectedinherited

The x-binning according to the framegrabber.

Definition at line 110 of file frameGrabber.hpp.

◆ m_ybinning

int MagAOX::app::dev::frameGrabber< pupilFit >::m_ybinning
protectedinherited

The y-binning according to the framegrabber.

Definition at line 111 of file frameGrabber.hpp.

◆ MagAOXPath

std::string MagAOX::app::MagAOXApp< _useINDI >::MagAOXPath
protectedinherited

The base path of the MagAO-X system.

Definition at line 86 of file MagAOXApp.hpp.

◆ pidFileName

std::string MagAOX::app::MagAOXApp< _useINDI >::pidFileName
protectedinherited

The name of the PID file.

Definition at line 392 of file MagAOXApp.hpp.

◆ secretsPath

std::string MagAOX::app::MagAOXApp< _useINDI >::secretsPath
protectedinherited

Path to the secrets directory, where passwords, etc, are stored.

Definition at line 98 of file MagAOXApp.hpp.

◆ sysPath

std::string MagAOX::app::MagAOXApp< _useINDI >::sysPath
protectedinherited

The path to the system directory, for PID file, etc.

Definition at line 96 of file MagAOXApp.hpp.


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