1 #ifndef CANOPEN_402_DRIVER_COMMAND_HPP
2 #define CANOPEN_402_DRIVER_COMMAND_HPP
4 #include <boost/container/flat_map.hpp>
17 Op(uint16_t to_set, uint16_t to_reset) : to_set_(to_set), to_reset_(to_reset) {}
18 void operator()(uint16_t & val)
const { val = (val & ~to_reset_) | to_set_; }
22 boost::container::flat_map<std::pair<State402::InternalState, State402::InternalState>, Op>
26 transitions_.insert(std::make_pair(std::make_pair(from, to), op));
33 return transitions_.at(std::make_pair(from, to));
36 static const TransitionTable transitions_;
Definition: command.hpp:12
ControlWord
Definition: command.hpp:42
@ CW_Quick_Stop
Definition: command.hpp:45
@ CW_Operation_mode_specific3
Definition: command.hpp:52
@ CW_Switch_On
Definition: command.hpp:43
@ CW_Manufacturer_specific1
Definition: command.hpp:55
@ CW_Operation_mode_specific1
Definition: command.hpp:48
@ CW_Manufacturer_specific2
Definition: command.hpp:56
@ CW_Manufacturer_specific0
Definition: command.hpp:54
@ CW_Operation_mode_specific0
Definition: command.hpp:47
@ CW_Operation_mode_specific2
Definition: command.hpp:49
@ CW_Manufacturer_specific4
Definition: command.hpp:58
@ CW_Enable_Operation
Definition: command.hpp:46
@ CW_Fault_Reset
Definition: command.hpp:50
@ CW_Enable_Voltage
Definition: command.hpp:44
@ CW_Manufacturer_specific3
Definition: command.hpp:57
@ CW_Halt
Definition: command.hpp:51
static bool setTransition(uint16_t &cw, const State402::InternalState &from, const State402::InternalState &to, State402::InternalState *next)
InternalState
Definition: state.hpp:33
Definition: configuration_manager.hpp:28