28 #ifndef VESC_DRIVER_VESC_INTERFACE_H_ 29 #define VESC_DRIVER_VESC_INTERFACE_H_ 94 void connect(
const std::string& port);
125 std::unique_ptr<Impl>
impl_;
137 std::stringstream ss;
138 ss <<
"SerialException " << description <<
" failed.";
143 virtual const char*
what()
const throw()
145 return e_what_.c_str();
151 #endif // VESC_DRIVER_VESC_INTERFACE_H_
VescInterface(const std::string &port=std::string(), const PacketHandlerFunction &packet_handler=PacketHandlerFunction(), const ErrorHandlerFunction &error_handler=ErrorHandlerFunction())
std::function< void(const VescPacketConstPtr &)> PacketHandlerFunction
void setPosition(double position)
std::unique_ptr< Impl > impl_
virtual ~SerialException()
std::function< void(const std::string &)> ErrorHandlerFunction
void setDutyCycle(double duty_cycle)
void connect(const std::string &port)
void setCurrent(double current)
virtual const char * what() const
void setBrake(double brake)
SerialException(const char *description)
void setServo(double servo)
void send(const VescPacket &packet)
void setSpeed(double speed)
SerialException(const SerialException &other)
void setErrorHandler(const ErrorHandlerFunction &handler)
VescInterface & operator=(const VescInterface &)=delete
void setPacketHandler(const PacketHandlerFunction &handler)