30 lines
561 B
Protocol Buffer
30 lines
561 B
Protocol Buffer
|
|
syntax = "proto3";
|
||
|
|
|
||
|
|
package cmvr.msgs;
|
||
|
|
|
||
|
|
// Error codes enum for API's categorized by modules.
|
||
|
|
enum ErrorCode {
|
||
|
|
// No error, returns on success.
|
||
|
|
OK = 0;
|
||
|
|
|
||
|
|
// Canbus module error codes start from here.
|
||
|
|
CANBUS_ERROR = 2000;
|
||
|
|
CAN_CLIENT_ERROR_BASE = 2100;
|
||
|
|
CAN_CLIENT_ERROR_OPEN_DEVICE_FAILED = 2101;
|
||
|
|
CAN_CLIENT_ERROR_FRAME_NUM = 2102;
|
||
|
|
CAN_CLIENT_ERROR_SEND_FAILED = 2103;
|
||
|
|
CAN_CLIENT_ERROR_RECV_FAILED = 2104;
|
||
|
|
|
||
|
|
// motor
|
||
|
|
MOTOR_ERROR = 3000;
|
||
|
|
MOTOR_ERROR_SET_ZERO = 3001;
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
message StatusPb {
|
||
|
|
ErrorCode error_code = 1;
|
||
|
|
string msg = 2;
|
||
|
|
}
|