Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
Commands
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);
25
Command
*
GetDefaultCommand
();
26
void
SetCurrentCommand
(
Command
*command);
27
Command
*
GetCurrentCommand
();
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::Subsystem
Subsystem(const char *name)
Definition:
Subsystem.cpp:17
Scheduler
Definition:
Scheduler.h:25
NamedSendable
Definition:
NamedSendable.h:19
ITable
Definition:
ITable.h:26
ErrorBase
Definition:
ErrorBase.h:37
Subsystem::GetCurrentCommand
Command * GetCurrentCommand()
Definition:
Subsystem.cpp:117
Command
Definition:
Command.h:43
Subsystem::GetTable
virtual ITable * GetTable()
Definition:
Subsystem.cpp:177
Subsystem::GetName
virtual std::string GetName()
Definition:
Subsystem.cpp:148
Subsystem
Definition:
Subsystem.h:17
Subsystem::GetSmartDashboardType
virtual std::string GetSmartDashboardType()
Definition:
Subsystem.cpp:153
Subsystem::GetDefaultCommand
Command * GetDefaultCommand()
Definition:
Subsystem.cpp:94
Subsystem::InitTable
virtual void InitTable(ITable *table)
Definition:
Subsystem.cpp:158
Subsystem::SetCurrentCommand
void SetCurrentCommand(Command *command)
Definition:
Subsystem.cpp:107
Subsystem::InitDefaultCommand
virtual void InitDefaultCommand()
Definition:
Subsystem.cpp:35
Subsystem::SetDefaultCommand
void SetDefaultCommand(Command *command)
Definition:
Subsystem.cpp:48
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.