Now you can download a copy of these docs so you can use them offline! Download now
Notifier Class Reference
Inheritance diagram for Notifier:
Collaboration diagram for Notifier:

Public Member Functions

 Notifier (TimerEventHandler handler, void *param=NULL)
 
virtual ~Notifier ()
 
void StartSingle (double delay)
 
void StartPeriodic (double period)
 
void Stop ()
 
- Public Member Functions inherited from ErrorBase
virtual ErrorGetError ()
 Retrieve the current error. Get the current error information associated with this sensor.
 
virtual const ErrorGetError () const
 
virtual void SetErrnoError (const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set error information associated with a C library call that set an error to the "errno" global variable. More...
 
virtual void SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated from the nivision Imaq API. More...
 
virtual void SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void CloneError (ErrorBase *rhs) const
 
virtual void ClearError () const
 Clear the current error information associated with this sensor.
 
virtual bool StatusIsFatal () const
 Check if the current error code represents a fatal error. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ErrorBase
static void SetGlobalError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber)
 
static void SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber)
 
static ErrorGetGlobalError ()
 
- Protected Member Functions inherited from ErrorBase
 ErrorBase ()
 Initialize the instance status to 0 for now.
 
- Protected Attributes inherited from ErrorBase
Error m_error
 
- Static Protected Attributes inherited from ErrorBase
static SEM_ID _globalErrorMutex = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE)
 
static Error _globalError
 

Detailed Description

Definition at line 16 of file Notifier.h.

Constructor & Destructor Documentation

Notifier::Notifier ( TimerEventHandler  handler,
void *  param = NULL 
)

Create a Notifier for timer event notification.

Parameters
handlerThe handler is called at the notification time which is set using StartSingle or StartPeriodic.

Definition at line 24 of file Notifier.cpp.

Notifier::~Notifier ( )
virtual

Free the resources for a timer event. All resources will be freed and the timer event will be removed from the queue if necessary.

Definition at line 57 of file Notifier.cpp.

Member Function Documentation

void Notifier::StartPeriodic ( double  period)

Register for periodic event notification. A timer event is queued for periodic event notification. Each time the interrupt occurs, the event will be immediately requeued for the same time interval.

Parameters
periodPeriod in seconds to call the handler starting one period after the call to this method.

Definition at line 249 of file Notifier.cpp.

void Notifier::StartSingle ( double  delay)

Register for single event notification. A timer event is queued for a single event after the specified delay.

Parameters
delaySeconds to wait before the handler is called.

Definition at line 234 of file Notifier.cpp.

void Notifier::Stop ( )

Stop timer events from occuring. Stop any repeating timer events from occuring. This will also remove any single notification events from the queue. If a timer-based call to the registered handler is in progress, this function will block until the handler call is complete.

Definition at line 265 of file Notifier.cpp.


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

Generated on Sat Apr 26 2014 12:26:46 for WPILibC++ by doxygen 1.8.6