fastcat 0.13.15
C++ EtherCAT Device Command & Control Library
Loading...
Searching...
No Matches
gold_actuator.h
Go to the documentation of this file.
1#ifndef FASTCAT_GOLD_ACTUATOR_H_
2#define FASTCAT_GOLD_ACTUATOR_H_
3
4// Include related header (for cc files)
5
6// Include C then C++ libraries
7
8// Include external then project includes
9#include "fastcat/jsd/actuator.h"
10#include "jsd/jsd_egd_pub.h"
11
12namespace fastcat
13{
14class GoldActuator : public Actuator
15{
16 friend class Tester;
17
18 public:
20
21 protected:
22 jsd_egd_state_t jsd_egd_state_ = {};
23
24 private:
25 void PopulateJsdSlaveConfig() override;
26 void PopulateState() override;
27
28 bool HandleNewProfPosCmdImpl(const DeviceCmd& cmd) override;
29 bool HandleNewProfVelCmdImpl(const DeviceCmd& cmd) override;
30 bool HandleNewProfTorqueCmdImpl(const DeviceCmd& cmd) override;
31
32 FaultType ProcessProfPos() override;
33 FaultType ProcessProfVel() override;
34 FaultType ProcessProfTorque() override;
35 FaultType ProcessProfPosDisengaging() override;
36 FaultType ProcessProfVelDisengaging() override;
37 FaultType ProcessProfTorqueDisengaging() override;
38
39 void ElmoRead() override;
40 void ElmoClearErrors() override;
41 void ElmoSetPeakCurrent(double current) override;
42 void ElmoSetDigitalOutput(uint8_t digital_output_index,
43 uint8_t output_level) override;
44 void ElmoSetUnitMode(int32_t mode, uint16_t app_id) override;
45 void ElmoSetGainSchedulingMode(jsd_elmo_gain_scheduling_mode_t mode,
46 uint16_t app_id) override;
47 void ElmoSetGainSchedulingIndex(uint16_t index) override;
48 void ElmoFault() override;
49 void ElmoReset() override;
50 void ElmoCSP(const jsd_elmo_motion_command_csp_t& jsd_csp_cmd) override;
51 void ElmoCSV(const jsd_elmo_motion_command_csv_t& jsd_csv_cmd) override;
52 void ElmoCST(const jsd_elmo_motion_command_cst_t& jsd_cst_cmd) override;
53 void ElmoHalt() override;
54 void ElmoProcess() override;
55
56 double GetActualVelocity() override;
57 double GetElmoActualPosition() override;
58 jsd_elmo_state_machine_state_t GetElmoStateMachineState() override;
59 bool IsStoEngaged() override;
60};
61
62} // namespace fastcat
63
64#endif
Definition actuator.h:67
Definition gold_actuator.h:15
GoldActuator()
Definition gold_actuator.cc:11
jsd_egd_state_t jsd_egd_state_
Definition gold_actuator.h:22
friend class Tester
Definition gold_actuator.h:16
Definition device_base.h:18