WPILib 2012
WPILibRoboticsLibraryforFRC
Public Member Functions | Friends
Subsystem Class Reference
Inheritance diagram for Subsystem:
SmartDashboardNamedData ErrorBase SmartDashboardData PIDSubsystem

List of all members.

Public Member Functions

 Subsystem (const char *name)
virtual std::string GetName ()
virtual std::string GetType ()
virtual NetworkTableGetTable ()
void SetDefaultCommand (Command *command)
CommandGetDefaultCommand ()
void SetCurrentCommand (Command *command)
CommandGetCurrentCommand ()
virtual void InitDefaultCommand ()

Friends

class Scheduler

Constructor & Destructor Documentation

Subsystem::Subsystem ( const char *  name)

Creates a subsystem with the given name

Parameters:
namethe name of the subsystem

Member Function Documentation

Command * Subsystem::GetCurrentCommand ( )

Returns the command which currently claims this subsystem.

Returns:
the command which currently claims this subsystem
Command * Subsystem::GetDefaultCommand ( )

Returns the default command (or null if there is none).

Returns:
the default command
void Subsystem::InitDefaultCommand ( ) [virtual]

Initialize the default command for this subsystem This is meant to be the place to call SetDefaultCommand in a subsystem and will be called on all the subsystems by the CommandBase method before the program starts running by using the list of all registered Subsystems inside the Scheduler.

This should be overridden by a Subsystem that has a default Command

void Subsystem::SetCurrentCommand ( Command command)

Sets the current command

Parameters:
commandthe new current command
void Subsystem::SetDefaultCommand ( Command command)

Sets the default command. If this is not called or is called with null, then there will be no default command for the subsystem.

WARNING: This should NOT be called in a constructor if the subsystem is a singleton.

Parameters:
commandthe default command (or null if there should be none)

The documentation for this class was generated from the following files:
 All Classes Functions Variables