WPILibC++
trunk
|
Public Member Functions | |
WaitUntilCommand (double time) | |
WaitUntilCommand (const char *name, double time) | |
![]() | |
Command () | |
Command (const char *name) | |
Command (double timeout) | |
Command (const char *name, double timeout) | |
double | TimeSinceInitialized () |
void | Requires (Subsystem *s) |
bool | IsCanceled () |
void | Start () |
bool | Run () |
void | Cancel () |
bool | IsRunning () |
bool | IsInterruptible () |
void | SetInterruptible (bool interruptible) |
bool | DoesRequire (Subsystem *subsystem) |
SubsystemSet | GetRequirements () |
CommandGroup * | GetGroup () |
void | SetRunWhenDisabled (bool run) |
bool | WillRunWhenDisabled () |
int | GetID () |
virtual std::string | GetName () |
virtual void | InitTable (ITable *table) |
virtual ITable * | GetTable () |
virtual std::string | GetSmartDashboardType () |
virtual void | ValueChanged (ITable *source, const std::string &key, EntryValue value, bool isNew) |
![]() | |
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... | |
Protected Member Functions | |
virtual void | Initialize () |
virtual void | Execute () |
virtual bool | IsFinished () |
virtual void | End () |
virtual void | Interrupted () |
![]() | |
void | SetTimeout (double timeout) |
bool | IsTimedOut () |
bool | AssertUnlocked (const char *message) |
void | SetParent (CommandGroup *parent) |
virtual void | _Initialize () |
virtual void | _Interrupted () |
virtual void | _Execute () |
virtual void | _End () |
virtual void | _Cancel () |
![]() | |
ErrorBase () | |
Initialize the instance status to 0 for now. | |
Additional Inherited Members | |
![]() | |
typedef std::set< Subsystem * > | SubsystemSet |
![]() | |
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 () |
![]() | |
ITable * | m_table |
![]() | |
Error | m_error |
![]() | |
static SEM_ID | _globalErrorMutex = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE) |
static Error | _globalError |
Definition at line 12 of file WaitUntilCommand.h.
WaitUntilCommand::WaitUntilCommand | ( | double | time | ) |
A WaitCommand will wait until a certain match time before finishing. This will wait until the game clock reaches some value, then continue to the next command.
Definition at line 17 of file WaitUntilCommand.cpp.
|
protectedvirtual |
Called when the command ended peacefully. This is where you may want to wrap up loose ends, like shutting off a motor that was being used in the command.
Implements Command.
Definition at line 45 of file WaitUntilCommand.cpp.
|
protectedvirtual |
The execute method is called repeatedly until this Command either finishes or is canceled.
Implements Command.
Definition at line 33 of file WaitUntilCommand.cpp.
|
protectedvirtual |
The initialize method is called the first time this Command is run after being started.
Implements Command.
Definition at line 29 of file WaitUntilCommand.cpp.
|
protectedvirtual |
Called when the command ends because somebody called cancel() or another command shared the same requirements as this one, and booted it out.
This is where you may want to wrap up loose ends, like shutting off a motor that was being used in the command.
Generally, it is useful to simply call the end() method within this method
Implements Command.
Definition at line 49 of file WaitUntilCommand.cpp.
|
protectedvirtual |
Check if we've reached the actual finish time.
Implements Command.
Definition at line 40 of file WaitUntilCommand.cpp.