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

Public Member Functions

void AddCommand (Command *command)
void AddButton (ButtonScheduler *button)
void RegisterSubsystem (Subsystem *subsystem)
void Run ()
void Remove (Command *command)
void RemoveAll ()
void SetEnabled (bool enabled)
- 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 lineNumber) const
 Set error information associated with a C library call that set an error to the "errno" global variable.
virtual void SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const
 Set the current error information associated from the nivision Imaq API.
virtual void SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const
 Set the current error information associated with this sensor.
virtual void SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const
 Set the current error information associated with this sensor.
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.

Static Public Member Functions

static SchedulerGetInstance ()
- Static Public Member Functions inherited from ErrorBase
static void SetGlobalError (Error::Code code, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber)
static void SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber)
static ErrorGetGlobalError ()

Additional Inherited Members

- 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 21 of file Scheduler.h.

Member Function Documentation

void Scheduler::AddCommand ( Command command)

Add a command to be scheduled later. In any pass through the scheduler, all commands are added to the additions list, then at the end of the pass, they are all scheduled.

Parameters
commandThe command to be scheduled

Definition at line 64 of file Scheduler.cpp.

Scheduler * Scheduler::GetInstance ( )
static

Returns the Scheduler, creating it if one does not exist.

Returns
the Scheduler

Definition at line 47 of file Scheduler.cpp.

void Scheduler::RegisterSubsystem ( Subsystem subsystem)

Registers a Subsystem to this Scheduler, so that the Scheduler might know if a default Command needs to be run. All Subsystems should call this.

Parameters
systemthe system

Definition at line 208 of file Scheduler.cpp.

void Scheduler::Remove ( Command command)

Removes the Command from the Scheduler.

Parameters
commandthe command to remove

Definition at line 222 of file Scheduler.cpp.

void Scheduler::Run ( )

Runs a single iteration of the loop. This method should be called often in order to have a functioning Command system. The loop has five stages:

  1. Poll the Buttons
  2. Execute/Remove the Commands
  3. Send values to SmartDashboard
  4. Add Commands
  5. Add Defaults

Definition at line 136 of file Scheduler.cpp.


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

Generated on Tue Feb 5 2013 00:55:10 for WPILibC++ by doxygen 1.8.1.2