One Motor 0.6.0
RoboMaster全平台一站式电机驱动库
载入中...
搜索中...
未找到
Error.hpp
浏览该文件的文档.
1#ifndef ONE_MOTOR_ERROR_HPP
2#define ONE_MOTOR_ERROR_HPP
3
11
12#include <string>
13#include <utility>
14
15namespace OneMotor
16{
30
36 struct Error
37 {
43 Error(const ErrorCode c, std::string msg): message(std::move(msg)), code(c)
44 {
45 }
46
48 std::string message;
51 };
52}
53
54#endif //ONE_MOTOR_ERROR_HPP
ErrorCode
错误码枚举
定义 Error.hpp:23
@ DJIMotorManagerError
DJI 电机管理器错误
定义 Error.hpp:28
@ CanDriverInternalError
CAN 驱动内部错误
定义 Error.hpp:25
ErrorCode code
错误码
定义 Error.hpp:50
std::string message
错误消息文本
定义 Error.hpp:48
Error(const ErrorCode c, std::string msg)
构造函数
定义 Error.hpp:43