// // Created by linbo on 2025/10/22. // #pragma once #include "motor_protocol/motorprotocolmanager.h" namespace cmvr::hardware { class CanGroup { public: explicit CanGroup(const XmlNode &cfg); ~CanGroup() = default; void init(); std::shared_ptr getMotorProtocol(const std::string &protocolType); uint8_t getNodeId(const std::string& joint_name); const MotorProtocolManager::MotorInfo& getMotorInfo(const std::string& joint_name); private: XmlNode cfg_; std::string id_; unsigned int channelId_; bool enable_; std::shared_ptr motor_protocol_manager; std::shared_ptr can_client_{nullptr}; std::shared_ptr> can_receiver_{nullptr}; std::shared_ptr> can_sender_{nullptr}; std::shared_ptr> message_manager_{nullptr}; }; }