27 lines
634 B
C
27 lines
634 B
C
|
|
//
|
||
|
|
// 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"
|
||
|
|
|
||
|
|
namespace cmvr::device
|
||
|
|
{
|
||
|
|
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
|