hardware_message.proto 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. syntax = "proto2";
  2. package message;
  3. import "message_base.proto";
  4. enum Hardware_statu //硬件状态
  5. {
  6. eNormal=0; //正常且空闲
  7. eBusy=1; //工作中
  8. eMiss=2; //连接丢失
  9. eError=3; //故障报错
  10. }
  11. //硬件位置.
  12. message Position
  13. {
  14. required float x=1;
  15. required float y=2;
  16. required float z=3;
  17. }
  18. //搬运器状态
  19. message Carrier_status
  20. {
  21. required Hardware_statu statu=1; //状态
  22. optional int32 command_id=2; //指令唯一标识符id
  23. optional string error_description=3; //搬运器错误信息(可无)
  24. required Position position=4; //搬运器位置(z表示电梯位置)
  25. required bool empty=5; //是否空载
  26. }
  27. //搬运机构各个零部件状态
  28. message Harware_statu_msg
  29. {
  30. required Message_type msg_type=1; //消息类型
  31. required Carrier_status carrier1_statu=2; //搬运器1状态
  32. required Carrier_status carrier2_statu=3; //搬运器2状态
  33. required Carrier_status carrier3_statu=4; //搬运器3状态
  34. }
  35. enum Action_type
  36. {
  37. ePark=0;
  38. ePick=1;
  39. }
  40. //执行搬运请求
  41. message Execute_request_msg
  42. {
  43. required Base_info msg_info=1; //消息类型 //消息类型
  44. required int32 command_id=2; //指令唯一标识符id
  45. required Action_type action_type=3;
  46. required int32 from_id=4;
  47. required int32 destination=5;
  48. required Locate_information locate_information=6;
  49. }
  50. //搬运动作执行完成后反馈结果
  51. message Execute_response_msg
  52. {
  53. required Base_info msg_info=1; //消息类型
  54. required int32 command_id=2; //指令唯一标识符id
  55. required int32 error_code=3;
  56. optional string error_description=4;
  57. }