BasicTaskScheduler Class Reference

#include <BasicUsageEnvironment.hh>

Inheritance diagram for BasicTaskScheduler:

Inheritance graph
[legend]
Collaboration diagram for BasicTaskScheduler:

Collaboration graph
[legend]

Public Types

typedef void BackgroundHandlerProc (void *clientData, int mask)

Public Member Functions

virtual ~BasicTaskScheduler ()
virtual TaskToken scheduleDelayedTask (int64_t microseconds, TaskFunc *proc, void *clientData)
virtual void unscheduleDelayedTask (TaskToken &prevTask)
virtual void doEventLoop (char *watchVariable)
virtual EventTriggerId createEventTrigger (TaskFunc *eventHandlerProc)
virtual void deleteEventTrigger (EventTriggerId eventTriggerId)
virtual void triggerEvent (EventTriggerId eventTriggerId, void *clientData=NULL)
virtual void rescheduleDelayedTask (TaskToken &task, int64_t microseconds, TaskFunc *proc, void *clientData)
virtual void setBackgroundHandling (int socketNum, int conditionSet, BackgroundHandlerProc *handlerProc, void *clientData)=0
void disableBackgroundHandling (int socketNum)
void turnOnBackgroundReadHandling (int socketNum, BackgroundHandlerProc *handlerProc, void *clientData)
void turnOffBackgroundReadHandling (int socketNum)
virtual void internalError ()

Static Public Member Functions

static BasicTaskSchedulercreateNew (unsigned maxSchedulerGranularity=10000)

Protected Member Functions

 BasicTaskScheduler (unsigned maxSchedulerGranularity)
void schedulerTickTask ()
virtual void SingleStep (unsigned maxDelayTime)
virtual void setBackgroundHandling (int socketNum, int conditionSet, BackgroundHandlerProc *handlerProc, void *clientData)
virtual void moveSocketHandling (int oldSocketNum, int newSocketNum)

Static Protected Member Functions

static void schedulerTickTask (void *clientData)

Protected Attributes

unsigned fMaxSchedulerGranularity
int fMaxNumSockets
fd_set fReadSet
fd_set fWriteSet
fd_set fExceptionSet
DelayQueue fDelayQueue
HandlerSetfHandlers
int fLastHandledSocketNum
EventTriggerId fTriggersAwaitingHandling
EventTriggerId fLastUsedTriggerMask
TaskFuncfTriggeredEventHandlers [MAX_NUM_EVENT_TRIGGERS]
void * fTriggeredEventClientDatas [MAX_NUM_EVENT_TRIGGERS]
unsigned fLastUsedTriggerNum

Detailed Description

Definition at line 47 of file BasicUsageEnvironment.hh.


Member Typedef Documentation

typedef void TaskScheduler::BackgroundHandlerProc(void *clientData, int mask) [inherited]

Definition at line 129 of file UsageEnvironment.hh.


Constructor & Destructor Documentation

virtual BasicTaskScheduler::~BasicTaskScheduler (  )  [virtual]

BasicTaskScheduler::BasicTaskScheduler ( unsigned  maxSchedulerGranularity  )  [protected]


Member Function Documentation

static BasicTaskScheduler* BasicTaskScheduler::createNew ( unsigned  maxSchedulerGranularity = 10000  )  [static]

static void BasicTaskScheduler::schedulerTickTask ( void *  clientData  )  [static, protected]

void BasicTaskScheduler::schedulerTickTask (  )  [protected]

virtual void BasicTaskScheduler::SingleStep ( unsigned  maxDelayTime  )  [protected, virtual]

Implements BasicTaskScheduler0.

virtual void BasicTaskScheduler::setBackgroundHandling ( int  socketNum,
int  conditionSet,
BackgroundHandlerProc handlerProc,
void *  clientData 
) [protected, virtual]

virtual void BasicTaskScheduler::moveSocketHandling ( int  oldSocketNum,
int  newSocketNum 
) [protected, virtual]

Implements TaskScheduler.

virtual TaskToken BasicTaskScheduler0::scheduleDelayedTask ( int64_t  microseconds,
TaskFunc proc,
void *  clientData 
) [virtual, inherited]

Implements TaskScheduler.

virtual void BasicTaskScheduler0::unscheduleDelayedTask ( TaskToken prevTask  )  [virtual, inherited]

Implements TaskScheduler.

virtual void BasicTaskScheduler0::doEventLoop ( char *  watchVariable  )  [virtual, inherited]

