API
 
Loading...
Searching...
No Matches
libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test Struct Reference

#include <MagAOXApp_test.hpp>

Inheritance diagram for libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test:
Inheritance graph
Collaboration diagram for libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test:
Collaboration graph

Public Member Functions

 MagAOXApp_test (bool gitmod=false)
 
 ~MagAOXApp_test () noexcept(true)
 
void addUnusedConfig ()
 
void setup (int argc, char **argv)
 
virtual int appStartup ()
 
virtual int appLogic ()
 
virtual int appShutdown ()
 
std::string configPathGlobal ()
 
std::string configPathUser ()
 
std::string configPathLocal ()
 
std::string & invokedName ()
 
bool & doHelp ()
 
bool configOnly ()
 
void setPowerMgtEnabled (bool pme)
 
void setConfigName (const std::string &cn)
 
void setConfigBase (const std::string &cb)
 
void setAlert ()
 
void doFSMClearAlert ()
 
std::string powerDevice ()
 
std::string powerChannel ()
 
std::string powerElement ()
 
std::string powerTargetElement ()
 
int powerOnWait ()
 
int onPowerOff ()
 
int whilePowerOff ()
 
bool powerOnWaitElapsed ()
 
int powerState ()
 
void configurePowerManagement (const std::string &device, const std::string &channel)
 
void configurePowerOnWait (unsigned long powerOnWait, int powerOnCounter, int loopPause)
 
int setPowerState (const std::string &state, const std::string target)
 
int setSigTermHandler ()
 
void p_handlerSigTerm (int signum, siginfo_t *siginf, void *ucont)
 
int setEuidReal ()
 
int setEuidReal (int euidr, bool set=true)
 
int p_elevatePriveleges ()
 
int setEuidCalled ()
 
int setEuidCalled (int euidc)
 
int lockPID ()
 
int unlockPID ()
 
int threadStartTest ()
 
void threadExec ()
 Execute framegrabbing.
 

Static Public Member Functions

static void threadStarter (MagAOXApp_test *o)
 Thread starter, called by MagAOXApp::threadStart on thread construction. Calls threadExec.
 

Public Attributes

bool appStartupFail { false }
 
bool appLogicFail { false }
 
bool appShutdownFail { false }
 
int called_back { 0 }
 
int m_threadPrio { 0 }
 Priority of the framegrabber thread, should normally be > 00.
 
std::string m_cpuset
 The cpuset to assign the framegrabber thread to. Not used if empty, the default.
 
bool m_threadInit { true }
 Synchronizer for thread startup, to allow priority setting to finish.
 
pid_t m_threadID { 0 }
 The ID of the thread.
 
pcf::IndiProperty m_threadProp
 The property to hold the thread details.
 
std::thread m_thread
 A separate thread.
 
bool m_threadRunning {false}
 
bool m_threadStopped {false}
 
int m_threadError {0}
 

Detailed Description

Definition at line 23 of file MagAOXApp_test.hpp.

Constructor & Destructor Documentation

◆ MagAOXApp_test()

libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::MagAOXApp_test ( bool  gitmod = false)
inline

Definition at line 26 of file MagAOXApp_test.hpp.

◆ ~MagAOXApp_test()

libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::~MagAOXApp_test ( )
inlinenoexcept

Definition at line 30 of file MagAOXApp_test.hpp.

Member Function Documentation

◆ addUnusedConfig()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::addUnusedConfig ( )
inline

Definition at line 37 of file MagAOXApp_test.hpp.

◆ appLogic()

virtual int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::appLogic ( )
inlinevirtual

Definition at line 58 of file MagAOXApp_test.hpp.

◆ appShutdown()

virtual int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::appShutdown ( )
inlinevirtual

Definition at line 68 of file MagAOXApp_test.hpp.

◆ appStartup()

virtual int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::appStartup ( )
inlinevirtual

Definition at line 48 of file MagAOXApp_test.hpp.

◆ configOnly()

bool libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::configOnly ( )
inline

Definition at line 103 of file MagAOXApp_test.hpp.

◆ configPathGlobal()

std::string libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::configPathGlobal ( )
inline

Definition at line 78 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ configPathLocal()

std::string libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::configPathLocal ( )
inline

Definition at line 88 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ configPathUser()

std::string libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::configPathUser ( )
inline

Definition at line 83 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ configurePowerManagement()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::configurePowerManagement ( const std::string &  device,
const std::string &  channel 
)
inline

Definition at line 188 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ configurePowerOnWait()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::configurePowerOnWait ( unsigned long  powerOnWait,
int  powerOnCounter,
int  loopPause 
)
inline

Definition at line 198 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ doFSMClearAlert()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::doFSMClearAlert ( )
inline

Definition at line 132 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ doHelp()

bool & libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::doHelp ( )
inline

Definition at line 98 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ invokedName()

std::string & libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::invokedName ( )
inline

◆ lockPID()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::lockPID ( )
inline

Definition at line 266 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ onPowerOff()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::onPowerOff ( )
inline

