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
CommandGroup.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 __COMMAND_GROUP_H__
8
#define __COMMAND_GROUP_H__
9
10
#include "Commands/Command.h"
11
#include "Commands/CommandGroupEntry.h"
12
#include <list>
13
#include <vector>
14
33
class
CommandGroup
:
public
Command
34
{
35
public
:
36
CommandGroup
();
37
CommandGroup
(
const
char
*name);
38
virtual
~
CommandGroup
();
39
40
void
AddSequential
(
Command
*command);
41
void
AddSequential
(
Command
*command,
double
timeout);
42
void
AddParallel
(
Command
*command);
43
void
AddParallel
(
Command
*command,
double
timeout);
44
bool
IsInterruptible();
45
int
GetSize();
46
47
protected
:
48
virtual
void
Initialize
();
49
virtual
void
Execute
();
50
virtual
bool
IsFinished
();
51
virtual
void
End
();
52
virtual
void
Interrupted
();
53
virtual
void
_Initialize();
54
virtual
void
_Interrupted();
55
virtual
void
_Execute();
56
virtual
void
_End();
57
58
private
:
59
void
CancelConflicts(
Command
*command);
60
61
typedef
std::vector<CommandGroupEntry> CommandVector;
63
CommandVector m_commands;
64
typedef
std::list<CommandGroupEntry> CommandList;
66
CommandList m_children;
68
int
m_currentCommandIndex;
69
};
70
71
#endif
CommandGroup::AddSequential
void AddSequential(Command *command)
Definition:
CommandGroup.cpp:44
CommandGroup::End
virtual void End()
Definition:
CommandGroup.cpp:318
CommandGroup::Interrupted
virtual void Interrupted()
Definition:
CommandGroup.cpp:323
CommandGroup::CommandGroup
CommandGroup()
Definition:
CommandGroup.cpp:13
Command
Definition:
Command.h:43
CommandGroup::AddParallel
void AddParallel(Command *command)
Definition:
CommandGroup.cpp:125
CommandGroup
Definition:
CommandGroup.h:33
CommandGroup::Execute
virtual void Execute()
Definition:
CommandGroup.cpp:313
CommandGroup::Initialize
virtual void Initialize()
Definition:
CommandGroup.cpp:308
CommandGroup::IsFinished
virtual bool IsFinished()
Definition:
CommandGroup.cpp:327
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.