Class CIA402MockSlave
Defined in File cia402_slave.hpp
Inheritance Relationships
Base Type
public canopen::BasicSlave
Class Documentation
-
class CIA402MockSlave : public canopen::BasicSlave
Public Functions
-
inline explicit CIA402MockSlave(io::TimerBase &timer, io::CanChannelBase &chan, const ::std::string &dcf_txt, const ::std::string &dcf_bin = "", uint8_t id = 0xff)
-
inline virtual ~CIA402MockSlave()
Protected Types
-
enum InternalState
Values:
-
enumerator Unknown
-
enumerator Start
-
enumerator Not_Ready_To_Switch_On
-
enumerator Switch_On_Disabled
-
enumerator Ready_To_Switch_On
-
enumerator Switched_On
-
enumerator Operation_Enable
-
enumerator Quick_Stop_Active
-
enumerator Fault_Reaction_Active
-
enumerator Fault
-
enumerator Unknown
-
enum StatusWord
Values:
-
enumerator SW_Ready_To_Switch_On
-
enumerator SW_Switched_On
-
enumerator SW_Operation_enabled
-
enumerator SW_Fault
-
enumerator SW_Voltage_enabled
-
enumerator SW_Quick_stop
-
enumerator SW_Switch_on_disabled
-
enumerator SW_Warning
-
enumerator SW_Manufacturer_specific0
-
enumerator SW_Remote
-
enumerator SW_Target_reached
-
enumerator SW_Internal_limit
-
enumerator SW_Operation_mode_specific0
-
enumerator SW_Operation_mode_specific1
-
enumerator SW_Manufacturer_specific1
-
enumerator SW_Manufacturer_specific2
-
enumerator SW_Ready_To_Switch_On
-
enum ControlWord
Values:
-
enumerator CW_Switch_On
-
enumerator CW_Enable_Voltage
-
enumerator CW_Quick_Stop
-
enumerator CW_Enable_Operation
-
enumerator CW_Operation_mode_specific0
-
enumerator CW_Operation_mode_specific1
-
enumerator CW_Operation_mode_specific2
-
enumerator CW_Fault_Reset
-
enumerator CW_Halt
-
enumerator CW_Operation_mode_specific3
-
enumerator CW_Manufacturer_specific0
-
enumerator CW_Manufacturer_specific1
-
enumerator CW_Manufacturer_specific2
-
enumerator CW_Manufacturer_specific3
-
enumerator CW_Manufacturer_specific4
-
enumerator CW_Switch_On
-
enum OperationMode
Values:
-
enumerator No_Mode
-
enumerator Profiled_Position
-
enumerator Velocity
-
enumerator Profiled_Velocity
-
enumerator Profiled_Torque
-
enumerator Reserved
-
enumerator Homing
-
enumerator Interpolated_Position
-
enumerator Cyclic_Synchronous_Position
-
enumerator Cyclic_Synchronous_Velocity
-
enumerator Cyclic_Synchronous_Torque
-
enumerator No_Mode
Protected Functions
-
inline void run_profiled_position_mode()
-
inline void run_cyclic_position_mode()
-
inline void run_interpolated_position_mode()
-
inline void run_position_mode()
-
inline void set_new_status_word_and_state()
-
inline void set_status_bit(int bit)
-
inline void clear_status_bit(int bit)
-
inline void set_switch_on_disabled()
-
inline void set_ready_to_switch_on()
-
inline void set_switch_on()
-
inline void set_operation_enabled()
-
inline void set_quick_stop()
-
inline void on_not_ready_to_switch_on()
-
inline void on_switch_on_disabled()
-
inline void on_ready_to_switch_on()
-
inline void on_switched_on()
-
inline void on_operation_enabled()
-
inline void start_sync_pos_mode()
-
inline void start_profile_pos_mode()
-
inline void start_interpolated_pos_mode()
-
inline void on_quickstop_active()
-
inline bool is_shutdown()
-
inline bool is_disable_voltage()
-
inline bool is_switch_on()
-
inline bool is_enable_operation()
-
inline bool is_quickstop()
-
inline bool is_faul_reset()
-
inline void OnWrite(uint16_t idx, uint8_t subidx) noexcept override
Protected Attributes
-
std::atomic<bool> is_relative
-
std::atomic<bool> is_running
-
std::atomic<bool> is_halt
-
std::atomic<bool> is_new_set_point
-
std::atomic<int8_t> operation_mode
-
std::atomic<int8_t> old_operation_mode
-
std::mutex w_mutex
-
uint16_t status_word
-
uint16_t control_word
-
std::atomic<InternalState> state
-
std::thread profiled_position_mode
-
std::thread profiled_velocity_mode
-
std::thread cyclic_position_mode
-
std::thread cyclic_velocity_mode
-
std::thread interpolated_position_mode
-
double cycle_time
-
std::mutex in_mode_mutex
-
double actual_position
-
double actual_speed
-
double acceleration
-
double control_cycle_period
-
inline explicit CIA402MockSlave(io::TimerBase &timer, io::CanChannelBase &chan, const ::std::string &dcf_txt, const ::std::string &dcf_bin = "", uint8_t id = 0xff)