2 #ifndef _QPROCESS_STATUS_HH_
3 #define _QPROCESS_STATUS_HH_
void SigHandler(int signalId)
signal handler function
wrapper for ProcessStatus_ enum
base class for anything having an id
base class for anything that has a name
void SetName(const std::string &name)
process status and signal handler
bool isWaiting() const
check wether current process status is QWaiting_s
std::map< int, ProcessStatus_t > fSigMap
void Notify()
acknowledge oldest process status contained in staus queue
ProcessStatus_t fState
current process status
bool isPaused() const
check wether current process status is QPaused_s
bool TrgCtrlEnabled() const
check wether trigger control signals are enabled
void SetTrgCtrlEnabled(bool enabled)
enable or disable trigger status control
friend void SigHandler(int)
signal handler function
bool isError() const
check wether an error occurred
void SetError(const std::string &errMsg)
set error string
const std::string & GetError() const
get error string
ProcessStatus_t GetLastStatus() const
get last status that have been added to status queue. If queue is empty current process status is ret...
std::string fError
error string
virtual ~QProcessStatus()
dtor
bool HasChanged() const
tell wehter process status has changed
void SetName(const std::string &name)
set process name that will be used for communication with message logger server
ProcessStatus_t GetNextState() const
get the status the process will go into the next time that Notify() will be called....
ProcessStatus_t GetPreviousState() const
get previous state
bool isIdle() const
check wether current process status is QIdle_s
void EnableInformServer(bool enabled)
static QProcessStatus & GetInstance()
get singleton Instance
void AddToQueue(ProcessStatus_t state)
add state to process status queue.
void InformServer()
inform MsgServer about current process status
bool Ignore(int signalId)
ignore signal
bool isRunning() const
check wether current process status is QRunning_s
std::deque< ProcessStatus_t > fStatusQueue
ProcessStatus_t GetState() const
get current state
void HandleSignal(int signalId)
this method is called each time a registered signal is caught. It updates the status queue and inform...
void Associate(int signalId, ProcessStatus_t pStatus)
associate a signal to a given process status
bool isReady() const
check wether current process status is QReady_s
void SetState(ProcessStatus_t state)
change current process status bypassing status queue vector
ProcessStatus_t fPreviousState
previous process status
void Disable(int signalId)
disable handling of a signal (use defauls system handler)
bool isExiting() const
check wether current process status is QExiting_s