WPILibC++  2019.1.1-beta-4-27-ga2368a6
 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  enum Sequence {
17  kSequence_InSequence,
18  kSequence_BranchPeer,
19  kSequence_BranchChild
20  };
21 
22  CommandGroupEntry() = default;
23  CommandGroupEntry(Command* command, Sequence state, double timeout = -1.0);
24 
26  CommandGroupEntry& operator=(CommandGroupEntry&&) = default;
27 
28  bool IsTimedOut() const;
29 
30  double m_timeout = -1.0;
31  Command* m_command = nullptr;
32  Sequence m_state = kSequence_InSequence;
33 };
34 
35 } // 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