cmvr-es/include/hardware/can/motor_protocol/motorprotocolmanager.h

27 lines
636 B
C
Raw Normal View History

2025-10-24 09:51:14 +08:00
//
// Created by linbo on 2025/10/22.
//
#ifndef CMVR_ES_MOTORPROTOCOLMANAGER_H
#define CMVR_ES_MOTORPROTOCOLMANAGER_H
#include <unordered_map>
#include <memory>
#include "abstractmotorprotocol.h"
2025-10-24 10:51:49 +08:00
namespace cmvr::hardware
2025-10-24 09:51:14 +08:00
{
class MotorProtocolManager
{
public:
explicit MotorProtocolManager(const XmlNode &cfg);
~MotorProtocolManager() = default;
std::shared_ptr<AbstractMotorProtocol> getMotorProtocol(const std::string &joint_name);
private:
std::unordered_map<std::string, std::shared_ptr<AbstractMotorProtocol>> motor_protocols_;
};
}
#endif //CMVR_ES_MOTORPROTOCOLMANAGER_H