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)
 
void UpdateTable ()
 
std::string GetSmartDashboardType ()
 
void InitTable (ITable *subTable)
 
ITableGetTable ()
 
std::string GetName ()
 
std::string GetType ()
 
- 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...
 

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_t lineNumber)
 
static void SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t 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 25 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 63 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.

std::string Scheduler::GetName ( )
virtual
Returns
the name of the subtable of SmartDashboard that the Sendable object will use

Implements NamedSendable.

Definition at line 263 of file Scheduler.cpp.

std::string Scheduler::GetSmartDashboardType ( )
virtual
Returns
the string representation of the named data type that will be used by the smart dashboard for this sendable

Implements Sendable.

Definition at line 271 of file Scheduler.cpp.

ITable * Scheduler::GetTable ( )
virtual
Returns
the table that is currently associated with the sendable

Implements Sendable.

Definition at line 286 of file Scheduler.cpp.

void Scheduler::InitTable ( ITable subtable)
virtual

Initializes a table for this sendable object.

Parameters
subtableThe table to put the values in.

Implements Sendable.

Definition at line 275 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 185 of file Scheduler.cpp.

void Scheduler::Remove ( Command command)

Removes the Command from the Scheduler.

Parameters
commandthe command to remove

Definition at line 197 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 130 of file Scheduler.cpp.

void Scheduler::UpdateTable ( )

Update the network tables associated with the Scheduler object on the SmartDashboard

Definition at line 225 of file Scheduler.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