The MagAO-X Clay Telescope TCS Interface. More...
#include <tcsInterface.hpp>


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< tcsInterface, logFileRaw< verboseT > > | logManagerT |
| The log manager type. | |
Public Member Functions | |
| tcsInterface () | |
| Default c'tor. | |
| ~tcsInterface () noexcept | |
| D'tor, declared and defined for noexcept. | |
| virtual void | setupConfig () |
| int | loadConfigImpl (mx::app::appConfigurator &_config) |
| Implementation of loadConfig logic, separated for testing. | |
| virtual void | loadConfig () |
| virtual int | appStartup () |
| Startup function. | |
| virtual int | appLogic () |
| Implementation of the FSM for tcsInterface. | |
| virtual int | appShutdown () |
| Shutdown the app. | |
| int | getMagTelStatus (std::string &response, const std::string &statreq) |
| int | sendMagTelCommand (const std::string &command, int timeout) |
| int | parse_xms (double &x, double &m, double &s, const std::string &xmsstr) |
| std::vector< std::string > | parse_teldata (std::string &tdat) |
| int | getTelTime () |
| int | getTelPos () |
| int | getTelData () |
| int | getCatData () |
| int | getVaneData () |
| int | getEnvData () |
| int | badSeeing () |
| Record bad seeing measurements on errors in getSeeing(). | |
| int | getSeeing () |
| Query, parse, and record seeing measurements. | |
| int | updateINDI () |
| INDI_SETCALLBACK_DECL (tcsInterface, m_indiP_loopState) | |
| 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 | setupConfig (mx::app::appConfigurator &config) |
| Setup an application configurator for the device section. | |
| int | loadConfig (mx::app::appConfigurator &config) |
| Load the device section from an application configurator. | |
| 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 () |
| Check whether any telemetry records are due. | |
| int | recordTelem (const telem_telpos *) |
| Record telescope-position telemetry on a forced telemeter update. | |
| int | recordTelem (const telem_teldata *) |
| Record telescope-status telemetry on a forced telemeter update. | |
| int | recordTelem (const telem_telvane *) |
| Record vane-position telemetry on a forced telemeter update. | |
| int | recordTelem (const telem_telenv *) |
| Record telescope-environment telemetry on a forced telemeter update. | |
| int | recordTelem (const telem_telcat *) |
| Record catalog telemetry on a forced telemeter update. | |
| int | recordTelem (const telem_telsee *) |
| Record seeing telemetry on a forced telemeter update. | |
| int | recordTelem (const telem_tcsi_tiptilt *) |
| Record tip/tilt offload-control telemetry on a forced telemeter update. | |
| int | recordTelem (const telem_tcsi_focus *) |
| Record focus offload-control telemetry on a forced telemeter update. | |
| int | recordTelem (const telem_tcsi_labmode *) |
| Record lab-mode telemetry on a forced telemeter update. | |
| int | recordTelPos (bool force=false) |
| Record telescope-position telemetry when values change. | |
| int | recordTelData (bool force=false) |
| Record telescope-status telemetry when values change. | |
| int | recordTelVane (bool force=false) |
| Record vane-position telemetry when values change. | |
| int | recordTelEnv (bool force=false) |
| Record telescope-environment telemetry when values change. | |
| int | recordTelCat (bool force=false) |
| Record catalog telemetry when values change. | |
| int | recordTelSee (bool force=false) |
| Record seeing telemetry when values change. | |
| int | recordTcsiTipTilt (bool force=false) |
| Record tip/tilt offload-control telemetry when values change. | |
| int | recordTcsiFocus (bool force=false) |
| Record focus offload-control telemetry when values change. | |
| int | recordTcsiLabMode (bool force=false) |
| Record lab-mode telemetry when values change. | |
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 | |
| std::atomic< int > | m_loopState { 0 } |
| Tracks the current loop state shared between the INDI callback and the offload thread. | |
| pcf::IndiProperty | m_indiP_loopState |
| Property used to report the loop state. | |
| unsigned | m_readTimeout {1000} |
| The read timeout [msec]. | |
| unsigned | m_writeTimeout {1000} |
| The write timeout [msec]. | |
| logManagerT | m_tel |
| double | m_maxInterval |
| The maximum interval, in seconds, between telemetry records. Default is 10.0 seconds. | |
Protected Attributes | |
| double | m_telST { 0 } |
| pcf::IndiProperty | m_indiP_teltime |
| double | m_telEpoch { 0 } |
| double | m_telRA { 0 } |
| double | m_telDec { 0 } |
| double | m_telEl { 0 } |
| double | m_telHA { 0 } |
| double | m_telAM { 0 } |
| double | m_telRotOff { 0 } |
| pcf::IndiProperty | m_indiP_telpos |
| double | m_telSecZ { 0 } |
| double | m_telEncZ { 0 } |
| double | m_telSecX { 0 } |
| double | m_telEncX { 0 } |
| double | m_telSecY { 0 } |
| double | m_telEncY { 0 } |
| double | m_telSecH { 0 } |
| double | m_telEncH { 0 } |
| double | m_telSecV { 0 } |
| double | m_telEncV { 0 } |
| pcf::IndiProperty | m_indiP_vaneend |
| INDI Property for the vane end positions. | |
| double | m_wxtemp { 0 } |
| Outside temperature, Celsius. | |
| double | m_wxpres { 0 } |
| Outside pressue, millibars. | |
| double | m_wxhumid { 0 } |
| Outside humidity, percent. | |
| double | m_wxwind { 0 } |
| outside wind intensity, mph | |
| double | m_wxwdir { 0 } |
| outside wind direction, degrees | |
| double | m_ttruss { 0 } |
| Telescope truss temperature, Celsius. | |
| double | m_tcell { 0 } |
| Primary mirror cell temperature, Celsius. | |
| double | m_tseccell { 0 } |
| Secondary mirror cell temperature, Celsius. | |
| double | m_tambient { 0 } |
| Dome air temperature, Celsius. | |
| double | m_wxdewpoint { 0 } |
| Dew point from weather station. | |
| pcf::IndiProperty | m_indiP_env |
| INDI Property for environment. | |
| double | m_dimm_el { 0 } |
| DIMM elevation at time of seeing measurement. | |
| double | m_dimm_fwhm_corr { 0 } |
| DIMM elevation corrected FWHM. | |
| int | m_dimm_time { 0 } |
| Seconds since midnight of DIMM measurement. | |
| double | m_mag1_fwhm_corr { 0 } |
| MAG1 elevation corrected FWHM. | |
| int | m_mag1_time { 0 } |
| Seconds since midnight of MAG1 measurement. | |
| double | m_mag2_fwhm_corr { 0 } |
| MAG2 elevation corrected FWHM. | |
| int | m_mag2_time { 0 } |
| Seconds since midnight of MAG2 measurement. | |
| pcf::IndiProperty | m_indiP_seeing |
| INDI Property for seeing. | |
| 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. | |
TCS Networking | |
| std::string | m_deviceAddr { "localhost" } |
| The IP address or resolvable name of the TCS. | |
| int | m_devicePort { 5811 } |
| The IP port for TCS communications. Should be the command port. Default is 5811. | |
| int | m_seeingInterval { 2 } |
| std::mutex | m_tcsMutex |
| Mutex for locking TCS communications. | |
| tty::netSerial | m_sock |
Telescope Data | |
| int | m_telROI { 0 } |
| The rotator of interest. | |
| int | m_telTracking { 0 } |
| tracking state | |
| int | m_telGuiding { 0 } |
| guider moving state | |
| int | m_telSlewing { 0 } |
| slewing state | |
| int | m_telGuiderMoving { 0 } |
| guider moving state | |
| double | m_telAz { 0 } |
| azimuth | |
| double | m_telZd { 0 } |
| zenith distance | |
| double | m_telPA { 0 } |
| parallactic angle | |
| double | m_telDomeAz { 0 } |
| dome azimuth | |
| int | m_telDomeStat { 0 } |
| dome status | |
| pcf::IndiProperty | m_indiP_teldata |
Telescope Catalog Information | |
| double | m_catRA { 0 } |
| Catalog right ascension [degrees]. | |
| double | m_catDec { 0 } |
| Catalog declination [degrees]. | |
| double | m_catEp { 0 } |
| Catalog epoch. | |
| double | m_catRo { 0 } |
| Catalog rotator offset. | |
| std::string | m_catRm |
| Catalog rotator mode. | |
| std::string | m_catObj |
| Catalog object name. | |
| pcf::IndiProperty | m_indiP_catalog |
| INDI Property for the catalog text information. | |
| pcf::IndiProperty | m_indiP_catdata |
| INDI Property for the catalog data. | |
Private Member Functions | |
| int | clearFSMAlert () |
| Clear the FSM alert state. | |
| tcsInterface & | derived () |
| Access the derived class. | |
Friends | |
| class | tcsInterface_test |
| class | dev::telemeter< tcsInterface > |
lab mode | |
| bool | m_labMode { true } |
| Tracks whether the app is operating in lab mode rather than on-sky mode. | |
| pcf::IndiProperty | m_indiP_labMode |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_labMode) | |
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. | |
| 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. | |
| 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. | |
| 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) | |
Pyramid Nudging and Acquisition | |
Handling of nudges on pyramid tip. | |
| float | m_pyrNudge_C_00 { 1 } |
| float | m_pyrNudge_C_01 { 0 } |
| float | m_pyrNudge_C_10 { 0 } |
| float | m_pyrNudge_C_11 { 1 } |
| float | m_pyrNudge_F_sign { 1 } |
| float | m_pyrNudge_ang { 45.0 } |
| float | m_pyrNudge_ang0 { 0.0 } |
| float | m_pyrNudge_parity { -1 } |
| pcf::IndiProperty | m_indiP_pyrNudge |
| Property used to request a pyramid nudge. | |
| int | m_acqZdSign { -1 } |
| float | m_acqAz0 { 18.5 } |
| float | m_acqAzOff { 0 } |
| float | m_acqEl0 { 10 } |
| float | m_acqElOff { 0 } |
| float | m_acqFocus { 1400 } |
| pcf::IndiProperty | m_indiP_acqFromGuider |
| Property used to request a pyramid nudge. | |
| int | sendPyrNudge (float x, float y, float z) |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_pyrNudge) | |
| int | acquireFromGuider () |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_acqFromGuider) | |
Woofer Offloading | |
Handling of offloads from the average woofer shape to the telescope | |
| bool | m_offloadThreadInit { true } |
| Initialization flag for the offload thread. | |
| pid_t | m_offloadThreadID { 0 } |
| Offload thread pid. | |
| pcf::IndiProperty | m_offloadThreadProp |
| Offload thread INDI property. | |
| std::thread | m_offloadThread |
| The offloading thread. | |
| pcf::IndiProperty | m_indiP_offloadCoeffs |
| Property used to report the latest woofer modal coefficients for offloading. | |
| std::mutex | m_offloadCtrlMutex |
| Protects shared offload control parameters accessed by callbacks and the offload thread. | |
| std::mutex | m_offloadMutex |
| Protects the offload request ring and its queue-state indices across producer and consumer threads. | |
| std::vector< std::vector< float > > | m_offloadRequests |
| Ring buffer of modal offload requests indexed by mode and request slot. | |
| size_t | m_firstRequest { 0 } |
| Index of the oldest valid request in the offload ring. | |
| size_t | m_lastRequest { std::numeric_limits<size_t>::max() } |
| Index of the newest valid request in the offload ring. | |
| size_t | m_nRequests { 0 } |
| Number of valid requests currently stored in the offload ring. | |
| size_t | m_last_nRequests { 0 } |
| Request count last processed by the offload thread. | |
| float | m_lab_offlTT_C_00 { 0.17 } |
| float | m_lab_offlTT_C_01 { 1.03 } |
| float | m_lab_offlTT_C_10 { -1.03 } |
| float | m_lab_offlTT_C_11 { 0.48 } |
| float | m_offlTT_C_00 { -0.5 } |
| float | m_offlTT_C_01 { 0 } |
| float | m_offlTT_C_10 { 0 } |
| float | m_offlTT_C_11 { -0.25 } |
| bool | m_offlTT_enabled { false } |
| Tracks whether tip/tilt offloading is currently enabled. | |
| bool | m_offlTT_dump { false } |
| float | m_offlTT_avgInt { 1.0 } |
| The number of recent requests included in each tip/tilt offload average. | |
| float | m_offlTT_gain { 0.1 } |
| The operator-set gain applied to tip/tilt offload requests. | |
| float | m_offlTT_thresh { 0.1 } |
| The deadband threshold applied to tip/tilt offload requests. | |
| pcf::IndiProperty | m_indiP_offlTTenable |
| pcf::IndiProperty | m_indiP_offlTTdump |
| pcf::IndiProperty | m_indiP_offlTTavgInt |
| pcf::IndiProperty | m_indiP_offlTTgain |
| pcf::IndiProperty | m_indiP_offlTTthresh |
| float | m_offlCFocus_00 { 1 } |
| bool | m_offlF_enabled { false } |
| Tracks whether focus offloading is currently enabled. | |
| bool | m_offlF_dump { false } |
| float | m_offlF_avgInt { 1.0 } |
| The number of recent requests included in each focus offload average. | |
| float | m_offlF_gain { 0.1 } |
| The operator-set gain applied to focus offload requests. | |
| float | m_offlF_thresh { 0.1 } |
| The deadband threshold applied to focus offload requests. | |
| pcf::IndiProperty | m_indiP_offlFenable |
| pcf::IndiProperty | m_indiP_offlFdump |
| pcf::IndiProperty | m_indiP_offlFavgInt |
| pcf::IndiProperty | m_indiP_offlFgain |
| pcf::IndiProperty | m_indiP_offlFthresh |
| float | m_offlCComa_00 { 1 } |
| float | m_offlCComa_01 { 0 } |
| float | m_offlCComa_10 { 1 } |
| float | m_offlCComa_11 { 0 } |
| void | offloadThreadExec () |
| Offload thread function. | |
| int | doTToffload (float TT_0, float TT_1) |
| Apply tip/tilt offload controls to an averaged request vector. | |
| int | sendTToffload (float TT_0, float TT_1) |
| Send a tip/tilt offload command to the selected target. | |
| int | doFoffload (float F_0) |
| Apply focus offload controls to an averaged request value. | |
| int | sendFoffload (float F_0) |
| Send a focus offload command to the telescope. | |
| INDI_SETCALLBACK_DECL (tcsInterface, m_indiP_offloadCoeffs) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlTTenable) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlTTdump) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlTTavgInt) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlTTgain) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlTTthresh) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlFenable) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlFdump) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlFavgInt) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlFgain) | |
| INDI_NEWCALLBACK_DECL (tcsInterface, m_indiP_offlFthresh) | |
| static void | offloadThreadStart (tcsInterface *t) |
| Offload thread starter function. | |
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 |
Signal Handling | |
| static MagAOXApp * | m_self |
| 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 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 | |
| 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. | |
| 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. | |
The MagAO-X Clay Telescope TCS Interface.
Definition at line 43 of file tcsInterface.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.
|
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.
|
inherited |
Definition at line 76 of file telemeter.hpp.
|
inherited |
Definition at line 182 of file MagAOXApp.hpp.
|
inline |
Default c'tor.
Definition at line 471 of file tcsInterface.hpp.
|
inlinenoexcept |
D'tor, declared and defined for noexcept.
Definition at line 172 of file tcsInterface.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.
| int MagAOX::app::tcsInterface::acquireFromGuider | ( | ) |
Definition at line 3063 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_NOTICE, m_acqAz0, m_acqAzOff, m_acqEl0, m_acqElOff, m_acqFocus, m_acqZdSign, m_pyrNudge_F_sign, MagAOX::app::dev::ioDevice::m_readTimeout, m_telZd, and sendMagTelCommand().
|
inlinevirtual |
Implementation of the FSM for tcsInterface.
Implements MagAOX::app::MagAOXApp< true >.
Definition at line 1282 of file tcsInterface.hpp.
References MagAOX::app::stateCodes::CONNECTED, MagAOX::app::stateCodes::ERROR, getCatData(), getEnvData(), getSeeing(), getTelData(), getTelPos(), getTelTime(), getVaneData(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_WARNING, m_deviceAddr, m_devicePort, m_sock, MagAOX::app::stateCodes::NOTCONNECTED, MagAOX::tty::netSerial::serialInit(), MagAOX::app::MagAOXApp< true >::state(), MagAOX::app::MagAOXApp< true >::stateLogged(), MagAOX::tty::ttyErrorString(), and updateINDI().
|
inlinevirtual |
Shutdown the app.
Implements MagAOX::app::MagAOXApp< true >.
Definition at line 1396 of file tcsInterface.hpp.
References m_offloadThread.
|
inlinevirtual |
Startup function.
Implements MagAOX::app::MagAOXApp< true >.
Definition at line 856 of file tcsInterface.hpp.
References MagAOX::app::dev::ioDevice::appStartup(), CREATE_REG_INDI_NEW_TOGGLESWITCH, MagAOX::app::MagAOXApp< true >::createROIndiNumber(), MagAOX::app::MagAOXApp< true >::createROIndiText(), MagAOX::app::MagAOXApp< true >::createStandardIndiNumber(), MagAOX::app::MagAOXApp< true >::createStandardIndiRequestSw(), MagAOX::app::MagAOXApp< true >::createStandardIndiToggleSw(), INDI_OK, MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_NOTICE, m_catDec, m_catEp, m_catRA, m_catRo, m_dimm_fwhm_corr, m_dimm_time, m_indiP_acqFromGuider, m_indiP_catalog, m_indiP_catdata, m_indiP_env, m_indiP_labMode, m_indiP_loopState, m_indiP_offlFavgInt, m_indiP_offlFdump, m_indiP_offlFenable, m_indiP_offlFgain, m_indiP_offlFthresh, m_indiP_offloadCoeffs, m_indiP_offlTTavgInt, m_indiP_offlTTdump, m_indiP_offlTTenable, m_indiP_offlTTgain, m_indiP_offlTTthresh, m_indiP_pyrNudge, m_indiP_seeing, m_indiP_teldata, m_indiP_telpos, m_indiP_teltime, m_indiP_vaneend, m_labMode, m_mag1_fwhm_corr, m_mag1_time, m_mag2_fwhm_corr, m_mag2_time, m_offlF_avgInt, m_offlF_gain, m_offlF_thresh, m_offloadCtrlMutex, m_offloadRequests, m_offloadThread, m_offloadThreadID, m_offloadThreadInit, m_offloadThreadProp, m_offlTT_avgInt, m_offlTT_gain, m_offlTT_thresh, m_tambient, m_tcell, m_telAM, m_telAz, m_telDec, m_telDomeAz, m_telDomeStat, m_telEl, m_telEncH, m_telEncV, m_telEncX, m_telEncY, m_telEncZ, m_telEpoch, m_telGuiderMoving, m_telGuiding, m_telHA, m_telPA, m_telRA, m_telROI, m_telRotOff, m_telSecH, m_telSecV, m_telSecX, m_telSecY, m_telSecZ, m_telSlewing, m_telST, m_telTracking, m_telZd, m_tseccell, m_ttruss, m_wxdewpoint, m_wxhumid, m_wxpres, m_wxtemp, m_wxwdir, m_wxwind, MagAOX::app::stateCodes::NOTCONNECTED, offloadThreadStart(), recordTcsiFocus(), recordTcsiLabMode(), recordTcsiTipTilt(), REG_INDI_NEWPROP, REG_INDI_SETPROP, MagAOX::app::MagAOXApp< true >::registerIndiPropertyNew(), MagAOX::app::MagAOXApp< true >::registerIndiPropertyReadOnly(), resize(), MagAOX::app::MagAOXApp< true >::state(), MagAOX::app::MagAOXApp< true >::threadStart(), and MagAOX::app::MagAOXApp< true >::updateSwitchIfChanged().
| int MagAOX::app::tcsInterface::badSeeing | ( | ) |
Record bad seeing measurements on errors in getSeeing().
Definition at line 2045 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_dimm_fwhm_corr, m_dimm_time, m_mag1_fwhm_corr, m_mag1_time, m_mag2_fwhm_corr, m_mag2_time, and recordTelSee().
Referenced by getSeeing().
|
inherited |
|
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 |
Check whether any telemetry records are due.
Definition at line 2655 of file tcsInterface.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.
|
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.
Apply focus offload controls to an averaged request value.
| [in] | F_0 | averaged focus request |
Definition at line 3347 of file tcsInterface.hpp.
References MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_WARNING, m_labMode, m_offlF_dump, m_offlF_enabled, m_offlF_gain, m_offlF_thresh, m_offloadCtrlMutex, and sendFoffload().
Referenced by offloadThreadExec().
Apply tip/tilt offload controls to an averaged request vector.
| [in] | TT_0 | averaged tip request |
| [in] | TT_1 | averaged tilt request |
Definition at line 3258 of file tcsInterface.hpp.
References MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_WARNING, m_labMode, m_offloadCtrlMutex, m_offlTT_dump, m_offlTT_enabled, m_offlTT_gain, m_offlTT_thresh, and sendTToffload().
Referenced by offloadThreadExec().
|
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.
|
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.
|
inline |
Definition at line 1858 of file tcsInterface.hpp.
References MagAOX::app::stateCodes::ERROR, getMagTelStatus(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_WARNING, m_catDec, m_catEp, m_catObj, m_catRA, m_catRm, m_catRo, MagAOX::app::stateCodes::NOTCONNECTED, parse_teldata(), parse_xms(), and MagAOX::app::MagAOXApp< true >::state().
Referenced by appLogic().
|
inline |
Definition at line 1996 of file tcsInterface.hpp.
References getMagTelStatus(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_WARNING, m_tambient, m_tcell, m_tseccell, m_ttruss, m_wxdewpoint, m_wxhumid, m_wxpres, m_wxtemp, m_wxwdir, m_wxwind, MagAOX::app::stateCodes::NOTCONNECTED, parse_teldata(), recordTelEnv(), and MagAOX::app::MagAOXApp< true >::state().
Referenced by appLogic().
|
inline |
Definition at line 1413 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, MagAOX::app::dev::ioDevice::m_readTimeout, m_sock, m_tcsMutex, NETSERIAL_E_NOERROR, MagAOX::tty::netSerial::serialInString(), and MagAOX::tty::netSerial::serialOut().
Referenced by getCatData(), getEnvData(), getTelData(), getTelPos(), getTelTime(), and getVaneData().
| int MagAOX::app::tcsInterface::getSeeing | ( | ) |
Query, parse, and record seeing measurements.
Definition at line 2062 of file tcsInterface.hpp.
References badSeeing(), MagAOX::app::MagAOXApp< true >::log(), m_dimm_fwhm_corr, m_dimm_time, m_labMode, m_mag1_fwhm_corr, m_mag1_time, m_mag2_fwhm_corr, m_mag2_time, m_seeingInterval, parse_xms(), and recordTelSee().
Referenced by appLogic().
|
inline |
Definition at line 1790 of file tcsInterface.hpp.
References MagAOX::app::stateCodes::ERROR, getMagTelStatus(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_WARNING, m_telAz, m_telDomeAz, m_telDomeStat, m_telEl, m_telGuiderMoving, m_telGuiding, m_telPA, m_telROI, m_telSlewing, m_telTracking, m_telZd, MagAOX::app::stateCodes::NOTCONNECTED, parse_teldata(), recordTelData(), and MagAOX::app::MagAOXApp< true >::state().
Referenced by appLogic().
|
inline |
Definition at line 1716 of file tcsInterface.hpp.
References MagAOX::app::stateCodes::ERROR, getMagTelStatus(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_WARNING, m_telAM, m_telDec, m_telEpoch, m_telHA, m_telRA, m_telRotOff, MagAOX::app::stateCodes::NOTCONNECTED, parse_teldata(), parse_xms(), recordTelPos(), and MagAOX::app::MagAOXApp< true >::state().
Referenced by appLogic().
|
inline |
Definition at line 1673 of file tcsInterface.hpp.
References MagAOX::app::stateCodes::ERROR, getMagTelStatus(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_WARNING, m_telST, MagAOX::app::stateCodes::NOTCONNECTED, parse_teldata(), parse_xms(), and MagAOX::app::MagAOXApp< true >::state().
Referenced by appLogic().
|
inline |
Definition at line 1947 of file tcsInterface.hpp.
References MagAOX::app::stateCodes::ERROR, getMagTelStatus(), MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, flatlogs::logPrio::LOG_WARNING, m_telEncH, m_telEncV, m_telEncX, m_telEncY, m_telEncZ, m_telSecH, m_telSecV, m_telSecX, m_telSecY, m_telSecZ, MagAOX::app::stateCodes::NOTCONNECTED, parse_teldata(), recordTelVane(), and MagAOX::app::MagAOXApp< true >::state().
Referenced by appLogic().
|
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::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_acqFromGuider | |||
| ) |
|
protected |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlFavgInt | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlFdump | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlFenable | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlFgain | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlFthresh | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlTTavgInt | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlTTdump | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlTTenable | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlTTgain | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offlTTthresh | |||
| ) |
| MagAOX::app::tcsInterface::INDI_NEWCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_pyrNudge | |||
| ) |
|
inherited |
| MagAOX::app::tcsInterface::INDI_SETCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_loopState | |||
| ) |
| MagAOX::app::tcsInterface::INDI_SETCALLBACK_DECL | ( | tcsInterface | , |
| m_indiP_offloadCoeffs | |||
| ) |
|
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.
|
inlinevirtual |
Definition at line 851 of file tcsInterface.hpp.
References loadConfigImpl().
|
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.
|
inherited |
Load the device section from an application configurator.
| [in] | config | an application configuration from which to load values |
Definition at line 28 of file ioDevice.cpp.
References MagAOX::app::dev::ioDevice::m_readTimeout, and MagAOX::app::dev::ioDevice::m_writeTimeout.
Referenced by MagAOX::app::picoMotorCtrl::loadConfig(), MagAOX::app::smc100ccCtrl::loadConfig(), MagAOX::app::trippLitePDU::loadConfig(), MagAOX::app::dev::edtCamera< derivedT >::loadConfig(), MagAOX::app::flipperCtrl::loadConfigImpl(), MagAOX::app::pi335Ctrl::loadConfigImpl(), MagAOX::app::rhusbMon::loadConfigImpl(), and loadConfigImpl().
|
inline |
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 795 of file tcsInterface.hpp.
References MagAOX::app::dev::telemeter< derivedT >::loadConfig(), MagAOX::app::dev::ioDevice::loadConfig(), MagAOX::app::MagAOXApp< true >::log(), m_acqAz0, m_acqAzOff, m_acqEl0, m_acqElOff, m_acqFocus, m_acqZdSign, m_deviceAddr, m_devicePort, m_lab_offlTT_C_00, m_lab_offlTT_C_01, m_lab_offlTT_C_10, m_lab_offlTT_C_11, m_labMode, m_offlCComa_00, m_offlCComa_01, m_offlCComa_10, m_offlCComa_11, m_offlCFocus_00, m_offlF_avgInt, m_offlF_gain, m_offlF_thresh, m_offlTT_avgInt, m_offlTT_C_00, m_offlTT_C_01, m_offlTT_C_10, m_offlTT_C_11, m_offlTT_gain, m_offlTT_thresh, m_pyrNudge_ang, m_pyrNudge_ang0, m_pyrNudge_C_00, m_pyrNudge_C_01, m_pyrNudge_C_10, m_pyrNudge_C_11, and m_pyrNudge_parity.
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.
| void MagAOX::app::tcsInterface::offloadThreadExec | ( | ) |
Offload thread function.
Runs until m_shutdown is true.
Definition at line 3101 of file tcsInterface.hpp.
References MagAOX::app::stateCodes::CONNECTED, doFoffload(), doTToffload(), MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), m_firstRequest, m_last_nRequests, m_lastRequest, m_loopState, m_nRequests, m_offlF_avgInt, m_offloadCtrlMutex, m_offloadMutex, m_offloadRequests, m_offloadThreadID, m_offloadThreadInit, m_offlTT_avgInt, MagAOX::app::MagAOXApp< true >::shutdown(), and MagAOX::app::MagAOXApp< true >::state().
Referenced by offloadThreadStart().
|
static |
Offload thread starter function.
| [in] | t | pointer to this |
Definition at line 3096 of file tcsInterface.hpp.
References offloadThreadExec().
Referenced by appStartup().
|
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.
|
inline |
Definition at line 1501 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log().
Referenced by getCatData(), getEnvData(), getTelData(), getTelPos(), getTelTime(), and getVaneData().
|
inline |
Definition at line 1552 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log().
Referenced by getCatData(), getSeeing(), getTelPos(), getTelTime(), and libXWCTest::tcsInterfaceTest::SCENARIO().
|
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.
Record focus offload-control telemetry when values change.
Definition at line 2968 of file tcsInterface.hpp.
References MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), m_offlF_avgInt, m_offlF_enabled, m_offlF_gain, m_offlF_thresh, and m_offloadCtrlMutex.
Referenced by appStartup(), and recordTelem().
Record lab-mode telemetry when values change.
Definition at line 3001 of file tcsInterface.hpp.
References MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), m_labMode, and m_offloadCtrlMutex.
Referenced by appStartup(), and recordTelem().
Record tip/tilt offload-control telemetry when values change.
Definition at line 2935 of file tcsInterface.hpp.
References MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), m_offloadCtrlMutex, m_offlTT_avgInt, m_offlTT_enabled, m_offlTT_gain, and m_offlTT_thresh.
Referenced by appStartup(), and recordTelem().
Record catalog telemetry when values change.
Definition at line 2878 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_catDec, m_catEp, m_catObj, m_catRA, m_catRm, and m_catRo.
Referenced by recordTelem().
Record telescope-status telemetry when values change.
Definition at line 2749 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_telAz, m_telDomeAz, m_telDomeStat, m_telGuiderMoving, m_telGuiding, m_telPA, m_telROI, m_telSlewing, m_telTracking, and m_telZd.
Referenced by getTelData(), and recordTelem().
|
inline |
Record focus offload-control telemetry on a forced telemeter update.
Definition at line 2710 of file tcsInterface.hpp.
References recordTcsiFocus().
|
inline |
Record lab-mode telemetry on a forced telemeter update.
Definition at line 2716 of file tcsInterface.hpp.
References recordTcsiLabMode().
|
inline |
Record tip/tilt offload-control telemetry on a forced telemeter update.
Definition at line 2704 of file tcsInterface.hpp.
References recordTcsiTipTilt().
|
inline |
Record catalog telemetry on a forced telemeter update.
Definition at line 2692 of file tcsInterface.hpp.
References recordTelCat().
|
inline |
Record telescope-status telemetry on a forced telemeter update.
Definition at line 2674 of file tcsInterface.hpp.
References recordTelData().
|
inline |
Record telescope-environment telemetry on a forced telemeter update.
Definition at line 2686 of file tcsInterface.hpp.
References recordTelEnv().
|
inline |
Record telescope-position telemetry on a forced telemeter update.
Definition at line 2668 of file tcsInterface.hpp.
References recordTelPos().
|
inline |
Record seeing telemetry on a forced telemeter update.
Definition at line 2698 of file tcsInterface.hpp.
References recordTelSee().
|
inline |
Record vane-position telemetry on a forced telemeter update.
Definition at line 2680 of file tcsInterface.hpp.
References recordTelVane().
Record telescope-environment telemetry when values change.
Definition at line 2835 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_tambient, m_tcell, m_tseccell, m_ttruss, m_wxdewpoint, m_wxhumid, m_wxpres, m_wxtemp, m_wxwdir, and m_wxwind.
Referenced by getEnvData(), and recordTelem().
Record telescope-position telemetry when values change.
Definition at line 2722 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_telAM, m_telDec, m_telEl, m_telEpoch, m_telHA, m_telRA, and m_telRotOff.
Referenced by getTelPos(), and recordTelem().
Record seeing telemetry when values change.
Definition at line 2903 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_dimm_fwhm_corr, m_dimm_time, m_mag1_fwhm_corr, m_mag1_time, m_mag2_fwhm_corr, and m_mag2_time.
Referenced by badSeeing(), getSeeing(), and recordTelem().
Record vane-position telemetry when values change.
Definition at line 2792 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), m_telEncH, m_telEncV, m_telEncX, m_telEncY, m_telEncZ, m_telSecH, m_telSecV, m_telSecX, m_telSecY, and m_telSecZ.
Referenced by getVaneData(), and recordTelem().
|
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.
|
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.
Send a focus offload command to the telescope.
| [in] | F_0 | focus offload command |
Definition at line 3397 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), MagAOX::app::dev::ioDevice::m_readTimeout, and sendMagTelCommand().
Referenced by doFoffload().
|
inherited |
Definition at line 970 of file MagAOXApp.hpp.
|
inline |
Definition at line 1459 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_ERROR, m_sock, m_tcsMutex, NETSERIAL_E_NOERROR, MagAOX::tty::netSerial::serialInString(), and MagAOX::tty::netSerial::serialOut().
Referenced by acquireFromGuider(), sendFoffload(), sendPyrNudge(), and sendTToffload().
|
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.
Definition at line 3022 of file tcsInterface.hpp.
References MagAOX::app::MagAOXApp< true >::log(), flatlogs::logPrio::LOG_NOTICE, m_pyrNudge_C_00, m_pyrNudge_C_01, m_pyrNudge_C_10, m_pyrNudge_C_11, m_pyrNudge_F_sign, MagAOX::app::dev::ioDevice::m_readTimeout, and sendMagTelCommand().
Send a tip/tilt offload command to the selected target.
| [in] | TT_0 | tip offload command |
| [in] | TT_1 | tilt offload command |
Definition at line 3312 of file tcsInterface.hpp.
References MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), m_labMode, m_offloadCtrlMutex, MagAOX::app::dev::ioDevice::m_readTimeout, sendMagTelCommand(), and MagAOX::app::MagAOXApp< true >::sendNewProperty().
Referenced by doTToffload().
|
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.
|
inlinevirtual |
Definition at line 476 of file tcsInterface.hpp.
References MagAOX::app::dev::telemeter< derivedT >::setupConfig(), and MagAOX::app::dev::ioDevice::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 |
Setup an application configurator for the device section.
| [in] | config | an application configuration to setup |
Definition at line 20 of file ioDevice.cpp.
Referenced by MagAOX::app::flipperCtrl::setupConfig(), MagAOX::app::pi335Ctrl::setupConfig(), MagAOX::app::picoMotorCtrl::setupConfig(), MagAOX::app::rhusbMon::setupConfig(), MagAOX::app::smc100ccCtrl::setupConfig(), setupConfig(), MagAOX::app::trippLitePDU::setupConfig(), and MagAOX::app::dev::edtCamera< derivedT >::setupConfig().
|
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.
|
protectedinherited |
Start INDI Communications.
Definition at line 967 of file MagAOXApp.hpp.
|
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.
|
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.
|
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.
|
inline |
Definition at line 2259 of file tcsInterface.hpp.
References INDI_IDLE, INDI_OK, MagAOX::app::lock(), MagAOX::app::MagAOXApp< true >::log(), m_catDec, m_catEp, m_catObj, m_catRA, m_catRm, m_catRo, m_dimm_fwhm_corr, m_dimm_time, MagAOX::app::MagAOXApp< true >::m_indiDriver, m_indiP_catalog, m_indiP_catdata, m_indiP_env, m_indiP_offlFavgInt, m_indiP_offlFdump, m_indiP_offlFenable, m_indiP_offlFgain, m_indiP_offlFthresh, m_indiP_offlTTavgInt, m_indiP_offlTTdump, m_indiP_offlTTenable, m_indiP_offlTTgain, m_indiP_offlTTthresh, m_indiP_seeing, m_indiP_teldata, m_indiP_telpos, m_indiP_teltime, m_indiP_vaneend, m_mag1_fwhm_corr, m_mag1_time, m_mag2_fwhm_corr, m_mag2_time, m_offlF_avgInt, m_offlF_dump, m_offlF_enabled, m_offlF_gain, m_offlF_thresh, m_offloadCtrlMutex, m_offlTT_avgInt, m_offlTT_dump, m_offlTT_enabled, m_offlTT_gain, m_offlTT_thresh, m_tambient, m_tcell, m_telAM, m_telAz, m_telDec, m_telDomeAz, m_telDomeStat, m_telEl, m_telEncH, m_telEncV, m_telEncX, m_telEncY, m_telEncZ, m_telEpoch, m_telGuiderMoving, m_telGuiding, m_telHA, m_telPA, m_telRA, m_telROI, m_telRotOff, m_telSecH, m_telSecV, m_telSecX, m_telSecY, m_telSecZ, m_telSlewing, m_telST, m_telTracking, m_telZd, m_tseccell, m_ttruss, m_wxdewpoint, m_wxhumid, m_wxpres, m_wxtemp, m_wxwdir, m_wxwind, MagAOX::app::indi::updateIfChanged(), MagAOX::app::MagAOXApp< true >::updateIfChanged(), and MagAOX::app::MagAOXApp< true >::updateSwitchIfChanged().
Referenced by appLogic().
|
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 47 of file tcsInterface.hpp.
Definition at line 47 of file tcsInterface.hpp.
| float MagAOX::app::tcsInterface::m_acqAz0 { 18.5 } |
Definition at line 320 of file tcsInterface.hpp.
Referenced by acquireFromGuider(), and loadConfigImpl().
| float MagAOX::app::tcsInterface::m_acqAzOff { 0 } |
Definition at line 321 of file tcsInterface.hpp.
Referenced by acquireFromGuider(), and loadConfigImpl().
| float MagAOX::app::tcsInterface::m_acqEl0 { 10 } |
Definition at line 322 of file tcsInterface.hpp.
Referenced by acquireFromGuider(), and loadConfigImpl().
| float MagAOX::app::tcsInterface::m_acqElOff { 0 } |
Definition at line 323 of file tcsInterface.hpp.
Referenced by acquireFromGuider(), and loadConfigImpl().
| float MagAOX::app::tcsInterface::m_acqFocus { 1400 } |
Definition at line 324 of file tcsInterface.hpp.
Referenced by acquireFromGuider(), and loadConfigImpl().
| int MagAOX::app::tcsInterface::m_acqZdSign { -1 } |
Definition at line 319 of file tcsInterface.hpp.
Referenced by acquireFromGuider(), and loadConfigImpl().
|
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 |
Catalog declination [degrees].
Definition at line 116 of file tcsInterface.hpp.
Referenced by appStartup(), getCatData(), recordTelCat(), and updateINDI().
|
protected |
Catalog epoch.
Definition at line 117 of file tcsInterface.hpp.
Referenced by appStartup(), getCatData(), recordTelCat(), and updateINDI().
|
protected |
Catalog object name.
Definition at line 120 of file tcsInterface.hpp.
Referenced by getCatData(), recordTelCat(), and updateINDI().
|
protected |
Catalog right ascension [degrees].
Definition at line 115 of file tcsInterface.hpp.
Referenced by appStartup(), getCatData(), recordTelCat(), and updateINDI().
|
protected |
Catalog rotator mode.
Definition at line 119 of file tcsInterface.hpp.
Referenced by getCatData(), recordTelCat(), and updateINDI().
|
protected |
Catalog rotator offset.
Definition at line 118 of file tcsInterface.hpp.
Referenced by appStartup(), getCatData(), recordTelCat(), and updateINDI().
|
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 IP address or resolvable name of the TCS.
Definition at line 68 of file tcsInterface.hpp.
Referenced by appLogic(), and loadConfigImpl().
|
protected |
The IP port for TCS communications. Should be the command port. Default is 5811.
Definition at line 69 of file tcsInterface.hpp.
Referenced by appLogic(), and loadConfigImpl().
|
protected |
DIMM elevation at time of seeing measurement.
Definition at line 155 of file tcsInterface.hpp.
|
protected |
DIMM elevation corrected FWHM.
Definition at line 156 of file tcsInterface.hpp.
Referenced by appStartup(), badSeeing(), getSeeing(), recordTelSee(), and updateINDI().
|
protected |
Seconds since midnight of DIMM measurement.
Definition at line 157 of file tcsInterface.hpp.
Referenced by appStartup(), badSeeing(), getSeeing(), recordTelSee(), and updateINDI().
|
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.
| size_t MagAOX::app::tcsInterface::m_firstRequest { 0 } |
Index of the oldest valid request in the offload ring.
Definition at line 387 of file tcsInterface.hpp.
Referenced by offloadThreadExec().
|
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.
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_acqFromGuider |
Property used to request a pyramid nudge.
Definition at line 328 of file tcsInterface.hpp.
Referenced by appStartup().
|
protected |
INDI Property for the catalog text information.
Definition at line 122 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
protected |
INDI Property for the catalog data.
Definition at line 123 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
protectedinherited |
indi Property to clear an FSM alert.
Definition at line 1137 of file MagAOXApp.hpp.
|
protected |
INDI Property for environment.
Definition at line 152 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
protected |
Definition at line 59 of file tcsInterface.hpp.
Referenced by appStartup().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_loopState |
Property used to report the loop state.
Definition at line 294 of file tcsInterface.hpp.
Referenced by appStartup().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlFavgInt |
Definition at line 454 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlFdump |
Definition at line 451 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlFenable |
Definition at line 448 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlFgain |
Definition at line 457 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlFthresh |
Definition at line 460 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offloadCoeffs |
Property used to report the latest woofer modal coefficients for offloading.
Definition at line 373 of file tcsInterface.hpp.
Referenced by appStartup().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlTTavgInt |
Definition at line 426 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlTTdump |
Definition at line 423 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlTTenable |
Definition at line 420 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlTTgain |
Definition at line 429 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_offlTTthresh |
Definition at line 432 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
protectedinherited |
INDI property used to communicate power state.
Definition at line 1193 of file MagAOXApp.hpp.
| pcf::IndiProperty MagAOX::app::tcsInterface::m_indiP_pyrNudge |
Property used to request a pyramid nudge.
Definition at line 316 of file tcsInterface.hpp.
Referenced by appStartup().
|
protected |
INDI Property for seeing.
Definition at line 165 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
protectedinherited |
indi Property to report the application state.
Definition at line 1134 of file MagAOXApp.hpp.
|
protected |
Definition at line 109 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
protected |
Definition at line 93 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
protected |
Definition at line 82 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
protected |
INDI Property for the vane end positions.
Definition at line 138 of file tcsInterface.hpp.
Referenced by appStartup(), and updateINDI().
|
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.
| float MagAOX::app::tcsInterface::m_lab_offlTT_C_00 { 0.17 } |
Definition at line 399 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_lab_offlTT_C_01 { 1.03 } |
Definition at line 400 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_lab_offlTT_C_10 { -1.03 } |
Definition at line 401 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_lab_offlTT_C_11 { 0.48 } |
Definition at line 402 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
Tracks whether the app is operating in lab mode rather than on-sky mode.
Definition at line 57 of file tcsInterface.hpp.
Referenced by appStartup(), doFoffload(), doTToffload(), getSeeing(), loadConfigImpl(), recordTcsiLabMode(), and sendTToffload().
| size_t MagAOX::app::tcsInterface::m_last_nRequests { 0 } |
Request count last processed by the offload thread.
Definition at line 396 of file tcsInterface.hpp.
Referenced by offloadThreadExec().
Index of the newest valid request in the offload ring.
Definition at line 390 of file tcsInterface.hpp.
Referenced by offloadThreadExec().
|
staticinherited |
Definition at line 345 of file MagAOXApp.hpp.
|
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.
| std::atomic<int> MagAOX::app::tcsInterface::m_loopState { 0 } |
Tracks the current loop state shared between the INDI callback and the offload thread.
Definition at line 293 of file tcsInterface.hpp.
Referenced by offloadThreadExec().
|
protected |
MAG1 elevation corrected FWHM.
Definition at line 159 of file tcsInterface.hpp.
Referenced by appStartup(), badSeeing(), getSeeing(), recordTelSee(), and updateINDI().
|
protected |
Seconds since midnight of MAG1 measurement.
Definition at line 160 of file tcsInterface.hpp.
Referenced by appStartup(), badSeeing(), getSeeing(), recordTelSee(), and updateINDI().
|
protected |
MAG2 elevation corrected FWHM.
Definition at line 162 of file tcsInterface.hpp.
Referenced by appStartup(), badSeeing(), getSeeing(), recordTelSee(), and updateINDI().
|
protected |
Seconds since midnight of MAG2 measurement.
Definition at line 163 of file tcsInterface.hpp.
Referenced by appStartup(), badSeeing(), getSeeing(), recordTelSee(), and updateINDI().
|
inherited |
The maximum interval, in seconds, between telemetry records. Default is 10.0 seconds.
Definition at line 83 of file telemeter.hpp.
| size_t MagAOX::app::tcsInterface::m_nRequests { 0 } |
Number of valid requests currently stored in the offload ring.
Definition at line 393 of file tcsInterface.hpp.
Referenced by offloadThreadExec().
| float MagAOX::app::tcsInterface::m_offlCComa_00 { 1 } |
Definition at line 463 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_offlCComa_01 { 0 } |
Definition at line 464 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_offlCComa_10 { 1 } |
Definition at line 465 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_offlCComa_11 { 0 } |
Definition at line 466 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_offlCFocus_00 { 1 } |
Definition at line 436 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_offlF_avgInt { 1.0 } |
The number of recent requests included in each focus offload average.
Definition at line 442 of file tcsInterface.hpp.
Referenced by appStartup(), loadConfigImpl(), offloadThreadExec(), recordTcsiFocus(), and updateINDI().
Definition at line 440 of file tcsInterface.hpp.
Referenced by doFoffload(), and updateINDI().
Tracks whether focus offloading is currently enabled.
Definition at line 439 of file tcsInterface.hpp.
Referenced by doFoffload(), recordTcsiFocus(), and updateINDI().
| float MagAOX::app::tcsInterface::m_offlF_gain { 0.1 } |
The operator-set gain applied to focus offload requests.
Definition at line 444 of file tcsInterface.hpp.
Referenced by appStartup(), doFoffload(), loadConfigImpl(), recordTcsiFocus(), and updateINDI().
| float MagAOX::app::tcsInterface::m_offlF_thresh { 0.1 } |
The deadband threshold applied to focus offload requests.
Definition at line 446 of file tcsInterface.hpp.
Referenced by appStartup(), doFoffload(), loadConfigImpl(), recordTcsiFocus(), and updateINDI().
| std::mutex MagAOX::app::tcsInterface::m_offloadCtrlMutex |
Protects shared offload control parameters accessed by callbacks and the offload thread.
Definition at line 378 of file tcsInterface.hpp.
Referenced by appStartup(), doFoffload(), doTToffload(), offloadThreadExec(), recordTcsiFocus(), recordTcsiLabMode(), recordTcsiTipTilt(), sendTToffload(), and updateINDI().
| std::mutex MagAOX::app::tcsInterface::m_offloadMutex |
Protects the offload request ring and its queue-state indices across producer and consumer threads.
Definition at line 381 of file tcsInterface.hpp.
Referenced by offloadThreadExec().
| std::vector<std::vector<float> > MagAOX::app::tcsInterface::m_offloadRequests |
Ring buffer of modal offload requests indexed by mode and request slot.
Definition at line 384 of file tcsInterface.hpp.
Referenced by appStartup(), and offloadThreadExec().
| std::thread MagAOX::app::tcsInterface::m_offloadThread |
The offloading thread.
Definition at line 344 of file tcsInterface.hpp.
Referenced by appShutdown(), and appStartup().
| pid_t MagAOX::app::tcsInterface::m_offloadThreadID { 0 } |
Offload thread pid.
Definition at line 340 of file tcsInterface.hpp.
Referenced by appStartup(), and offloadThreadExec().
Initialization flag for the offload thread.
Definition at line 338 of file tcsInterface.hpp.
Referenced by appStartup(), and offloadThreadExec().
| pcf::IndiProperty MagAOX::app::tcsInterface::m_offloadThreadProp |
Offload thread INDI property.
Definition at line 342 of file tcsInterface.hpp.
Referenced by appStartup().
| float MagAOX::app::tcsInterface::m_offlTT_avgInt { 1.0 } |
The number of recent requests included in each tip/tilt offload average.
Definition at line 414 of file tcsInterface.hpp.
Referenced by appStartup(), loadConfigImpl(), offloadThreadExec(), recordTcsiTipTilt(), and updateINDI().
| float MagAOX::app::tcsInterface::m_offlTT_C_00 { -0.5 } |
Definition at line 405 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_offlTT_C_01 { 0 } |
Definition at line 406 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_offlTT_C_10 { 0 } |
Definition at line 407 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_offlTT_C_11 { -0.25 } |
Definition at line 408 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
Definition at line 412 of file tcsInterface.hpp.
Referenced by doTToffload(), and updateINDI().
Tracks whether tip/tilt offloading is currently enabled.
Definition at line 411 of file tcsInterface.hpp.
Referenced by doTToffload(), recordTcsiTipTilt(), and updateINDI().
| float MagAOX::app::tcsInterface::m_offlTT_gain { 0.1 } |
The operator-set gain applied to tip/tilt offload requests.
Definition at line 416 of file tcsInterface.hpp.
Referenced by appStartup(), doTToffload(), loadConfigImpl(), recordTcsiTipTilt(), and updateINDI().
| float MagAOX::app::tcsInterface::m_offlTT_thresh { 0.1 } |
The deadband threshold applied to tip/tilt offload requests.
Definition at line 418 of file tcsInterface.hpp.
Referenced by appStartup(), doTToffload(), loadConfigImpl(), recordTcsiTipTilt(), and updateINDI().
|
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.
| float MagAOX::app::tcsInterface::m_pyrNudge_ang { 45.0 } |
Definition at line 310 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_pyrNudge_ang0 { 0.0 } |
Definition at line 311 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
| float MagAOX::app::tcsInterface::m_pyrNudge_C_00 { 1 } |
Definition at line 304 of file tcsInterface.hpp.
Referenced by loadConfigImpl(), and sendPyrNudge().
| float MagAOX::app::tcsInterface::m_pyrNudge_C_01 { 0 } |
Definition at line 305 of file tcsInterface.hpp.
Referenced by loadConfigImpl(), and sendPyrNudge().
| float MagAOX::app::tcsInterface::m_pyrNudge_C_10 { 0 } |
Definition at line 306 of file tcsInterface.hpp.
Referenced by loadConfigImpl(), and sendPyrNudge().
| float MagAOX::app::tcsInterface::m_pyrNudge_C_11 { 1 } |
Definition at line 307 of file tcsInterface.hpp.
Referenced by loadConfigImpl(), and sendPyrNudge().
| float MagAOX::app::tcsInterface::m_pyrNudge_F_sign { 1 } |
Definition at line 308 of file tcsInterface.hpp.
Referenced by acquireFromGuider(), and sendPyrNudge().
| float MagAOX::app::tcsInterface::m_pyrNudge_parity { -1 } |
Definition at line 312 of file tcsInterface.hpp.
Referenced by loadConfigImpl().
|
inherited |
The read timeout [msec].
Definition at line 28 of file ioDevice.hpp.
Referenced by MagAOX::app::rhusbMon::rhusbMon(), acquireFromGuider(), MagAOX::app::picoMotorCtrl::appLogic(), MagAOX::app::trippLitePDU::devPostLogin(), MagAOX::app::trippLitePDU::devStatus(), MagAOX::app::pi335Ctrl::finishInit(), MagAOX::app::pi335Ctrl::getCom(), MagAOX::app::smc100ccCtrl::getCtrlState(), MagAOX::app::smc100ccCtrl::getLastError(), getMagTelStatus(), MagAOX::app::flipperCtrl::getPos(), MagAOX::app::smc100ccCtrl::getPosition(), MagAOX::app::pi335Ctrl::initDM(), MagAOX::app::dev::ioDevice::loadConfig(), MagAOX::app::rhusbMon::readProbe(), sendFoffload(), sendPyrNudge(), sendTToffload(), MagAOX::app::pi335Ctrl::testConnection(), MagAOX::app::smc100ccCtrl::testConnection(), MagAOX::app::trippLitePDU::turnOutletOff(), and MagAOX::app::trippLitePDU::turnOutletOn().
|
protectedinherited |
Path to the secrets directory, where passwords, etc, are stored.
Definition at line 200 of file MagAOXApp.hpp.
|
protected |
Definition at line 70 of file tcsInterface.hpp.
Referenced by getSeeing().
|
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.
|
protected |
Definition at line 75 of file tcsInterface.hpp.
Referenced by appLogic(), getMagTelStatus(), and sendMagTelCommand().
|
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.
|
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 |
Dome air temperature, Celsius.
Definition at line 149 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protected |
Primary mirror cell temperature, Celsius.
Definition at line 147 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protected |
Mutex for locking TCS communications.
Definition at line 73 of file tcsInterface.hpp.
Referenced by getMagTelStatus(), and sendMagTelCommand().
|
inherited |
Definition at line 81 of file telemeter.hpp.
|
protected |
Definition at line 90 of file tcsInterface.hpp.
Referenced by appStartup(), getTelPos(), recordTelPos(), and updateINDI().
|
protected |
azimuth
Definition at line 103 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
Definition at line 87 of file tcsInterface.hpp.
Referenced by appStartup(), getTelPos(), recordTelPos(), and updateINDI().
|
protected |
dome azimuth
Definition at line 106 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
dome status
Definition at line 107 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
Definition at line 88 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelPos(), and updateINDI().
|
protected |
Definition at line 134 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 136 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 130 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 132 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 128 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 85 of file tcsInterface.hpp.
Referenced by appStartup(), getTelPos(), recordTelPos(), and updateINDI().
|
protected |
guider moving state
Definition at line 102 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
guider moving state
Definition at line 100 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
Definition at line 89 of file tcsInterface.hpp.
Referenced by appStartup(), getTelPos(), recordTelPos(), and updateINDI().
|
protected |
parallactic angle
Definition at line 105 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
Definition at line 86 of file tcsInterface.hpp.
Referenced by appStartup(), getTelPos(), recordTelPos(), and updateINDI().
|
protected |
The rotator of interest.
Definition at line 98 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
Definition at line 91 of file tcsInterface.hpp.
Referenced by appStartup(), getTelPos(), recordTelPos(), and updateINDI().
|
protected |
Definition at line 133 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 135 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 129 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 131 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
Definition at line 127 of file tcsInterface.hpp.
Referenced by appStartup(), getVaneData(), recordTelVane(), and updateINDI().
|
protected |
slewing state
Definition at line 101 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
Definition at line 80 of file tcsInterface.hpp.
Referenced by appStartup(), getTelTime(), and updateINDI().
|
protected |
tracking state
Definition at line 99 of file tcsInterface.hpp.
Referenced by appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
zenith distance
Definition at line 104 of file tcsInterface.hpp.
Referenced by acquireFromGuider(), appStartup(), getTelData(), recordTelData(), and updateINDI().
|
protected |
Secondary mirror cell temperature, Celsius.
Definition at line 148 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protected |
Telescope truss temperature, Celsius.
Definition at line 146 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
staticconstexprprotectedinherited |
Flag controlling whether INDI is used. If false, then no INDI code executes.
Definition at line 654 of file MagAOXApp.hpp.
|
inherited |
The write timeout [msec].
Definition at line 29 of file ioDevice.hpp.
Referenced by MagAOX::app::rhusbMon::rhusbMon(), MagAOX::app::picoMotorCtrl::appLogic(), MagAOX::app::smc100ccCtrl::appLogic(), MagAOX::app::picoMotorCtrl::channelThreadExec(), MagAOX::app::trippLitePDU::devPostLogin(), MagAOX::app::trippLitePDU::devStatus(), MagAOX::app::pi335Ctrl::finishInit(), MagAOX::app::pi335Ctrl::getCom(), MagAOX::app::smc100ccCtrl::getCtrlState(), MagAOX::app::smc100ccCtrl::getLastError(), MagAOX::app::flipperCtrl::getPos(), MagAOX::app::smc100ccCtrl::getPosition(), MagAOX::app::pi335Ctrl::home_1(), MagAOX::app::pi335Ctrl::home_2(), MagAOX::app::pi335Ctrl::home_3(), MagAOX::app::pi335Ctrl::initDM(), MagAOX::app::dev::ioDevice::loadConfig(), MagAOX::app::pi335Ctrl::move_1(), MagAOX::app::pi335Ctrl::move_2(), MagAOX::app::pi335Ctrl::move_3(), MagAOX::app::smc100ccCtrl::moveTo(), MagAOX::app::flipperCtrl::moveTo(), MagAOX::app::rhusbMon::readProbe(), MagAOX::app::pi335Ctrl::releaseDM(), MagAOX::app::smc100ccCtrl::startHoming(), MagAOX::app::smc100ccCtrl::stop(), MagAOX::app::pi335Ctrl::testConnection(), MagAOX::app::smc100ccCtrl::testConnection(), MagAOX::app::trippLitePDU::turnOutletOff(), and MagAOX::app::trippLitePDU::turnOutletOn().
|
protected |
Dew point from weather station.
Definition at line 150 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protected |
Outside humidity, percent.
Definition at line 143 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protected |
Outside pressue, millibars.
Definition at line 142 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protected |
Outside temperature, Celsius.
Definition at line 141 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protected |
outside wind direction, degrees
Definition at line 145 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protected |
outside wind intensity, mph
Definition at line 144 of file tcsInterface.hpp.
Referenced by appStartup(), getEnvData(), recordTelEnv(), and updateINDI().
|
protectedinherited |
The name of the PID file.
Definition at line 504 of file MagAOXApp.hpp.