31 lines
801 B
C++
31 lines
801 B
C++
//
|
|
// 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();
|
|
|
|
private:
|
|
XmlNode cfg_;
|
|
std::string id_;
|
|
unsigned int channelId_;
|
|
bool enable_;
|
|
std::shared_ptr<MotorProtocolManager> motor_protocol_manager;
|
|
|
|
std::shared_ptr<device::AbstractCanbus> can_client_{nullptr};
|
|
std::shared_ptr<device::CanReceiver<msgs::RobotDetail>> can_receiver_{nullptr};
|
|
std::shared_ptr<device::CanSender<msgs::RobotDetail>> can_sender_{nullptr};
|
|
std::shared_ptr<device::MessageManager<msgs::RobotDetail>> message_manager_{nullptr};
|
|
};
|
|
} |