#include <signal.h>#include <sys/stat.h>#include <sys/syscall.h>#include <chrono>#include <cstdlib>#include <fstream>#include <sstream>#include <thread>#include <mutex>#include <unordered_map>#include <mx/mxlib.hpp>#include <mx/app/application.hpp>#include <mx/sys/environment.hpp>#include <mx/sys/timeUtils.hpp>#include <mx/ioutils/fileUtils.hpp>#include "../common/environment.hpp"#include "../common/paths.hpp"#include "../common/defaults.hpp"#include "../common/config.hpp"#include "../logger/logFileRaw.hpp"#include "../logger/logManager.hpp"#include "../sys/thSetuid.hpp"#include "stateCodes.hpp"#include "indiDriver.hpp"#include "indiMacros.hpp"#include "indiUtils.hpp"

Go to the source code of this file.
Classes | |
| class | MagAOX::app::MagAOXApp< _useINDI > |
| The base-class for XWCTk applications. More... | |
| class | MagAOX::app::MagAOXApp< _useINDI >::elevatedPrivileges |
| Internal class to manage setuid privilege escalation with RAII. More... | |
| struct | MagAOX::app::MagAOXApp< _useINDI >::indiCallBack |
| Structure to hold the call-back details for handling INDI communications. More... | |
Namespaces | |
| namespace | libXWCTest |
| Namespace for all libXWC tests. | |
| namespace | libXWCTest::appTest |
| namespace | libXWCTest::appTest::MagAOXAppTest |
| Namespace for XWC::app::MagAOXApp tests. | |
| namespace | MagAOX |
| namespace | MagAOX::app |
Macros | |
| #define | XWCAPP_THREAD_START(thrdSt, thrdInit, thrdId, thrdProp, thrdPrio, thrdCpuset, thrdName, thrdStart) |
| Error handling wrapper for the threadStart function of the XWCApp. | |
| #define | XWCAPP_THREAD_CHECK(thrdSt, thrdName) |
| Error handling wrapper for checking on thread status with tryjoin. | |
| #define | XWCAPP_THREAD_STOP(thrdSt) |
| Error handlng wrapper for stopping a thread. | |
Functions | |
| void | MagAOX::app::sigUsr1Handler (int signum, siginfo_t *siginf, void *ucont) |
| Empty signal handler. SIGUSR1 is used to interrupt sleep in various threads. | |
| template<bool _useINDI> | |
| MagAOX::app::INDI_SETCALLBACK_DEFN (MagAOXApp< _useINDI >, m_indiP_powerChannel)(const pcf | |
| #define XWCAPP_THREAD_CHECK | ( | thrdSt, | |
| thrdName | |||
| ) |
Error handling wrapper for checking on thread status with tryjoin.
This should be placed in appLogic for each thread managed by an MagAOXApp. If the thread has exited or otherwise causes an error the app will exit.
| thrdSt | [in] (std::thread) The thread object to start executing |
| thrdName | [in] (const std::string &) The name of the thread (just for logging) |
Definition at line 4093 of file MagAOXApp.hpp.
| #define XWCAPP_THREAD_START | ( | thrdSt, | |
| thrdInit, | |||
| thrdId, | |||
| thrdProp, | |||
| thrdPrio, | |||
| thrdCpuset, | |||
| thrdName, | |||
| thrdStart | |||
| ) |
Error handling wrapper for the threadStart function of the XWCApp.
This should be placed in appLogic for each thread managed by an MagAOXApp. On error, this will cause the app to shutdown.
| thrdSt | [out] (std::thread) The thread object to start executing |
| thrdInit | [in/out] (bool) The thread initilization synchronizer. |
| thrdId | [in/out] (pid_t) The thread pid to be filled in by thrdStart immediately upon call |
| thrdProp | [in/out](pcf::IndiProperty) The INDI property to publish the thread details |
| thrdPrio | [in] (int) The r/t priority to set for this thread |
| thrdCpuset | [in] (const std::string &) the cpuset to place this thread on. Ignored if "". |
| thrdName | [in] (const std::string &) The name of the thread (just for logging) |
| thrdStart | [in] (function) The thread starting function, a static function taking a this pointer as argument. |
Definition at line 4079 of file MagAOXApp.hpp.
| #define XWCAPP_THREAD_STOP | ( | thrdSt | ) |
Error handlng wrapper for stopping a thread.
This should be placed in appShutdown for each thread managed by an MagAOXApp.
| thrdSt | [in] (std::thread) The thread object to start executing |
Definition at line 4113 of file MagAOXApp.hpp.