The MagAO-X Observer Controller. More...
#include <observerCtrl.hpp>


Classes | |
| struct | observer |
| The observer specification. More... | |
Public Types | |
| typedef XWC_DEFAULT_VERBOSITY | verboseT |
| typedef logger::logManager< MagAOXApp< _useINDI >, logFileRaw< verboseT > > | logManagerT |
| The log manager type. | |
| typedef XWC_DEFAULT_VERBOSITY | verboseT |
| typedef logger::logManager< observerCtrl, logFileRaw< verboseT > > | logManagerT |
| The log manager type. | |
Public Member Functions | |
| observerCtrl () | |
| Default c'tor. | |
| ~observerCtrl () noexcept | |
| D'tor, declared and defined for noexcept. | |
| virtual void | setupConfig () |
| Set up the observerCtrl configuration parameters. | |
| int | loadConfigImpl (mx::app::appConfigurator &_config) |
| Implementation of loadConfig logic, separated for testing. | |
| virtual void | loadConfig () |
| Load the observerCtrl configuration. | |
| virtual int | appStartup () |
| Startup function. | |
| virtual int | appLogic () |
| Implementation of the FSM for observerCtrl. | |
| virtual int | appShutdown () |
| Shutdown the app. | |
| void | startObserving () |
| Start the current observation and any stream writers owned by observerCtrl. | |
| void | stopObserving () |
| Stop the current observation and any stream writers owned by observerCtrl. | |
| virtual void | setDefaults (int argc, char **argv) |
| Set the paths for config files. | |
| virtual void | setupBasicConfig () |
| The basic MagAO-X configuration setup method. Should not normally be overridden. | |
| virtual void | loadBasicConfig () |
| The basic MagAO-X configuration processing method. Should not normally be overridden. | |
| virtual void | checkConfig () |
| Check for unused and unrecognized config options and settings. | |
| virtual int | execute () |
| The execute method implementing the standard main loop. Should not normally be overridden. | |
| int | telem (const typename telT::messageT &msg) |
| Make a telemetry recording. | |
| int | setupConfig (appConfigurator &config) |
| Setup an application configurator for the device section. | |
| int | loadConfig (appConfigurator &config) |
| Load the device section from an application configurator. | |
| int | checkRecordTimes (const telT &tel, telTs... tels) |
| Check the time of the last record for each telemetry type and make an entry if needed. | |
| int | checkRecordTimes (timespec &ts, const telT &tel, telTs... tels) |
| Worker function to actually perform the record time checking logic. | |
| int | checkRecordTimes (timespec &ts) |
| Empty function called at the end of the template list. | |
Telemeter Interface | |
| int | checkRecordTimes () |
| int | recordTelem (const telem_observer *) |
| int | recordObserver (bool force=false) |
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. | |
Member Accessors | |
| std::string | basePath () |
| Get the. | |
| std::string | configName () |
| Get the config name. | |
| std::string | configDir () |
| Get the config directory. | |
| std::string | configBase () |
| Get the config base file. | |
| std::string | calibDir () |
| Get the calibration directory. | |
| std::string | sysPath () |
| Get the system path. | |
| std::string | secretsPath () |
| Get the secrets path. | |
| std::string | cpusetPath () |
| Get the cpuset path. | |
| unsigned long | loopPause () |
| Get the loop pause time. | |
| int | shutdown () |
| Get the value of the shutdown flag. | |
| std::string | driverInName () |
| Get the INDI input FIFO file name. | |
| std::string | driverOutName () |
| Get the INDI output FIFO file name. | |
| std::string | driverCtrlName () |
| Get the INDI control FIFO file name. | |
Public Attributes | |
| logManagerT | m_tel |
| double | m_maxInterval |
| The maximum interval, in seconds, between telemetry records. Default is 10.0 seconds. | |
Protected Types | |
| typedef std::map< std::string, observer > | observerMapT |
Protected Member Functions | |
| std::string | streamWriterDeviceName (const std::string &writerName) const |
| Return the INDI device name used for a configured stream writer. | |
| bool | streamWriterSelected (const std::string &writerName) const |
| Return whether a stream writer is enabled for observation control. | |
| int | registerStreamWriter (const std::string &writerName, bool userSelectable) |
| Register one configured stream writer for remote writing-state tracking. | |
| bool | beginObservationStreamWriter (const std::string &writerName) |
| Determine whether observerCtrl should start a stream writer for a new observation. | |
| bool | endObservationStreamWriter (const std::string &writerName) |
| Determine whether observerCtrl should stop a stream writer when an observation ends. | |
| int | commandStreamWriter (const std::string &writerName, pcf::IndiElement::SwitchStateType state) |
| Send a writing toggle command to a configured stream writer. | |
Protected Attributes | |
| observerMapT | m_observers |
| The observers from the configuration file. | |
| observer | m_currentObserver |
| The current selected observer. | |
| observer | m_currentOperator |
| The current selected observer. | |
| std::string | m_obsName |
| The name of the observation. | |
| double | m_obsDuration { 0 } |
| The desired duration of the observation. If 0 then until stopped. | |
| bool | m_observing { false } |
| Flag indicating whether or not we are in an observation. | |
| std::string | m_target |
| The current target name shown to the observer. | |
| std::string | m_catObj |
| The latest catalog object name reported by the TCS. | |
| std::string | m_catRA |
| The latest catalog right ascension reported by the TCS. | |
| std::string | m_catDec |
| The latest catalog declination reported by the TCS. | |
| bool | m_loop { false } |
| Flag tracking loop state. true is loop closed. | |
| bool | m_labMode { false } |
| Flag tracking whether the TCS interface is in lab mode. | |
| bool | m_newTargetBlock { true } |
| bool | m_newTarget { false } |
| timePointT | m_obsStartTime |
| The start time of the current observation. | |
| timeStampT | m_obsStartTimeStamp |
| The UTC start time of the current observation. | |
| double | m_obsStartParang { 0 } |
| The parallactic angle at the start of the observation. | |
| timePointT | m_tgtStartTime |
| The start time of the current target. | |
| timeStampT | m_tgtStartTimeStamp |
| The UTC start time of the current target. | |
| double | m_tgtStartParang { 0 } |
| The parallactic angle at the start of observing the current target. | |
| double | m_parang { 0 } |
| The current parallactic angle. | |
| durationT | m_tgtTime |
| The current target time. Only updated while observing. | |
| double | m_tgtAng { 0 } |
| The current target angle. Only updated while observing. | |
| std::string | m_basePath |
| The base path of the MagAO-X system. | |
| std::string | m_configName |
| The name of the configuration file (minus .conf). | |
| std::string | m_configDir |
| The path to configuration files for MagAOX. | |
| std::string | m_configBase |
| The name of a base config class for this app (minus .conf). | |
| std::string | m_calibDir |
| The path to calibration files for MagAOX. | |
| std::string | m_sysPath |
| The path to the system directory, for PID file, etc. | |
| std::string | m_secretsPath |
| Path to the secrets directory, where passwords, etc, are stored. | |
| std::string | m_cpusetPath |
| Path to the cpusets mount. | |
| unsigned long | m_loopPause |
| int | m_shutdown |
| Flag to signal it's time to shutdown. When not 0, the main loop exits. | |
Configurable Parameters | |
| std::vector< std::string > | m_streamWriters |
| The configured stream writers available for user selection. | |
| std::vector< std::string > | m_defStreamWriters |
| The configured stream writers always managed for observations. | |
| std::map< std::string, pcf::IndiProperty > | m_indiP_streamWriterWriting |
Tracks the remote writing properties for configured stream writers. | |
| std::map< std::string, bool > | m_streamWriterSelectable |
| Tracks whether each configured stream writer is user-selectable in INDI. | |
| std::map< std::string, std::string > | m_streamWriterDevices |
| Reverse lookup from remote stream writer device name to configured writer name. | |
| std::map< std::string, bool > | m_streamWriterWriting |
| Tracks the last known remote writing state for each configured stream writer. | |
| std::map< std::string, bool > | m_streamWriterWritingKnown |
| Tracks whether a remote writing state has been received for each configured stream writer. | |
| std::map< std::string, bool > | m_streamWriterStartedByObserver |
| Tracks whether observerCtrl started each stream writer for the current observation. | |
| std::string | m_tcsDev { "tcsi" } |
| std::string | m_catalogProp { "catalog" } |
| std::string | m_objEl { "object" } |
| std::string | m_catdataProp { "catdata" } |
| std::string | m_raEl { "ra" } |
| std::string | m_decEl { "dec" } |
| std::string | m_labModeProp { "labMode" } |
| std::string | m_teldataProp { "teldata" } |
| std::string | m_parangEl { "pa" } |
| std::string | m_loopDev { "holoop" } |
| std::string | m_loopStateProp { "loop_state" } |
Private Types | |
| typedef dev::telemeter< observerCtrl > | telemeterT |
| typedef std::chrono::time_point< std::chrono::steady_clock > | timePointT |
| typedef std::string | timeStampT |
| typedef std::chrono::duration< double > | durationT |
Private Member Functions | |
| std::string | timeStampAsISO8601 (const std::chrono::time_point< std::chrono::system_clock > &tp) |
| Format a system-clock time point as an ISO 8601 UTC timestamp. | |
| int | clearFSMAlert () |
| Clear the FSM alert state. | |
| observerCtrl & | derived () |
| Access the derived class. | |
Friends | |
| class | observerCtrl_test |
| class | dev::telemeter< observerCtrl > |
INDI | |
| pcf::IndiProperty | m_indiP_observers |
| Selection switch to allow selection of the observer. | |
| pcf::IndiProperty | m_indiP_observer |
| Text which contains the specifications of the current observer. | |
| pcf::IndiProperty | m_indiP_operators |
| Selection switch to allow selection of the observer. | |
| pcf::IndiProperty | m_indiP_operator |
| Text which contains the specifications of the current observer. | |
| pcf::IndiProperty | m_indiP_obsName |
| pcf::IndiProperty | m_indiP_observing |
| Toggle switch to trigger observation. | |
| pcf::IndiProperty | m_indiP_obsDuration |
| Number to set the desired duration of observation. | |
| pcf::IndiProperty | m_indiP_obsStart |
| String timestamp indicating the start for target/observation. | |
| pcf::IndiProperty | m_indiP_obsTime |
| Number tracking the elapsed time. | |
| pcf::IndiProperty | m_indiP_obsAngle |
| Number tracking the change in angle. | |
| pcf::IndiProperty | m_indiP_sws |
| Selection to switch which user-managed stream writers are enabled. | |
| pcf::IndiProperty | m_indiP_userlog |
| Text to enter a user log. | |
| pcf::IndiProperty | m_indiP_resetTarget |
| Reset the target statistics. | |
| pcf::IndiProperty | m_indiP_target |
| The target name, which can be overridden by the user. | |
| pcf::IndiProperty | m_indiP_tcsTarget |
| Set the target to match TCS catObj. | |
| pcf::IndiProperty | m_indiP_catalog |
| Catalog text data. | |
| pcf::IndiProperty | m_indiP_catdata |
| Catalog numeric data. | |
| pcf::IndiProperty | m_indiP_teldata |
| Telescope data (for parang) | |
| pcf::IndiProperty | m_indiP_labMode |
| Tracks whether TCS is in lab mode. | |
| pcf::IndiProperty | m_indiP_loop |
| Tracks the loop state. | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_observers) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_operators) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_obsName) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_observing) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_obsDuration) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_sws) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_userlog) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_resetTarget) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_target) | |
| INDI_NEWCALLBACK_DECL (observerCtrl, m_indiP_tcsTarget) | |
| INDI_SETCALLBACK_DECL (observerCtrl, m_indiP_catalog) | |
| INDI_SETCALLBACK_DECL (observerCtrl, m_indiP_catdata) | |
| INDI_SETCALLBACK_DECL (observerCtrl, m_indiP_teldata) | |
| INDI_SETCALLBACK_DECL (observerCtrl, m_indiP_labMode) | |
| INDI_SETCALLBACK_DECL (observerCtrl, m_indiP_loop) | |
| int | setCallBack_streamWriterWriting (const pcf::IndiProperty &ipRecv) |
Handle remote stream writer writing property updates. | |
| static int | st_setCallBack_streamWriterWriting (void *app, const pcf::IndiProperty &ipRecv) |
Static wrapper for remote stream writer writing property updates. | |
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. | |
| pid_t | m_pid |
| This process's PID. | |
| int | lockPID () |
| int | unlockPID () |
| Remove the PID file. | |
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. | |
| std::unordered_map< std::string, indiCallBack > | m_indiNewCallBacks |
| Map to hold the NewProperty indiCallBacks for this App, with fast lookup by property name. | |
| std::unordered_map< std::string, indiCallBack > | m_indiSetCallBacks |
| Map to hold the SetProperty indiCallBacks for this App, with fast lookup by property name. | |
| bool | m_allDefsReceived |
| Flag indicating that all registered Set properties have been updated since last Get. | |
| std::string | m_driverInName |
| Full path name of the INDI driver input FIFO. | |
| std::string | m_driverOutName |
| Full path name of the INDI driver output FIFO. | |
| std::string | m_driverCtrlName |
| Full path name of the INDI driver control FIFO. | |
| pcf::IndiProperty | m_indiP_state |
| indi Property to report the application state. | |
| pcf::IndiProperty | m_indiP_clearFSMAlert |
| indi Property to clear an FSM alert. | |
| int | createINDIFIFOS () |
| Create the INDI FIFOs. | |
| int | startINDI () |
| Start INDI Communications. | |
| 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. | |
| 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. | |
| 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. | |
| void | updateIfChanged (pcf::IndiProperty &p, const std::vector< std::string > &els, const std::vector< T > &newVals, pcf::IndiProperty::PropertyStateType newState=pcf::IndiProperty::Ok) |
| Update an INDI property if values have changed. | |
| 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. | |
| void | updatesIfChanged (pcf::IndiProperty &p, const std::vector< const char * > &els, const std::vector< T > &newVals, pcf::IndiProperty::PropertyStateType newState=pcf::IndiProperty::Ok) |
| int | indiTargetUpdate (pcf::IndiProperty &localProperty, T &localTarget, const pcf::IndiProperty &remoteProperty, bool setBusy=true) |
| Get the target element value from an new property. | |
| 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) | |
| int | sendNewProperty (const pcf::IndiProperty &ipSend) |
| Send a newProperty command to another device (using the INDI Client interface) | |
| int | sendNewStandardIndiToggle (const std::string &device, const std::string &property, bool onoff) |
| Send a new property commmand for a standard toggle switch. | |
| int | newCallBack_clearFSMAlert (const pcf::IndiProperty &ipRecv) |
| The callback called by the static version, to actually process the FSM Alert Clear request. | |
| 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. | |
| 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. | |
| 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. | |
| int | createROIndiNumber (pcf::IndiProperty &prop, const std::string &propName, const std::string &propLabel="", const std::string &propGroup="") |
| Create a ReadOnly INDI Number property. | |
| 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. | |
| 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. | |
| 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. | |
| int | createStandardIndiSelectionSw (pcf::IndiProperty &prop, const std::string &name, const std::vector< std::string > &elements, const std::string &label="", const std::string &group="") |
| int | registerIndiPropertyReadOnly (pcf::IndiProperty &prop) |
| Register an INDI property which is read only. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| void | resetIndiSetPropertyRetry (indiCallBack &callBack) |
| Reset retry tracking for a monitored INDI Set-property subscription. | |
| bool | indiSetPropertyShouldRequest (const indiCallBack &callBack, bool all, const std::chrono::steady_clock::time_point &now) const |
| Determine whether an unresolved Set-property subscription should be requested now. | |
| void | noteIndiSetPropertyRequested (indiCallBack &callBack, const std::chrono::steady_clock::time_point &now) |
| Update retry tracking after sending a GetProperties request for a monitored Set-property. | |
| void | sendGetPropertySetList (bool all=false) |
| void | handleDefProperty (const pcf::IndiProperty &ipRecv) |
| Handler for the DEF INDI properties notification. | |
| void | handleGetProperties (const pcf::IndiProperty &ipRecv) |
| Handler for the get INDI properties request. | |
| void | handleNewProperty (const pcf::IndiProperty &ipRecv) |
| Handler for the new INDI property request. | |
| void | handleSetProperty (const pcf::IndiProperty &ipRecv) |
| Handler for the set INDI property request. | |
| typedef std::pair< std::string, indiCallBack > | callBackValueType |
| Value type of the indiCallBack map. | |
| typedef std::unordered_map< std::string, indiCallBack >::iterator | callBackIterator |
| Iterator type of the indiCallBack map. | |
| typedef std::pair< callBackIterator, bool > | callBackInsertResult |
| Return type of insert on the indiCallBack map. | |
| static constexpr bool | m_useINDI |
| Flag controlling whether INDI is used. If false, then no INDI code executes. | |
| indiDriver< MagAOXApp > * | m_indiDriver |
| The INDI driver wrapper. Constructed and initialized by execute, which starts and stops communications. | |
| std::mutex | m_indiMutex |
| Mutex for locking INDI communications. | |
| std::mutex | m_indiCallBackMutex |
| Mutex for locking INDI callback maps and per-entry callback state. | |
| 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. | |
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 |
| std::string | m_powerDevice |
| The INDI device name of the power controller. | |
| std::string | m_powerChannel |
| The INDI property name of the channel controlling this device's power. | |
| std::string | m_powerElement |
| The INDI element name to monitor for this device's power state. | |
| std::string | m_powerTargetElement |
| The INDI element name to monitor for this device's power state. | |
| unsigned long | m_powerOnWait |
| Default time in sec to wait for device to boot after power on. | |
| int | m_powerOnCounter |
| int | m_powerState |
| Current power state, 1=On, 0=Off, -1=Unk. | |
| int | m_powerTargetState |
| Current target power state, 1=On, 0=Off, -1=Unk. | |
| pcf::IndiProperty | m_indiP_powerChannel |
| INDI property used to communicate power state. | |
| virtual int | onPowerOff () |
| This method is called when the change to poweroff is detected. | |
| virtual int | whilePowerOff () |
| This method is called while the power is off, once per FSM loop. | |
| bool | powerOnWaitElapsed () |
| This method tests whether the power on wait time has elapsed. | |
| int | powerState () |
| Returns the current power state. | |
| int | powerStateTarget () |
| Returns the target power state. | |
| INDI_SETCALLBACK_DECL (MagAOXApp, m_indiP_powerChannel) | |
Signal Handling | |
| int | setSigTermHandler () |
| Sets the handler for SIGTERM, SIGQUIT, and SIGINT. | |
| void | handlerSigTerm (int signum, siginfo_t *siginf, void *ucont) |
| Handles SIGTERM, SIGQUIT, and SIGINT. Sets m_shutdown to 1 and logs the signal. | |
| static MagAOXApp * | m_self |
| 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. | |
Privilege Management | |
| int | setEuidCalled () |
| Set the effective user ID to the called value, i.e. the highest possible. | |
| int | setEuidReal () |
| Set the effective user ID to the real value, i.e. the file owner. | |
| uid_t | m_euidReal |
| The real user id of the proces (i.e. the lower privileged id of the user) | |
| uid_t | m_euidCalled |
| uid_t | m_suid |
| The save-set user id of the process. | |
Logging | |
| void | logMessage (bufferPtrT &b) |
| Handle a log message from the logging system. | |
| static int | log (const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT) |
| Make a log entry. | |
| static int | log (logPrioT level=logPrio::LOG_DEFAULT) |
| Make a log entry. | |
| static logManagerT | m_log |
| static void | configLog (const std::string &name, const int &code, const std::string &value, const std::string &source) |
| Callback for config system logging. | |
Application State | |
| stateCodes::stateCodeT | state () |
| Get the current state code. | |
| void | state (const stateCodes::stateCodeT &s, bool stateAlert=false) |
| Set the current state code. | |
| bool | stateAlert () |
| Get the value of the state alert flag. | |
| bool | gitAlert () |
| Get the value of the git alert flag. | |
| int | stateLogged () |
| Updates and returns the value of m_stateLogged. Will be 0 on first call after a state change, >0 afterwards. | |
| stateCodes::stateCodeT | m_state |
| bool | m_stateAlert |
| bool | m_gitAlert |
| int | m_stateLogged |
The MagAO-X Observer Controller.
Definition at line 38 of file observerCtrl.hpp.
| struct MagAOX::app::observerCtrl::observer |
The observer specification.
Definition at line 100 of file observerCtrl.hpp.

