live
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
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 volatile *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)
 
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 volatile 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

virtual EventTriggerId BasicTaskScheduler0::createEventTrigger ( TaskFunc eventHandlerProc)
virtualinherited

Implements TaskScheduler.

static BasicTaskScheduler* BasicTaskScheduler::createNew ( unsigned  maxSchedulerGranularity = 10000)
static
virtual void BasicTaskScheduler0::deleteEventTrigger ( EventTriggerId  eventTriggerId)
virtualinherited

Implements TaskScheduler.

void TaskScheduler::disableBackgroundHandling ( int  socketNum)
inlineinherited

Definition at line 136 of file UsageEnvironment.hh.

References NULL, and TaskScheduler::setBackgroundHandling().

Referenced by TaskScheduler::turnOffBackgroundReadHandling().

136 { setBackgroundHandling(socketNum, 0, NULL, NULL); }
#define NULL
virtual void setBackgroundHandling(int socketNum, int conditionSet, BackgroundHandlerProc *handlerProc, void *clientData)=0
virtual void BasicTaskScheduler0::doEventLoop ( char volatile *  watchVariable)
virtualinherited

Implements TaskScheduler.

virtual void TaskScheduler::internalError ( )
virtualinherited
virtual void BasicTaskScheduler::moveSocketHandling ( int  oldSocketNum,
int  newSocketNum 
)
protectedvirtual

Implements TaskScheduler.

virtual void TaskScheduler::rescheduleDelayedTask ( TaskToken task,
int64_t  microseconds,
TaskFunc proc,
void *  clientData 
)
virtualinherited
virtual TaskToken BasicTaskScheduler0::scheduleDelayedTask ( int64_t  microseconds,
TaskFunc proc,
void *  clientData 
)
virtualinherited

Implements TaskScheduler.

static void BasicTaskScheduler::schedulerTickTask ( void *  clientData)
staticprotected
void BasicTaskScheduler::schedulerTickTask ( )
protected
virtual void BasicTaskScheduler::setBackgroundHandling ( int  socketNum,
int  conditionSet,
BackgroundHandlerProc handlerProc,
void *  clientData 
)
protectedvirtual

Implements TaskScheduler.

virtual void BasicTaskScheduler::SingleStep ( unsigned  maxDelayTime)
protectedvirtual

Implements BasicTaskScheduler0.

virtual void BasicTaskScheduler0::triggerEvent ( EventTriggerId  eventTriggerId,
void *  clientData = NULL 
)
virtualinherited

Implements TaskScheduler.

void TaskScheduler::turnOffBackgroundReadHandling ( int  socketNum)
inlineinherited

Definition at line 159 of file UsageEnvironment.hh.

References TaskScheduler::disableBackgroundHandling().

159 { disableBackgroundHandling(socketNum); }
void disableBackgroundHandling(int socketNum)
void TaskScheduler::turnOnBackgroundReadHandling ( int  socketNum,
BackgroundHandlerProc handlerProc,
void *  clientData 
)
inlineinherited

Definition at line 156 of file UsageEnvironment.hh.

References TaskScheduler::setBackgroundHandling(), and SOCKET_READABLE.

156  {
157  setBackgroundHandling(socketNum, SOCKET_READABLE, handlerProc, clientData);
158  }
virtual void setBackgroundHandling(int socketNum, int conditionSet, BackgroundHandlerProc *handlerProc, void *clientData)=0
#define SOCKET_READABLE
virtual void BasicTaskScheduler0::unscheduleDelayedTask ( TaskToken prevTask)
virtualinherited

Implements TaskScheduler.

Field Documentation

DelayQueue BasicTaskScheduler0::fDelayQueue
protectedinherited

Definition at line 100 of file BasicUsageEnvironment0.hh.

fd_set BasicTaskScheduler::fExceptionSet
protected

Definition at line 77 of file BasicUsageEnvironment.hh.

HandlerSet* BasicTaskScheduler0::fHandlers
protectedinherited

Definition at line 103 of file BasicUsageEnvironment0.hh.

int BasicTaskScheduler0::fLastHandledSocketNum
protectedinherited

Definition at line 104 of file BasicUsageEnvironment0.hh.

EventTriggerId BasicTaskScheduler0::fLastUsedTriggerMask
protectedinherited

Definition at line 108 of file BasicUsageEnvironment0.hh.

unsigned BasicTaskScheduler0::fLastUsedTriggerNum
protectedinherited

Definition at line 111 of file BasicUsageEnvironment0.hh.

int BasicTaskScheduler::fMaxNumSockets
protected

Definition at line 74 of file BasicUsageEnvironment.hh.

unsigned BasicTaskScheduler::fMaxSchedulerGranularity
protected

Definition at line 71 of file BasicUsageEnvironment.hh.

fd_set BasicTaskScheduler::fReadSet
protected

Definition at line 75 of file BasicUsageEnvironment.hh.

void* BasicTaskScheduler0::fTriggeredEventClientDatas[MAX_NUM_EVENT_TRIGGERS]
protectedinherited

Definition at line 110 of file BasicUsageEnvironment0.hh.

TaskFunc* BasicTaskScheduler0::fTriggeredEventHandlers[MAX_NUM_EVENT_TRIGGERS]
protectedinherited

Definition at line 109 of file BasicUsageEnvironment0.hh.

EventTriggerId volatile BasicTaskScheduler0::fTriggersAwaitingHandling
protectedinherited

Definition at line 107 of file BasicUsageEnvironment0.hh.

fd_set BasicTaskScheduler::fWriteSet
protected

Definition at line 76 of file BasicUsageEnvironment.hh.


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