NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
op_state_fault.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 #ifndef EXECUTIVE_OP_STATE_FAULT_H_
20 #define EXECUTIVE_OP_STATE_FAULT_H_
21 
22 #include "executive/op_state.h"
23 #include <string>
24 
25 namespace executive {
26 class OpStateFault : public OpState {
27  public:
29 
30  OpState* HandleCmd(ff_msgs::CommandStampedPtr const& cmd);
31 
32  // Guest Science Ack
33  OpState* HandleGuestScienceAck(ff_msgs::AckStampedConstPtr const& ack);
34 
36  std::string const& result_response,
37  std::string const& cmd_id,
38  Action const& action);
39 
40  protected:
41  explicit OpStateFault(std::string const& name, unsigned char id) :
42  OpState(name, id) {}
43 
44  private:
45  // allow creation only by repo
46  friend class OpStateRepo;
47 };
48 
49 } // namespace executive
50 #endif // EXECUTIVE_OP_STATE_FAULT_H_
executive::OpStateFault::HandleResult
OpState * HandleResult(ff_util::FreeFlyerActionState::Enum const &state, std::string const &result_response, std::string const &cmd_id, Action const &action)
Definition: op_state_fault.cc:118
executive::Action
Action
Definition: executive_action_client.h:29
executive::OpStateRepo
Definition: op_state_repo.h:43
executive::OpStateFault::~OpStateFault
~OpStateFault()
Definition: op_state_fault.h:28
executive::OpStateFault::HandleGuestScienceAck
OpState * HandleGuestScienceAck(ff_msgs::AckStampedConstPtr const &ack)
Definition: op_state_fault.cc:104
executive::OpStateFault::OpStateFault
OpStateFault(std::string const &name, unsigned char id)
Definition: op_state_fault.h:41
executive::OpStateFault
Definition: op_state_fault.h:26
executive::OpStateFault::HandleCmd
OpState * HandleCmd(ff_msgs::CommandStampedPtr const &cmd)
Definition: op_state_fault.cc:23
ff_util::FreeFlyerActionState::Enum
Enum
Definition: ff_action.h:41
op_state.h
state
uint8_t state
Definition: signal_lights.h:90
executive::OpState::id
unsigned char const & id() const
Definition: op_state.h:82
executive::OpState::name
std::string const & name() const
Definition: op_state.h:81
executive
Definition: executive.h:87
executive::OpState
Definition: op_state.h:45