WPILibC++  unspecified
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Notifier Class Reference
Inheritance diagram for Notifier:
ErrorBase

Classes

class  Thread
 

Public Member Functions

 Notifier (TimerEventHandler handler)
 Create a Notifier for timer event notification. More...
 
template<typename Callable , typename Arg , typename... Args>
 Notifier (Callable &&f, Arg &&arg, Args &&...args)
 
virtual ~Notifier ()
 Free the resources for a timer event.
 
 Notifier (const Notifier &)=delete
 
Notifieroperator= (const Notifier &)=delete
 
void StartSingle (double delay)
 Register for single event notification. More...
 
void StartPeriodic (double period)
 Register for periodic event notification. More...
 
void Stop ()
 Stop timer events from occuring. More...
 
- Public Member Functions inherited from ErrorBase
 ErrorBase (const ErrorBase &)=delete
 
ErrorBaseoperator= (const ErrorBase &)=delete
 
virtual ErrorGetError ()
 Retrieve the current error. More...
 
virtual const ErrorGetError () const
 
virtual void SetErrnoError (llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef 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, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated from the nivision Imaq API. More...
 
virtual void SetError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void SetWPIError (llvm::StringRef errorMessage, Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void CloneError (const 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, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber)
 
static void SetGlobalWPIError (llvm::StringRef errorMessage, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, uint32_t lineNumber)
 
static ErrorGetGlobalError ()
 Retrieve the current global error.
 
- Protected Attributes inherited from ErrorBase
Error m_error
 
- Static Protected Attributes inherited from ErrorBase
static priority_mutex _globalErrorMutex
 
static Error _globalError
 

Constructor & Destructor Documentation

Notifier::Notifier ( TimerEventHandler  handler)
explicit

Create a Notifier for timer event notification.

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

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.
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.
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.


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