fastcat 0.13.15
C++ EtherCAT Device Command & Control Library
Loading...
Searching...
No Matches
commander.h
Go to the documentation of this file.
1#ifndef FASTCAT_COMMANDER_H_
2#define FASTCAT_COMMANDER_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/device_base.h"
10
11namespace fastcat
12{
13class Commander : public DeviceBase
14{
15 public:
17 bool ConfigFromYaml(const YAML::Node& node) override;
18 bool Read() override;
19 bool Write(DeviceCmd& cmd) override;
20 void Fault() override;
21 void Reset() override;
22
23 protected:
25 DeviceCmd device_cmd_ = {};
26
27 double enable_time_ = 0;
28
29 double enable_duration_ = 1.0;
30 bool start_enabled_ = false;
31
32 uint16_t skip_n_loops_ = 0;
33 uint16_t skip_counter_ = 0;
34};
35
36} // namespace fastcat
37
38#endif
Definition commander.h:14
double enable_time_
Definition commander.h:27
void Reset() override
DeviceCmd device_cmd_
Definition commander.h:25
uint16_t skip_n_loops_
Definition commander.h:32
bool ConfigFromYaml(const YAML::Node &node) override
std::string device_cmd_type_string_
Definition commander.h:24
double enable_duration_
Definition commander.h:29
uint16_t skip_counter_
Definition commander.h:33
bool start_enabled_
Definition commander.h:30
bool Read() override
void Fault() override
bool Write(DeviceCmd &cmd) override
Definition device_base.h:20
Definition device_base.h:18