fastcat 0.13.15
C++ EtherCAT Device Command & Control Library
Loading...
Searching...
No Matches
egd.h
Go to the documentation of this file.
1#ifndef FASTCAT_EGW_H_
2#define FASTCAT_EGW_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/jsd_device_base.h"
10#include "jsd/jsd_egd_pub.h"
11
12namespace fastcat
13{
14class Egd : public JsdDeviceBase
15{
16 public:
17 Egd();
18 bool ConfigFromYaml(const YAML::Node& node) override;
19 bool Read() override;
20 FaultType Process() override;
21 bool Write(DeviceCmd& cmd) override;
22 void Fault() override;
23 void Reset() override;
24
25 protected:
26 bool ConfigFromYamlCommon(const YAML::Node& node);
27 bool DriveCmdModeFromString(std::string dcm_string,
28 jsd_egd_drive_cmd_mode_t& dcm);
29
31 jsd_slave_config_t jsd_slave_config_ = {0};
32 jsd_egd_state_t jsd_egd_state_ = {0};
33
34 double cs_cmd_freq_hz_ = 0.0;
35
36 private:
37 bool WriteProfiledMode(DeviceCmd& cmd);
38 bool WriteCSMode(DeviceCmd& cmd);
39 bool GSModeFromString(std::string gs_mode_string,
40 jsd_elmo_gain_scheduling_mode_t& gs_mode);
41};
42
43} // namespace fastcat
44
45#endif
Definition egd.h:15
void Reset() override
Definition egd.cc:127
std::string drive_cmd_mode_string_
Definition egd.h:30
FaultType Process() override
Definition egd.cc:92
jsd_egd_state_t jsd_egd_state_
Definition egd.h:32
bool ConfigFromYaml(const YAML::Node &node) override
Definition egd.cc:21
Egd()
Definition egd.cc:13
double cs_cmd_freq_hz_
Definition egd.h:34
bool Write(DeviceCmd &cmd) override
Definition egd.cc:98
bool DriveCmdModeFromString(std::string dcm_string, jsd_egd_drive_cmd_mode_t &dcm)
Definition egd.cc:271
jsd_slave_config_t jsd_slave_config_
Definition egd.h:31
void Fault() override
Definition egd.cc:121
bool Read() override
Definition egd.cc:28
bool ConfigFromYamlCommon(const YAML::Node &node)
Definition egd.cc:133
Definition jsd_device_base.h:16
Definition device_base.h:18