Now you can download a copy of these docs so you can use them offline! Download now

Subsystem Class Reference

Inheritance diagram for Subsystem:
Collaboration diagram for Subsystem:

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

Detailed Description

Definition at line 17 of file Subsystem.h.


Constructor & Destructor Documentation

Subsystem::Subsystem ( const char *  name  ) 

Creates a subsystem with the given name

Parameters:
name the name of the subsystem

Definition at line 18 of file Subsystem.cpp.


Member Function Documentation

Command * Subsystem::GetCurrentCommand (  ) 

Returns the command which currently claims this subsystem.

Returns:
the command which currently claims this subsystem

Definition at line 116 of file Subsystem.cpp.

Command * Subsystem::GetDefaultCommand (  ) 

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

Returns:
the default command

Definition at line 94 of file Subsystem.cpp.

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

Definition at line 35 of file Subsystem.cpp.

void Subsystem::SetCurrentCommand ( Command command  ) 

Sets the current command

Parameters:
command the new current command

Definition at line 107 of file Subsystem.cpp.

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:
command the default command (or null if there should be none)

Definition at line 48 of file Subsystem.cpp.


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

Generated on Thu Jan 12 2012 22:35:37 for WPILibC++ by doxygen 1.7.1