|
inherited |
Return type of insert on the indiCallBack map.
Definition at line 701 of file MagAOXApp.hpp.
|
inherited |
Iterator type of the indiCallBack map.
Definition at line 698 of file MagAOXApp.hpp.
|
inherited |
Value type of the indiCallBack map.
Definition at line 695 of file MagAOXApp.hpp.
|
private |
Definition at line 50 of file observerCtrl.hpp.
|
inherited |
The log manager type.
Definition at line 79 of file telemeter.hpp.
|
inherited |
The log manager type.
Definition at line 185 of file MagAOXApp.hpp.
|
protected |
Definition at line 110 of file observerCtrl.hpp.
Definition at line 46 of file observerCtrl.hpp.
|
private |
Definition at line 48 of file observerCtrl.hpp.
|
private |
Definition at line 49 of file observerCtrl.hpp.
|
inherited |
Definition at line 76 of file telemeter.hpp.
|
inherited |
Definition at line 182 of file MagAOXApp.hpp.
| MagAOX::app::observerCtrl::observerCtrl | ( | ) |
Default c'tor.
Definition at line 327 of file observerCtrl.hpp.
|
inlinenoexcept |
D'tor, declared and defined for noexcept.
Definition at line 193 of file observerCtrl.hpp.
|
staticprivateinherited |
The handler called when SIGTERM, SIGQUIT, or SIGINT is received. Just a wrapper for handlerSigTerm.
| [in] | signum | specifies the signal. |
| [in] | siginf | ignored by MagAOXApp |
| [in] | ucont | ignored by MagAOXApp |
Definition at line 404 of file MagAOXApp.hpp.
|
virtual |
Implementation of the FSM for observerCtrl.
Implements MagAOX::app::MagAOXApp< true >.
Definition at line 669 of file observerCtrl.hpp.
References INDI_IDLE, INDI_OK, MagAOX::app::it, MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), m_currentObserver, m_currentOperator, MagAOX::app::observerCtrl::observer::m_email, MagAOX::app::observerCtrl::observer::m_fullName, MagAOX::app::MagAOXApp< true >::m_indiMutex, m_indiP_obsAngle, m_indiP_obsDuration, m_indiP_observer, m_indiP_observers, m_indiP_observing, m_indiP_obsName, m_indiP_obsStart, m_indiP_obsTime, m_indiP_operator, m_indiP_operators, MagAOX::app::observerCtrl::observer::m_institution, m_obsDuration, m_observers, m_observing, m_obsName, m_obsStartParang, m_obsStartTime, m_obsStartTimeStamp, m_parang, MagAOX::app::observerCtrl::observer::m_pfoa, MagAOX::app::observerCtrl::observer::m_pronunciation, m_tgtAng, m_tgtStartParang, m_tgtStartTime, m_tgtStartTimeStamp, m_tgtTime, stopObserving(), TELEMETER_APP_LOGIC, and MagAOX::app::MagAOXApp< true >::updateSwitchIfChanged().
|
virtual |
Shutdown the app.
Implements MagAOX::app::MagAOXApp< true >.
Definition at line 760 of file observerCtrl.hpp.
References TELEMETER_APP_SHUTDOWN.
|
virtual |
Startup function.
Implements MagAOX::app::MagAOXApp< true >.
Definition at line 523 of file observerCtrl.hpp.
References MagAOX::app::indi::addTextElement(), MagAOX::app::MagAOXApp< true >::configName(), CREATE_REG_INDI_NEW_NUMBERD, CREATE_REG_INDI_NEW_REQUESTSWITCH, CREATE_REG_INDI_NEW_TEXT, CREATE_REG_INDI_NEW_TOGGLESWITCH, CREATE_REG_INDI_RO_NUMBER, MagAOX::app::MagAOXApp< true >::createStandardIndiSelectionSw(), MagAOX::app::it, MagAOX::app::MagAOXApp< true >::log(), m_catalogProp, m_catdataProp, m_currentObserver, m_currentOperator, m_defStreamWriters, m_indiP_catalog, m_indiP_catdata, m_indiP_labMode, m_indiP_loop, m_indiP_obsAngle, m_indiP_obsDuration, m_indiP_observer, m_indiP_observers, m_indiP_observing, m_indiP_obsName, m_indiP_obsStart, m_indiP_obsTime, m_indiP_operator, m_indiP_operators, m_indiP_resetTarget, m_indiP_sws, m_indiP_target, m_indiP_tcsTarget, m_indiP_teldata, m_indiP_userlog, m_labModeProp, m_loopDev, m_loopStateProp, m_observers, m_streamWriters, m_tcsDev, m_teldataProp, MagAOX::app::stateCodes::READY, REG_INDI_NEWPROP_NOCB, REG_INDI_NEWPROP_NOSETUP, REG_INDI_SETPROP, registerStreamWriter(), MagAOX::app::MagAOXApp< true >::state(), and TELEMETER_APP_STARTUP.
|
inherited |
|
inlineprotected |
Determine whether observerCtrl should start a stream writer for a new observation.
| [in] | writerName | the configured stream writer name |
Definition at line 378 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_streamWriterStartedByObserver, m_streamWriterWriting, m_streamWriterWritingKnown, and streamWriterSelected().
Referenced by startObserving(), and libXWCTest::observerCtrlTest::TEST_CASE().
|
inherited |
Get the calibration directory.
Definition at line 1273 of file MagAOXApp.hpp.
|
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 278 of file MagAOXApp.hpp.
|
inline |
Definition at line 1356 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log().
|
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.
| [in] | tel | [unused] object of the telemetry type to record |
| [in] | tels | [unused] objects of the additional telemetry types to record |
Definition at line 156 of file telemeter.hpp.
|
inherited |
Empty function called at the end of the template list.
| [in] | ts | [unused] the timestamp that records are compared to |
Definition at line 177 of file telemeter.hpp.
|
inherited |
Worker function to actually perform the record time checking logic.
Recursively calls itself until the variadic template list is exhausted.
| [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 167 of file telemeter.hpp.
|
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 642 of file MagAOXApp.hpp.
|
inlineprotected |
Send a writing toggle command to a configured stream writer.
| [in] | writerName | the configured stream writer name |
| [in] | state | the requested writing switch state |
Definition at line 406 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log(), MagAOX::app::MagAOXApp< true >::sendNewProperty(), MagAOX::app::MagAOXApp< true >::state(), and streamWriterDeviceName().
Referenced by startObserving(), and stopObserving().
|
inherited |
Get the config base file.
Definition at line 1268 of file MagAOXApp.hpp.
|
inherited |
Get the config directory.
Definition at line 1263 of file MagAOXApp.hpp.
|
staticprotectedinherited |
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.
| [in] | name | The name of the config value |
| [in] | code | numeric code specifying the type |
| [in] | value | the value read by the config system |
| [in] | source | the source of the value. |
Definition at line 384 of file MagAOXApp.hpp.
|
inherited |
Get the config name.
Definition at line 1257 of file MagAOXApp.hpp.
|
inherited |
Get the cpuset path.
Definition at line 1288 of file MagAOXApp.hpp.
|
protectedinherited |
Create the INDI FIFOs.
Changes permissions to max available and creates the FIFOs at the configured path.
Definition at line 960 of file MagAOXApp.hpp.
|
inherited |
Create a ReadOnly INDI Number property.
| [out] | prop | the property to create and setup |
| [in] | propName | the 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 783 of file MagAOXApp.hpp.
|
inherited |
Create a standard ReadOnly INDI Text property, with at least one element.
| [out] | prop | the property to create and setup |
| [in] | propName | the name of the property |
| [in] | elName | the 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 748 of file MagAOXApp.hpp.
|
inherited |
Create a standard R/W INDI Number property with target and current elements.
| [out] | prop | the property to create and setup |
| [in] | name | the name of the property |
| [in] | min | the minimum value for the elements, applied to both target and current |
| [in] | max | the minimum value for the elements, applied to both target and current |
| [in] | step | the step size for the elements, applied to both target and current |
| [in] | format | the _ 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 762 of file MagAOXApp.hpp.
|
inherited |
Create a standard R/W INDI switch with a single request element.
This switch is intended to function like a momentary switch.
| [out] | prop | the property to create and setup |
| [in] | name | the 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 809 of file MagAOXApp.hpp.
|
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.
| [out] | prop | the property to create and setup |
| [in] | name | the name of the property, |
| [in] | elements | the 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 840 of file MagAOXApp.hpp.
|
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.
| [out] | prop | the property to create and setup |
| [in] | name | the name of the property, |
| [in] | elements | the element names to give to the switches |
| [in] | elementLabels | the 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 822 of file MagAOXApp.hpp.
|
inherited |
Create a standard R/W INDI Text property with target and current elements.
| [out] | prop | the property to create and setup |
| [in] | propName | the 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 735 of file MagAOXApp.hpp.
|
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.
| [out] | prop | the property to create and setup |
| [in] | name | the 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 796 of file MagAOXApp.hpp.
|
inlineprivateinherited |
Access the derived class.
Definition at line 181 of file telemeter.hpp.
|
inherited |
Get the INDI control FIFO file name.
Definition at line 1317 of file MagAOXApp.hpp.
|
inherited |
Get the INDI input FIFO file name.
Definition at line 1305 of file MagAOXApp.hpp.
|
inherited |
Get the INDI output FIFO file name.
Definition at line 1311 of file MagAOXApp.hpp.
|
inlineprotected |
Determine whether observerCtrl should stop a stream writer when an observation ends.
| [in] | writerName | the configured stream writer name |
Definition at line 398 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log(), and m_streamWriterStartedByObserver.
Referenced by stopObserving(), and libXWCTest::observerCtrlTest::TEST_CASE().
|
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:
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.
Definition at line 308 of file MagAOXApp.hpp.
|
inherited |
Get the value of the git alert flag.
Definition at line 613 of file MagAOXApp.hpp.
|
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.
| [in] | ipRecv | The property being sent. |
Definition at line 976 of file MagAOXApp.hpp.
|
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.
| [in] | ipRecv | The property being requested. |
Definition at line 982 of file MagAOXApp.hpp.
|
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.
| [in] | ipRecv | The property being changed. |
Definition at line 992 of file MagAOXApp.hpp.
|
privateinherited |
Handles SIGTERM, SIGQUIT, and SIGINT. Sets m_shutdown to 1 and logs the signal.
| [in] | signum | specifies the signal. |
| [in] | siginf | ignored by MagAOXApp |
| [in] | ucont | ignored by MagAOXApp |
Definition at line 410 of file MagAOXApp.hpp.
|
inherited |
Handler for the set INDI property request.
This is called by m_indiDriver's indiDriver::handleSetProperties.
| [in] | ipRecv | The property being changed. |
Definition at line 1001 of file MagAOXApp.hpp.
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_obsDuration | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_observers | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_observing | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_obsName | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_operators | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_resetTarget | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_sws | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_target | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_tcsTarget | |||
| ) |
| MagAOX::app::observerCtrl::INDI_NEWCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_userlog | |||
| ) |
|
inherited |
| MagAOX::app::observerCtrl::INDI_SETCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_catalog | |||
| ) |
| MagAOX::app::observerCtrl::INDI_SETCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_catdata | |||
| ) |
| MagAOX::app::observerCtrl::INDI_SETCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_labMode | |||
| ) |
| MagAOX::app::observerCtrl::INDI_SETCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_loop | |||
| ) |
| MagAOX::app::observerCtrl::INDI_SETCALLBACK_DECL | ( | observerCtrl | , |
| m_indiP_teldata | |||
| ) |
|
inlineinherited |
Determine whether an unresolved Set-property subscription should be requested now.
| [in] | callBack | the subscription retry state to evaluate |
| [in] | all | if true, force an immediate refresh regardless of retry timing |
| [in] | now | the current monotonic time for scheduling |
Definition at line 944 of file MagAOXApp.hpp.
|
protectedinherited |
Get the target element value from an new property.
| [out] | localProperty | The local property to update |
| [out] | localTarget | The local value to update |
| [in] | remoteProperty | the new property received |
| [in] | setBusy | [optional] set property to busy if true |
Definition at line 1098 of file MagAOXApp.hpp.
|
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 272 of file MagAOXApp.hpp.
|
virtual |
Load the observerCtrl configuration.
Definition at line 505 of file observerCtrl.hpp.
References MagAOX::app::dev::telemeter< derivedT >::loadConfig(), loadConfigImpl(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_CRITICAL, m_observers, and MagAOX::app::MagAOXApp< true >::m_shutdown.
|
inherited |
Load the device section from an application configurator.
| [in] | config | an application configuration from which to load values |
Definition at line 120 of file telemeter.hpp.
| int MagAOX::app::observerCtrl::loadConfigImpl | ( | mx::app::appConfigurator & | _config | ) |
Implementation of loadConfig logic, separated for testing.
This is called by loadConfig().
| [in] | _config | an application configuration from which to load values |
Definition at line 443 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_CRITICAL, m_defStreamWriters, m_observers, and m_streamWriters.
Referenced by loadConfig().
|
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
Definition at line 522 of file MagAOXApp.hpp.
|
staticinherited |
Make a log entry.
Wrapper for logManager::log
| logT | the log entry type |
| retval | the value returned by this method. |
| [in] | msg | the message to log |
| [in] | level | [optional] the log level. The default is used if not specified. |
Definition at line 355 of file MagAOXApp.hpp.
|
staticinherited |
Make a log entry.
Wrapper for logManager::log
| logT | the log entry type |
| retval | the value returned by this method. |
| [in] | level | [optional] the log level. The default is used if not specified. |
Definition at line 368 of file MagAOXApp.hpp.
|
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 377 of file MagAOXApp.hpp.
|
inherited |
Get the loop pause time.
Definition at line 1293 of file MagAOXApp.hpp.
|
protectedinherited |
The callback called by the static version, to actually process the FSM Alert Clear request.
| [in] | ipRecv | the INDI property sent with the new property request. |
Definition at line 1155 of file MagAOXApp.hpp.
|
inlineinherited |
Update retry tracking after sending a GetProperties request for a monitored Set-property.
| callBack | [in/out] the subscription retry state to update | |
| [in] | now | the current monotonic time for scheduling |
Definition at line 951 of file MagAOXApp.hpp.
|
protectedvirtualinherited |
This method is called when the change to poweroff is detected.
Reimplemented in MagAOX::app::alpaoCtrl, MagAOX::app::bmcCtrl, MagAOX::app::irisaoCtrl, MagAOX::app::zaberLowLevel, and MagAOX::app::zaberLowLevelBinary.
Definition at line 1200 of file MagAOXApp.hpp.
|
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.
Definition at line 1216 of file MagAOXApp.hpp.
|
inherited |
Returns the current power state.
If power management is not enabled, this always returns 1=On.
Definition at line 1226 of file MagAOXApp.hpp.
|
inherited |
Returns the target power state.
If power management is not enabled, this always returns 1=On.
Definition at line 1235 of file MagAOXApp.hpp.
Definition at line 1366 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_currentObserver, m_currentOperator, MagAOX::app::observerCtrl::observer::m_email, m_observing, m_obsName, and m_target.
Referenced by recordTelem(), startObserving(), and stopObserving().
|
inline |
Definition at line 1361 of file observerCtrl.hpp.
References recordObserver().
|
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.
| [out] | prop | the property to register |
| [in] | propName | the name of the property |
| [in] | propType | the type of the property |
| [in] | propPerm | the permissions of the property |
| [in] | propState | the state of the property |
| [in] | propRule | the switch rule type |
|
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.
| [out] | prop | the property to register |
| [in] | propName | the name of the property |
| [in] | propType | the type of the property |
| [in] | propPerm | the permissions of the property |
| [in] | propState | the state of the property |
|
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.
| [in] | prop | the property to register, must be fully set up |
|
inherited |
Register an INDI property which is read only.
This version requires the property be fully set up.
| [in] | prop | the property to register, must be completely setup |
Definition at line 856 of file MagAOXApp.hpp.
|
inherited |
Register an INDI property which is read only.
This verison sets up the INDI property according to the arguments.
| [out] | prop | the property to register, will be configured |
| [in] | propName | the name of the property |
| [in] | propType | the type of the property |
| [in] | propPerm | the permissions of the property |
| [in] | propState | the state of the property |
Definition at line 866 of file MagAOXApp.hpp.
|
inherited |
Register an INDI property which is monitored for updates from others.
| [out] | prop | the property to register |
| [in] | devName | the device which owns this property |
| [in] | propName | the name of the property |
Definition at line 933 of file MagAOXApp.hpp.
|
inlineprotected |
Register one configured stream writer for remote writing-state tracking.
| [in] | writerName | the configured stream writer name |
| [in] | userSelectable | true if the writer should appear in the INDI selector |
Definition at line 353 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_indiP_streamWriterWriting, m_streamWriterDevices, m_streamWriterSelectable, m_streamWriterStartedByObserver, m_streamWriterWriting, m_streamWriterWritingKnown, MagAOX::app::MagAOXApp< true >::registerIndiPropertySet(), st_setCallBack_streamWriterWriting(), and streamWriterDeviceName().
Referenced by appStartup().
|
inlineinherited |
Reset retry tracking for a monitored INDI Set-property subscription.
| callBack | [in/out] the subscription retry state to reset |
Definition at line 941 of file MagAOXApp.hpp.
|
inherited |
Get the secrets path.
Definition at line 1283 of file MagAOXApp.hpp.
|
inherited |
Definition at line 970 of file MagAOXApp.hpp.
|
protectedinherited |
Send a newProperty command to another device (using the INDI Client interface)
| [in] | ipSend | The property to send a "new" INDI command for |
Definition at line 1121 of file MagAOXApp.hpp.
|
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.
| [in] | ipSend | The property to send a "new" INDI command for |
| [in] | el | The element of the property to change |
| [in] | newVal | The value to request for the element. |
Definition at line 1111 of file MagAOXApp.hpp.
|
protectedinherited |
Send a new property commmand for a standard toggle switch.
| [in] | device | The device name |
| [in] | property | The property name |
| [in] | onoff | Switch state to send: true = on, false = off |
Definition at line 1128 of file MagAOXApp.hpp.
Handle remote stream writer writing property updates.
| [in] | ipRecv | the remote writing property update |
Definition at line 838 of file observerCtrl.hpp.
References MagAOX::app::ipRecv, MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), MagAOX::app::MagAOXApp< true >::m_indiMutex, m_streamWriterDevices, m_streamWriterWriting, and m_streamWriterWritingKnown.
Referenced by st_setCallBack_streamWriterWriting(), and libXWCTest::observerCtrlTest::TEST_CASE().
|
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.
| [in] | argc | standard command line result specifying number of arguments in argv |
| [in] | argv | standard command line result containing the arguments. |
Definition at line 250 of file MagAOXApp.hpp.
|
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
Definition at line 481 of file MagAOXApp.hpp.
|
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
Definition at line 490 of file MagAOXApp.hpp.
|
privateinherited |
Sets the handler for SIGTERM, SIGQUIT, and SIGINT.
Definition at line 401 of file MagAOXApp.hpp.
|
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 262 of file MagAOXApp.hpp.
|
virtual |
Set up the observerCtrl configuration parameters.
Definition at line 418 of file observerCtrl.hpp.
References MagAOX::app::dev::telemeter< derivedT >::setupConfig().
|
inherited |
Setup an application configurator for the device section.
| [in] | config | an application configuration to setup |
Definition at line 112 of file telemeter.hpp.
|
inherited |
Get the value of the shutdown flag.
Definition at line 1299 of file MagAOXApp.hpp.
|
staticprotectedinherited |
The static callback function to be registered for requesting to clear the FSM alert.
| [in] | app | a pointer to this, will be static_cast-ed to MagAOXApp. |
| [in] | ipRecv | the INDI property sent with the new property request. |
Definition at line 1144 of file MagAOXApp.hpp.
|
inlinestatic |
Static wrapper for remote stream writer writing property updates.
| [in] | app | the application instance |
| [in] | ipRecv | the remote writing property update |
Definition at line 322 of file observerCtrl.hpp.
References MagAOX::app::ipRecv, and setCallBack_streamWriterWriting().
Referenced by registerStreamWriter().
|
protectedinherited |
Start INDI Communications.
Definition at line 967 of file MagAOXApp.hpp.
| void MagAOX::app::observerCtrl::startObserving | ( | ) |
Start the current observation and any stream writers owned by observerCtrl.
Definition at line 767 of file observerCtrl.hpp.
References beginObservationStreamWriter(), commandStreamWriter(), MagAOX::app::MagAOXApp< true >::log(), m_defStreamWriters, m_labMode, m_newTargetBlock, m_observing, m_obsStartParang, m_obsStartTime, m_obsStartTimeStamp, m_parang, m_streamWriters, m_tgtStartParang, m_tgtStartTime, m_tgtStartTimeStamp, recordObserver(), and timeStampAsISO8601().
|
inherited |
|
inherited |
Set the current state code.
| [in] | s | The new application state |
| [in] | stateAlert | [optional] flag to set the alert state of the FSM property. |
Definition at line 599 of file MagAOXApp.hpp.
|
inherited |
Get the value of the state alert flag.
Definition at line 607 of file MagAOXApp.hpp.
|
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:
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.
Definition at line 632 of file MagAOXApp.hpp.
| void MagAOX::app::observerCtrl::stopObserving | ( | ) |
Stop the current observation and any stream writers owned by observerCtrl.
Definition at line 810 of file observerCtrl.hpp.
References commandStreamWriter(), endObservationStreamWriter(), MagAOX::app::MagAOXApp< true >::log(), m_defStreamWriters, m_observing, m_streamWriters, and recordObserver().
Referenced by appLogic().
|
inlineprotected |
Return the INDI device name used for a configured stream writer.
| [in] | writerName | the configured stream writer name |
Definition at line 332 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log().
Referenced by commandStreamWriter(), and registerStreamWriter().
|
inlineprotected |
Return whether a stream writer is enabled for observation control.
| [in] | writerName | the configured stream writer name |
Definition at line 337 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_indiP_sws, and m_streamWriterSelectable.
Referenced by beginObservationStreamWriter().
|
inherited |
|
inherited |
Make a telemetry recording.
Wrapper for logManager::log, which updates telT::lastRecord.
| logT | the log entry type |
| retval | the value returned by this method. |
| [in] | msg | the data to log |
Definition at line 95 of file telemeter.hpp.
|
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:
where impl is the derived class, and mThreadStart and myThreadExec are members of impl.
| [out] | thrd | The 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] | thrdPrio | The r/t priority to set for this thread |
| [in] | cpuset | the cpuset to place this thread on. Ignored if "". |
| [in] | thrdName | The name of the thread (just for logging) |
| [in] | thrdThis | The this pointer to pass to the thread starter function |
| [in] | thrdStart | The thread starting function, a static function taking a this pointer as argument. |
Definition at line 556 of file MagAOXApp.hpp.
|
private |
Format a system-clock time point as an ISO 8601 UTC timestamp.
| [in] | tp | the time point to format |
Definition at line 978 of file observerCtrl.hpp.
References MagAOX::app::MagAOXApp< true >::log().
Referenced by startObserving().
|
protectedinherited |
Remove the PID file.
Definition at line 525 of file MagAOXApp.hpp.
|
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.
| p | [in/out] The property containing the element to possibly update | |
| [in] | el | The element name |
| [in] | newVal | the new value |
Definition at line 1031 of file MagAOXApp.hpp.
|
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.
| p | [in/out] The property containing the element to possibly update | |
| [in] | el | Beginning of each element name |
| [in] | newVals | the new values |
| [in] | ipState | [optional] the new state |
Definition at line 1060 of file MagAOXApp.hpp.
|
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.
| p | [in/out] The property containing the element to possibly update | |
| [in] | el | The element name |
| [in] | newVal | the new value |
Definition at line 1014 of file MagAOXApp.hpp.
|
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.
| p | [in/out] The property containing the element to possibly update | |
| [in] | els | String vector of element names |
| [in] | newVals | the new values |
| [in] | newState | [optional] The state of the property |
Definition at line 1077 of file MagAOXApp.hpp.
|
protectedinherited |
| p | [in/out] The property containing the element to possibly update | |
| [in] | els | String vector of element names |
| [in] | newVals | the new values |
| [in] | newState | [optional] The state of the property |
Definition at line 1085 of file MagAOXApp.hpp.
|
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.
| p | [in/out] The property containing the element to possibly update | |
| [in] | el | The element name |
| [in] | newVal | the new value |
Definition at line 1042 of file MagAOXApp.hpp.
|
protectedvirtualinherited |
This method is called while the power is off, once per FSM loop.
Reimplemented in MagAOX::app::alpaoCtrl, MagAOX::app::bmcCtrl, MagAOX::app::irisaoCtrl, MagAOX::app::zaberLowLevel, and MagAOX::app::zaberLowLevelBinary.
Definition at line 1207 of file MagAOXApp.hpp.
|
friend |
Definition at line 42 of file observerCtrl.hpp.
Definition at line 42 of file observerCtrl.hpp.
|
protectedinherited |
Flag indicating that all registered Set properties have been updated since last Get.
Definition at line 716 of file MagAOXApp.hpp.
|
protectedinherited |
The base path of the MagAO-X system.
Definition at line 188 of file MagAOXApp.hpp.
|
protectedinherited |
The path to calibration files for MagAOX.
Definition at line 196 of file MagAOXApp.hpp.
|
protected |
Definition at line 84 of file observerCtrl.hpp.
Referenced by appStartup().
|
protected |
Definition at line 86 of file observerCtrl.hpp.
Referenced by appStartup().
|
protected |
The latest catalog declination reported by the TCS.
Definition at line 128 of file observerCtrl.hpp.
|
protected |
The latest catalog object name reported by the TCS.
Definition at line 125 of file observerCtrl.hpp.
|
protected |
The latest catalog right ascension reported by the TCS.
Definition at line 127 of file observerCtrl.hpp.
|
protectedinherited |
The name of a base config class for this app (minus .conf).
Definition at line 194 of file MagAOXApp.hpp.
|
protectedinherited |
The path to configuration files for MagAOX.
Definition at line 192 of file MagAOXApp.hpp.
|
protectedinherited |
The name of the configuration file (minus .conf).
Definition at line 190 of file MagAOXApp.hpp.
|
protectedinherited |
Path to the cpusets mount.
The path to the cpusets mount is configured by the environment variable defined by MAGOX_env_cpuset in environment.hpp. This environment variable is normally named "CGROUPS1_CPUSET_MOUNTPOINT". If the environment variable is not set, the default defined by MAGAOX_cpusetPath in paths.hpp is used.
Definition at line 207 of file MagAOXApp.hpp.
|
protected |
The current selected observer.
Definition at line 114 of file observerCtrl.hpp.
Referenced by appLogic(), appStartup(), and recordObserver().
|
protected |
The current selected observer.
Definition at line 116 of file observerCtrl.hpp.
Referenced by appLogic(), appStartup(), and recordObserver().
|
protected |
Definition at line 88 of file observerCtrl.hpp.
|
protected |
The configured stream writers always managed for observations.
Definition at line 63 of file observerCtrl.hpp.
Referenced by appStartup(), loadConfigImpl(), startObserving(), and stopObserving().
|
protectedinherited |
Full path name of the INDI driver control FIFO.
This is currently only used to signal restarts.
Definition at line 727 of file MagAOXApp.hpp.
|
protectedinherited |
Full path name of the INDI driver input FIFO.
Definition at line 719 of file MagAOXApp.hpp.
|
protectedinherited |
Full path name of the INDI driver output FIFO.
Definition at line 722 of file MagAOXApp.hpp.
|
privateinherited |
The user id of the process as called (i.e. the higher privileged id of the owner, root if setuid).
Definition at line 422 of file MagAOXApp.hpp.
|
privateinherited |
The real user id of the proces (i.e. the lower privileged id of the user)
Definition at line 421 of file MagAOXApp.hpp.
|
privateinherited |
Definition at line 582 of file MagAOXApp.hpp.
|
inherited |
Mutex for locking INDI callback maps and per-entry callback state.
Lock ordering policy: 1) Prefer never holding both m_indiMutex and m_indiCallBackMutex at the same time. 2) If both are required in future code, always acquire m_indiMutex before m_indiCallBackMutex.
Definition at line 669 of file MagAOXApp.hpp.
|
inherited |
The INDI driver wrapper. Constructed and initialized by execute, which starts and stops communications.
Definition at line 659 of file MagAOXApp.hpp.
|
inherited |
Mutex for locking INDI communications.
Definition at line 662 of file MagAOXApp.hpp.
|
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 707 of file MagAOXApp.hpp.
|
protected |
|
protected |
|
protectedinherited |
indi Property to clear an FSM alert.
Definition at line 1137 of file MagAOXApp.hpp.
|
protected |
Tracks whether TCS is in lab mode.
Definition at line 265 of file observerCtrl.hpp.
Referenced by appStartup().
|
protected |
|
protected |
Number tracking the change in angle.
Definition at line 251 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
Number to set the desired duration of observation.
Definition at line 248 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
Text which contains the specifications of the current observer.
Definition at line 240 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
Selection switch to allow selection of the observer.
Definition at line 239 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
Toggle switch to trigger observation.
Definition at line 247 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
The current observation name, used to specify the purpose of the observation
Definition at line 245 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
String timestamp indicating the start for target/observation.
Definition at line 249 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
Number tracking the elapsed time.
Definition at line 250 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
Text which contains the specifications of the current observer.
Definition at line 243 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protected |
Selection switch to allow selection of the observer.
Definition at line 242 of file observerCtrl.hpp.
Referenced by appLogic(), and appStartup().
|
protectedinherited |
INDI property used to communicate power state.
Definition at line 1193 of file MagAOXApp.hpp.
|
protected |
Reset the target statistics.
Definition at line 255 of file observerCtrl.hpp.
Referenced by appStartup().
|
protectedinherited |
indi Property to report the application state.
Definition at line 1134 of file MagAOXApp.hpp.
|
protected |
Tracks the remote writing properties for configured stream writers.
Definition at line 66 of file observerCtrl.hpp.
Referenced by registerStreamWriter().
|
protected |
Selection to switch which user-managed stream writers are enabled.
Definition at line 252 of file observerCtrl.hpp.
Referenced by appStartup(), and streamWriterSelected().
|
protected |
The target name, which can be overridden by the user.
Definition at line 257 of file observerCtrl.hpp.
Referenced by appStartup().
|
protected |
Set the target to match TCS catObj.
Definition at line 259 of file observerCtrl.hpp.
Referenced by appStartup().
|
protected |
Telescope data (for parang)
Definition at line 263 of file observerCtrl.hpp.
Referenced by appStartup().
|
protected |
Text to enter a user log.
Definition at line 253 of file observerCtrl.hpp.
Referenced by appStartup().
|
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 712 of file MagAOXApp.hpp.
Flag tracking whether the TCS interface is in lab mode.
Definition at line 132 of file observerCtrl.hpp.
Referenced by startObserving().
|
protected |
Definition at line 89 of file observerCtrl.hpp.
Referenced by appStartup().
|
staticinherited |
Definition at line 345 of file MagAOXApp.hpp.
Flag tracking loop state. true is loop closed.
Definition at line 130 of file observerCtrl.hpp.
|
protected |
Definition at line 94 of file observerCtrl.hpp.
Referenced by appStartup().
|
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 209 of file MagAOXApp.hpp.
|
protected |
Definition at line 95 of file observerCtrl.hpp.
Referenced by appStartup().
|
inherited |
The maximum interval, in seconds, between telemetry records. Default is 10.0 seconds.
Definition at line 83 of file telemeter.hpp.
Flag to track when the target changes. Occurs either automatically on a TCS update or on a user override.
Definition at line 137 of file observerCtrl.hpp.
Flag to indicate that this is a new target block. This starts out as true but becomes false on the first observation. Then becomes true when the loop closes for the first time after a target change.
Definition at line 134 of file observerCtrl.hpp.
Referenced by startObserving().
|
protected |
Definition at line 85 of file observerCtrl.hpp.
|
protected |
The desired duration of the observation. If 0 then until stopped.
Definition at line 119 of file observerCtrl.hpp.
Referenced by appLogic().
|
protected |
The observers from the configuration file.
Definition at line 112 of file observerCtrl.hpp.
Referenced by appLogic(), appStartup(), loadConfig(), and loadConfigImpl().
Flag indicating whether or not we are in an observation.
Definition at line 121 of file observerCtrl.hpp.
Referenced by appLogic(), recordObserver(), startObserving(), and stopObserving().
|
protected |
The name of the observation.
Definition at line 118 of file observerCtrl.hpp.
Referenced by appLogic(), and recordObserver().
|
protected |
The parallactic angle at the start of the observation.
Definition at line 147 of file observerCtrl.hpp.
Referenced by appLogic(), and startObserving().
|
protected |
The start time of the current observation.
Definition at line 141 of file observerCtrl.hpp.
Referenced by appLogic(), and startObserving().
|
protected |
The UTC start time of the current observation.
Definition at line 144 of file observerCtrl.hpp.
Referenced by appLogic(), and startObserving().
|
protected |
The current parallactic angle.
Definition at line 159 of file observerCtrl.hpp.
Referenced by appLogic(), and startObserving().
|
protected |
Definition at line 92 of file observerCtrl.hpp.
|
protectedinherited |
This process's PID.
Definition at line 506 of file MagAOXApp.hpp.
|
protectedinherited |
The INDI property name of the channel controlling this device's power.
Definition at line 1179 of file MagAOXApp.hpp.
|
protectedinherited |
The INDI device name of the power controller.
Definition at line 1178 of file MagAOXApp.hpp.
|
protectedinherited |
The INDI element name to monitor for this device's power state.
Definition at line 1180 of file MagAOXApp.hpp.
|
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 1173 of file MagAOXApp.hpp.
|
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 1186 of file MagAOXApp.hpp.
|
protectedinherited |
Default time in sec to wait for device to boot after power on.
Definition at line 1183 of file MagAOXApp.hpp.
|
protectedinherited |
Current power state, 1=On, 0=Off, -1=Unk.
Definition at line 1190 of file MagAOXApp.hpp.
|
protectedinherited |
The INDI element name to monitor for this device's power state.
Definition at line 1181 of file MagAOXApp.hpp.
|
protectedinherited |
Current target power state, 1=On, 0=Off, -1=Unk.
Definition at line 1191 of file MagAOXApp.hpp.
|
protected |
Definition at line 87 of file observerCtrl.hpp.
|
protectedinherited |
Path to the secrets directory, where passwords, etc, are stored.
Definition at line 200 of file MagAOXApp.hpp.
|
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 397 of file MagAOXApp.hpp.
|
protectedinherited |
Flag to signal it's time to shutdown. When not 0, the main loop exits.
Definition at line 214 of file MagAOXApp.hpp.
|
privateinherited |
The application's state. Never ever set this directly, use state(const stateCodeT & s).
Definition at line 576 of file MagAOXApp.hpp.
|
privateinherited |
Definition at line 579 of file MagAOXApp.hpp.
|
privateinherited |
Counter and flag for use to log errors just once. Never ever access directly, use stateLogged().
Definition at line 584 of file MagAOXApp.hpp.
|
protected |
Reverse lookup from remote stream writer device name to configured writer name.
Definition at line 72 of file observerCtrl.hpp.
Referenced by registerStreamWriter(), and setCallBack_streamWriterWriting().
|
protected |
The configured stream writers available for user selection.
Definition at line 61 of file observerCtrl.hpp.
Referenced by appStartup(), loadConfigImpl(), startObserving(), and stopObserving().
|
protected |
Tracks whether each configured stream writer is user-selectable in INDI.
Definition at line 69 of file observerCtrl.hpp.
Referenced by registerStreamWriter(), and streamWriterSelected().
|
protected |
Tracks whether observerCtrl started each stream writer for the current observation.
Definition at line 81 of file observerCtrl.hpp.
Referenced by beginObservationStreamWriter(), endObservationStreamWriter(), and registerStreamWriter().
|
protected |
Tracks the last known remote writing state for each configured stream writer.
Definition at line 75 of file observerCtrl.hpp.
Referenced by beginObservationStreamWriter(), registerStreamWriter(), and setCallBack_streamWriterWriting().
|
protected |
Tracks whether a remote writing state has been received for each configured stream writer.
Definition at line 78 of file observerCtrl.hpp.
Referenced by beginObservationStreamWriter(), registerStreamWriter(), and setCallBack_streamWriterWriting().
|
privateinherited |
The save-set user id of the process.
Definition at line 424 of file MagAOXApp.hpp.
|
protectedinherited |
The path to the system directory, for PID file, etc.
Definition at line 198 of file MagAOXApp.hpp.
|
protected |
The current target name shown to the observer.
Definition at line 123 of file observerCtrl.hpp.
Referenced by recordObserver().
|
protected |
Definition at line 83 of file observerCtrl.hpp.
Referenced by appStartup().
|
inherited |
Definition at line 81 of file telemeter.hpp.
|
protected |
Definition at line 91 of file observerCtrl.hpp.
Referenced by appStartup().
|
protected |
The current target angle. Only updated while observing.
Definition at line 186 of file observerCtrl.hpp.
Referenced by appLogic().
|
protected |
The parallactic angle at the start of observing the current target.
Definition at line 156 of file observerCtrl.hpp.
Referenced by appLogic(), and startObserving().
|
protected |
The start time of the current target.
Definition at line 150 of file observerCtrl.hpp.
Referenced by appLogic(), and startObserving().
|
protected |
The UTC start time of the current target.
Definition at line 153 of file observerCtrl.hpp.
Referenced by appLogic(), and startObserving().
|
protected |
The current target time. Only updated while observing.
Definition at line 183 of file observerCtrl.hpp.
Referenced by appLogic().
|
staticconstexprprotectedinherited |
Flag controlling whether INDI is used. If false, then no INDI code executes.
Definition at line 654 of file MagAOXApp.hpp.
|
protectedinherited |
The name of the PID file.
Definition at line 504 of file MagAOXApp.hpp.