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) |
ITable * | GetTable () |
std::string | GetName () |
std::string | GetType () |
Public Member Functions inherited from ErrorBase | |
virtual Error & | GetError () |
Retrieve the current error. Get the current error information associated with this sensor. | |
virtual const Error & | GetError () 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 Scheduler * | GetInstance () |
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 Error & | GetGlobalError () |
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 |
Definition at line 25 of file Scheduler.h.
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.
command | The command to be scheduled |
Definition at line 63 of file Scheduler.cpp.
|
static |
Returns the Scheduler, creating it if one does not exist.
Definition at line 47 of file Scheduler.cpp.
|
virtual |
Implements NamedSendable.
Definition at line 263 of file Scheduler.cpp.
|
virtual |
Implements Sendable.
Definition at line 271 of file Scheduler.cpp.
|
virtual |
Implements Sendable.
Definition at line 286 of file Scheduler.cpp.
|
virtual |
Initializes a table for this sendable object.
subtable | The 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.
system | the system |
Definition at line 185 of file Scheduler.cpp.
void Scheduler::Remove | ( | Command * | command | ) |
Removes the Command from the Scheduler.
command | the 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:
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.