Definition at line 168 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ p_elevatePriveleges()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::p_elevatePriveleges ( )
inline

Definition at line 246 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ p_handlerSigTerm()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::p_handlerSigTerm ( int  signum,
siginfo_t *  siginf,
void *  ucont 
)
inline

Definition at line 224 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ powerChannel()

std::string libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::powerChannel ( )
inline

Definition at line 148 of file MagAOXApp_test.hpp.

◆ powerDevice()

std::string libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::powerDevice ( )
inline

Definition at line 143 of file MagAOXApp_test.hpp.

◆ powerElement()

std::string libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::powerElement ( )
inline

Definition at line 153 of file MagAOXApp_test.hpp.

◆ powerOnWait()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::powerOnWait ( )
inline

Definition at line 163 of file MagAOXApp_test.hpp.

◆ powerOnWaitElapsed()

bool libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::powerOnWaitElapsed ( )
inline

Definition at line 178 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ powerState()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::powerState ( )
inline

Definition at line 183 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ powerTargetElement()

std::string libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::powerTargetElement ( )
inline

Definition at line 158 of file MagAOXApp_test.hpp.

◆ setAlert()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setAlert ( )
inline

Definition at line 127 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ setConfigBase()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setConfigBase ( const std::string &  cb)
inline

Definition at line 120 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ setConfigName()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setConfigName ( const std::string &  cn)
inline

◆ setEuidCalled() [1/2]

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setEuidCalled ( )
inline

Definition at line 255 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ setEuidCalled() [2/2]

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setEuidCalled ( int  euidc)
inline

Definition at line 260 of file MagAOXApp_test.hpp.

◆ setEuidReal() [1/2]

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setEuidReal ( )
inline

Definition at line 229 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ setEuidReal() [2/2]

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setEuidReal ( int  euidr,
bool  set = true 
)
inline

Definition at line 234 of file MagAOXApp_test.hpp.

◆ setPowerMgtEnabled()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setPowerMgtEnabled ( bool  pme)
inline

◆ setPowerState()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setPowerState ( const std::string &  state,
const std::string  target 
)
inline

Definition at line 205 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ setSigTermHandler()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setSigTermHandler ( )
inline

Definition at line 219 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ setup()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::setup ( int  argc,
char **  argv 
)
inline

Definition at line 43 of file MagAOXApp_test.hpp.

◆ threadExec()

void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::threadExec ( )
inline

Execute framegrabbing.

Definition at line 348 of file MagAOXApp_test.hpp.

Referenced by threadStarter().

◆ threadStarter()

static void libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::threadStarter ( MagAOXApp_test o)
inlinestatic

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

Parameters
[in]oa pointer to aninstance (normally this)

Definition at line 342 of file MagAOXApp_test.hpp.

References threadExec().

◆ threadStartTest()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::threadStartTest ( )
inline

Definition at line 293 of file MagAOXApp_test.hpp.

References XWCAPP_THREAD_STOP.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ unlockPID()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::unlockPID ( )
inline

Definition at line 271 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

◆ whilePowerOff()

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::whilePowerOff ( )
inline

Definition at line 173 of file MagAOXApp_test.hpp.

Referenced by libXWCTest::appTest::MagAOXAppTest::TEST_CASE().

Member Data Documentation

◆ appLogicFail

bool libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::appLogicFail { false }

Definition at line 34 of file MagAOXApp_test.hpp.

◆ appShutdownFail

bool libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::appShutdownFail { false }

Definition at line 35 of file MagAOXApp_test.hpp.

◆ appStartupFail

bool libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::appStartupFail { false }

Definition at line 33 of file MagAOXApp_test.hpp.

◆ called_back

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::called_back { 0 }

◆ m_cpuset

std::string libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_cpuset

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

Definition at line 279 of file MagAOXApp_test.hpp.

◆ m_thread

std::thread libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_thread

A separate thread.

Definition at line 287 of file MagAOXApp_test.hpp.

◆ m_threadError

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_threadError {0}

Definition at line 291 of file MagAOXApp_test.hpp.

◆ m_threadID

pid_t libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_threadID { 0 }

The ID of the thread.

Definition at line 283 of file MagAOXApp_test.hpp.

◆ m_threadInit

bool libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_threadInit { true }

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

Definition at line 281 of file MagAOXApp_test.hpp.

◆ m_threadPrio

int libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_threadPrio { 0 }

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

Definition at line 277 of file MagAOXApp_test.hpp.

◆ m_threadProp

pcf::IndiProperty libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_threadProp

The property to hold the thread details.

Definition at line 285 of file MagAOXApp_test.hpp.

◆ m_threadRunning

bool libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_threadRunning {false}

Definition at line 289 of file MagAOXApp_test.hpp.

◆ m_threadStopped

bool libXWCTest::appTest::MagAOXAppTest::MagAOXApp_test::m_threadStopped {false}

Definition at line 290 of file MagAOXApp_test.hpp.


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