// // Created by linbo on 2025/10/22. // #include "hardware/can/can_group.h" #include using namespace std; using namespace cmvr::hardware; CanGroup::CanGroup(const XmlNode &cfg) { try { id_ = cfg.getAttrString("id"); channelId_ = cfg.getAttrDefault("channelId",0); enable_ = cfg.getAttrDefault("enable", false); motor_protocol_manager = std::make_shared(cfg); } catch (const exception &e) { LOG(FATAL) << "[CanGroup] (CanGroup): CanGroup initialization failed: " << e.what(); throw std::runtime_error("[CanGroup] (CanGroup): CanGroup create failed" + string(e.what())); } }