WPILibC++  2018.4.1-20180823210227-1173-gde212a9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
CommandGroupEntry.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2011-2018 FIRST. 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 the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 namespace frc {
11 
12 class Command;
13 
15  public:
16  typedef enum {
17  kSequence_InSequence,
18  kSequence_BranchPeer,
19  kSequence_BranchChild
20  } Sequence;
21 
22  CommandGroupEntry() = default;
23  CommandGroupEntry(Command* command, Sequence state, double timeout = -1.0);
24  bool IsTimedOut() const;
25 
26  double m_timeout = -1.0;
27  Command* m_command = nullptr;
28  Sequence m_state = kSequence_InSequence;
29 };
30 
31 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
Definition: CommandGroupEntry.h:14
The Command class is at the very core of the entire command framework.
Definition: Command.h:48