47 #include <sys/types.h> 54 #include "rnr/rnrconfig.h" 70 LaeAsyncJob::LaeAsyncJob(
const string strJobName) : m_strJobName(strJobName)
virtual int terminateThread()
Terminate the thread.
Laelaps thread base class interface.
static const int LAE_ECODE_NO_EXEC
cannot execute error
virtual int terminateThread()
Terminate the thread.
virtual int runThread(const double fHz=ThreadAsyncHzDft)
Run the thread.
virtual void transToRunning()
Ready to Running state transition function.
virtual ~LaeAsyncJob()
Destructor.
bool isDone()
Test if job has completed or should be aborted.
std::string m_strThreadName
thread identifying name
virtual void abort(int rc=-LAE_ECODE_INTR)
Abort the job.
virtual void transToExit()
Any to Exit state transition function.
virtual void start()
Start.
LaeThreadAsync()
Default constructor.
virtual void exec()
Execute asynchronous task within scheduled cycle.
The <b><i>Laelaps</i></b> namespace encapsulates all <b><i>Laelaps</i></b> related constructs...
virtual void getReady()
Get ready to run.
JobState m_eJobState
job state
int m_nJobRc
job return code
Laelaps common utilities.
Asynchronous job base class.
virtual ~LaeThreadAsync()
Destructor.
virtual int createThread(int nPriority)
Create the thread.
static const int LAE_ECODE_BAD_OP
invalid operation error
job attached to thread and ready to run
virtual void terminate()
Terminate the job normally.
static const double ThreadAsyncPrioDft
default priority
LaeAsyncJob * m_pJob
attached asynchronous job - owned by caller
Laelaps asynchronouse thread class interface.
virtual void transToReady()
Uninitialized to Ready state transition function.
job created, but not attached to thread
virtual int createThread(LaeAsyncJob *pJob, int nPriority=ThreadAsyncPrioDft)
Create the thread.
virtual int runThread(const double fHz)
Run the thread.
static const double ThreadAsyncHzDft
default run rate
std::string getJobName()
Get the name of the job.
static const char *const ThreadAsyncNameDft
default name
void changeState(ThreadState eNewState)
Change the thread state.
virtual int run()
Run the job.
bool m_bIsDone
job is [not] done
Top-level package include file.
static const int LAE_OK
not an error, success