Now you can download a copy of these docs so you can use them offline! Download now
Subsystem.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2011. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5 /*----------------------------------------------------------------------------*/
6 
7 #ifndef __SUBSYSTEM_H__
8 #define __SUBSYSTEM_H__
9 
10 #include "ErrorBase.h"
11 #include "SmartDashboard/NamedSendable.h"
12 #include <string>
13 
14 
15 class Command;
16 
17 class Subsystem : public ErrorBase, public NamedSendable
18 {
19  friend class Scheduler;
20 public:
21  Subsystem(const char *name);
22  virtual ~Subsystem() {}
23 
24  void SetDefaultCommand(Command *command);
26  void SetCurrentCommand(Command *command);
28  virtual void InitDefaultCommand();
29 
30 private:
31  void ConfirmCommand();
32 
33  Command *m_currentCommand;
34  bool m_currentCommandChanged;
35  Command *m_defaultCommand;
36  std::string m_name;
37  bool m_initializedDefaultCommand;
38 
39 public:
40  virtual std::string GetName();
41  virtual void InitTable(ITable* table);
42  virtual ITable* GetTable();
43  virtual std::string GetSmartDashboardType();
44 protected:
45  ITable* m_table;
46 };
47 
48 #endif
Subsystem(const char *name)
Definition: Subsystem.cpp:17
Definition: ITable.h:26
Command * GetCurrentCommand()
Definition: Subsystem.cpp:117
virtual ITable * GetTable()
Definition: Subsystem.cpp:177
virtual std::string GetName()
Definition: Subsystem.cpp:148
virtual std::string GetSmartDashboardType()
Definition: Subsystem.cpp:153
Command * GetDefaultCommand()
Definition: Subsystem.cpp:94
virtual void InitTable(ITable *table)
Definition: Subsystem.cpp:158
void SetCurrentCommand(Command *command)
Definition: Subsystem.cpp:107
virtual void InitDefaultCommand()
Definition: Subsystem.cpp:35
void SetDefaultCommand(Command *command)
Definition: Subsystem.cpp:48

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6