17 #ifndef ETHERCAT_INTERFACE__EC_SYNC_MANAGER_HPP_
18 #define ETHERCAT_INTERFACE__EC_SYNC_MANAGER_HPP_
25 #include "yaml-cpp/yaml.h"
39 if (sm_config[
"index"]) {
40 index = sm_config[
"index"].as<uint8_t>();
42 std::cerr <<
"missing sdo index info" << std::endl;
46 if (sm_config[
"type"]) {
47 if (sm_config[
"type"].as<std::string>() ==
"input") {
49 }
else if (sm_config[
"type"].as<std::string>() ==
"output") {
52 std::cerr <<
"sm " <<
index <<
": type should be input/output" << std::endl;
56 std::cerr <<
"sm " <<
index <<
": missing type info" << std::endl;
60 if (sm_config[
"pdo"]) {
61 if (sm_config[
"pdo"].as<std::string>() ==
"rpdo") {
63 }
else if (sm_config[
"pdo"].as<std::string>() ==
"tpdo") {
68 if (sm_config[
"watchdog"]) {
69 if (sm_config[
"watchdog"].as<std::string>() ==
"enable") {
71 }
else if (sm_config[
"watchdog"].as<std::string>() ==
"disable") {
Definition: ec_sync_manager.hpp:31
bool load_from_config(YAML::Node sm_config)
Definition: ec_sync_manager.hpp:36
~SMConfig()
Definition: ec_sync_manager.hpp:34
ec_direction_t type
Definition: ec_sync_manager.hpp:80
SMConfig()
Definition: ec_sync_manager.hpp:33
uint8_t index
Definition: ec_sync_manager.hpp:79
std::string pdo_name
Definition: ec_sync_manager.hpp:81
ec_watchdog_mode_t watchdog
Definition: ec_sync_manager.hpp:82
Definition: ec_master.hpp:29