NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
executive_action_client.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 
20 #ifndef EXECUTIVE_EXECUTIVE_ACTION_CLIENT_H_
21 #define EXECUTIVE_EXECUTIVE_ACTION_CLIENT_H_
22 
23 #include <actionlib/client/simple_action_client.h>
24 #include <ff_util/ff_action.h>
25 #include <string>
26 
27 namespace executive {
28 
29 enum Action {
31  ARM,
42 };
43 
44 template <class T>
46  public:
47  Action action();
48  void action(Action const& action);
49  std::string cmd_id();
50  void cmd_id(std::string const& cmd_id);
51  void SetCmdInfo(Action const& action,
52  std::string const& cmd_id);
53  private:
54  std::string cmd_id_;
55  Action action_;
56 };
57 
58 template <class T>
60  return action_;
61 }
62 
63 template <class T>
65  action_ = action;
66 }
67 
68 template <class T>
70  return cmd_id_;
71 }
72 
73 template <class T>
74 void ExecutiveActionClient<T>::cmd_id(std::string const& cmd_id) {
75  cmd_id_ = cmd_id;
76 }
77 
78 template <class T>
80  std::string const& cmd_id) {
81  action_ = action;
82  cmd_id_ = cmd_id;
83 }
84 
85 } // namespace executive
86 
87 #endif // EXECUTIVE_EXECUTIVE_ACTION_CLIENT_H_
executive::NONE
@ NONE
Definition: executive_action_client.h:30
executive::ExecutiveActionClient::SetCmdInfo
void SetCmdInfo(Action const &action, std::string const &cmd_id)
Definition: executive_action_client.h:79
executive::DOCK
@ DOCK
Definition: executive_action_client.h:32
executive::MOVE
@ MOVE
Definition: executive_action_client.h:36
executive::ARM
@ ARM
Definition: executive_action_client.h:31
executive::Action
Action
Definition: executive_action_client.h:29
executive::REACQUIRE
@ REACQUIRE
Definition: executive_action_client.h:38
executive::LOCALIZATION
@ LOCALIZATION
Definition: executive_action_client.h:35
executive::ExecutiveActionClient::cmd_id
std::string cmd_id()
Definition: executive_action_client.h:69
ff_util::FreeFlyerActionClient
A wrapper class around the simple action client.
Definition: ff_action.h:154
executive::ExecutiveActionClient::action
Action action()
Definition: executive_action_client.h:59
executive::ExecutiveActionClient
Definition: executive_action_client.h:45
executive::EXECUTE
@ EXECUTE
Definition: executive_action_client.h:33
ff_action.h
executive::UNDOCK
@ UNDOCK
Definition: executive_action_client.h:40
executive::IDLE
@ IDLE
Definition: executive_action_client.h:34
executive::PERCH
@ PERCH
Definition: executive_action_client.h:37
executive
Definition: executive.h:87
executive::STOP
@ STOP
Definition: executive_action_client.h:39
executive::UNPERCH
@ UNPERCH
Definition: executive_action_client.h:41