20#ifndef _BASIC_USAGE_ENVIRONMENT0_HH
21#define _BASIC_USAGE_ENVIRONMENT0_HH
23#ifndef _BASICUSAGEENVIRONMENT_VERSION_HH
27#ifndef _USAGE_ENVIRONMENT_HH
31#ifndef _DELAY_QUEUE_HH
41#define RESULT_MSG_BUFFER_MAX 1000
78#ifndef MAX_NUM_EVENT_TRIGGERS
79#define MAX_NUM_EVENT_TRIGGERS 32
81#define EVENT_TRIGGER_ID_HIGH_BIT (1 << (MAX_NUM_EVENT_TRIGGERS-1))
#define MAX_NUM_EVENT_TRIGGERS
#define RESULT_MSG_BUFFER_MAX
void TaskFunc(void *clientData)
virtual EventTriggerId createEventTrigger(TaskFunc *eventHandlerProc)
void * fTriggeredEventClientDatas[MAX_NUM_EVENT_TRIGGERS]
u_int32_t fLastUsedTriggerMask
virtual void unscheduleDelayedTask(TaskToken &prevTask)
virtual void SingleStep(unsigned maxDelayTime=0)=0
int fLastHandledSocketNum
virtual void deleteEventTrigger(EventTriggerId eventTriggerId)
virtual void triggerEvent(EventTriggerId eventTriggerId, void *clientData=NULL)
virtual ~BasicTaskScheduler0()
TaskFunc * fTriggeredEventHandlers[MAX_NUM_EVENT_TRIGGERS]
std::atomic_flag fTriggersAwaitingHandling[MAX_NUM_EVENT_TRIGGERS]
unsigned fLastUsedTriggerNum
virtual void doEventLoop(char volatile *watchVariable)
Boolean fEventTriggersAreBeingUsed
virtual TaskToken scheduleDelayedTask(int64_t microseconds, TaskFunc *proc, void *clientData)
virtual void setResultMsg(MsgString msg)
virtual void setResultMsg(MsgString msg1, MsgString msg2, MsgString msg3)
char fResultMsgBuffer[RESULT_MSG_BUFFER_MAX]
BasicUsageEnvironment0(TaskScheduler &taskScheduler)
virtual MsgString getResultMsg() const
virtual void setResultErrMsg(MsgString msg, int err=0)
virtual ~BasicUsageEnvironment0()
virtual void appendToResultMsg(MsgString msg)
virtual void setResultMsg(MsgString msg1, MsgString msg2)
virtual void reportBackgroundError()
TaskScheduler & taskScheduler() const