Implements TaskScheduler.

virtual EventTriggerId BasicTaskScheduler0::createEventTrigger ( TaskFunc eventHandlerProc  )  [virtual, inherited]

Implements TaskScheduler.

virtual void BasicTaskScheduler0::deleteEventTrigger ( EventTriggerId  eventTriggerId  )  [virtual, inherited]

Implements TaskScheduler.

virtual void BasicTaskScheduler0::triggerEvent ( EventTriggerId  eventTriggerId,
void *  clientData = NULL 
) [virtual, inherited]

Implements TaskScheduler.

virtual void TaskScheduler::rescheduleDelayedTask ( TaskToken task,
int64_t  microseconds,
TaskFunc proc,
void *  clientData 
) [virtual, inherited]

virtual void TaskScheduler::setBackgroundHandling ( int  socketNum,
int  conditionSet,
BackgroundHandlerProc handlerProc,
void *  clientData 
) [pure virtual, inherited]

Referenced by TaskScheduler::disableBackgroundHandling(), and TaskScheduler::turnOnBackgroundReadHandling().

void TaskScheduler::disableBackgroundHandling ( int  socketNum  )  [inline, inherited]

Definition at line 136 of file UsageEnvironment.hh.

References NULL, and TaskScheduler::setBackgroundHandling().

Referenced by TaskScheduler::turnOffBackgroundReadHandling().

00136 { setBackgroundHandling(socketNum, 0, NULL, NULL); }

void TaskScheduler::turnOnBackgroundReadHandling ( int  socketNum,
BackgroundHandlerProc handlerProc,
void *  clientData 
) [inline, inherited]

Definition at line 156 of file UsageEnvironment.hh.

References TaskScheduler::setBackgroundHandling(), and SOCKET_READABLE.

00156                                                                                                          {
00157     setBackgroundHandling(socketNum, SOCKET_READABLE, handlerProc, clientData);
00158   }

void TaskScheduler::turnOffBackgroundReadHandling ( int  socketNum  )  [inline, inherited]

Definition at line 159 of file UsageEnvironment.hh.

References TaskScheduler::disableBackgroundHandling().

00159 { disableBackgroundHandling(socketNum); }

virtual void TaskScheduler::internalError (  )  [virtual, inherited]


Field Documentation

unsigned BasicTaskScheduler::fMaxSchedulerGranularity [protected]

Definition at line 71 of file BasicUsageEnvironment.hh.

int BasicTaskScheduler::fMaxNumSockets [protected]

Definition at line 74 of file BasicUsageEnvironment.hh.

fd_set BasicTaskScheduler::fReadSet [protected]

Definition at line 75 of file BasicUsageEnvironment.hh.

fd_set BasicTaskScheduler::fWriteSet [protected]

Definition at line 76 of file BasicUsageEnvironment.hh.

fd_set BasicTaskScheduler::fExceptionSet [protected]

Definition at line 77 of file BasicUsageEnvironment.hh.

DelayQueue BasicTaskScheduler0::fDelayQueue [protected, inherited]

Definition at line 100 of file BasicUsageEnvironment0.hh.

HandlerSet* BasicTaskScheduler0::fHandlers [protected, inherited]

Definition at line 103 of file BasicUsageEnvironment0.hh.

int BasicTaskScheduler0::fLastHandledSocketNum [protected, inherited]

Definition at line 104 of file BasicUsageEnvironment0.hh.

EventTriggerId BasicTaskScheduler0::fTriggersAwaitingHandling [protected, inherited]

Definition at line 107 of file BasicUsageEnvironment0.hh.

EventTriggerId BasicTaskScheduler0::fLastUsedTriggerMask [protected, inherited]

Definition at line 107 of file BasicUsageEnvironment0.hh.

TaskFunc* BasicTaskScheduler0::fTriggeredEventHandlers[MAX_NUM_EVENT_TRIGGERS] [protected, inherited]

Definition at line 108 of file BasicUsageEnvironment0.hh.

void* BasicTaskScheduler0::fTriggeredEventClientDatas[MAX_NUM_EVENT_TRIGGERS] [protected, inherited]

Definition at line 109 of file BasicUsageEnvironment0.hh.

unsigned BasicTaskScheduler0::fLastUsedTriggerNum [protected, inherited]

Definition at line 110 of file BasicUsageEnvironment0.hh.


The documentation for this class was generated from the following file:
Generated on Thu Oct 16 16:19:08 2014 for live by  doxygen 1.5.2