singlechip_msg.proto 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. syntax = "proto2";
  2. package message;
  3. import "message_base.proto";
  4. //连接口
  5. message InputDi
  6. {
  7. required int32 Di0 = 1; //停车超前光电(0正常,1超界故障)
  8. required int32 Di1 = 2; //停车超后光电(0正常,1超界故障)
  9. required int32 Di2 = 3; //停车超左光电(0正常,1超界故障)
  10. required int32 Di3 = 4; //停车超1550光电(0正常,1超界故障)
  11. required int32 Di4 = 5; //2050高度(0默认,1被触发)
  12. required int32 Di5 = 6; //1750高度(0默认,1被触发)
  13. required int32 Di6 = 7; //2050高度(0默认,1被触发)
  14. required int32 Di7 = 8; //预留
  15. required int32 Di8 = 9; //停车库门开到位(1表示开到位)
  16. required int32 Di9 = 10; //停车库门关到位(1表示关到位)
  17. required int32 Di10 = 11;//预留的门故障位(1表示门故障)
  18. required int32 Di11 = 12;//调度完成标志位,是否允许终端放下一辆车进入入口(0调度正忙,1调度允许下一辆车)
  19. required int32 Di12 = 13;//库内光电,判断门内是否有车(0无车,1有车)
  20. required int32 Di13 = 14;//库外地磁 ,判断门外(0无车,1有车)
  21. required int32 Di14 = 15;//重启
  22. required int32 Di15 = 16;//急停
  23. }
  24. //连接口
  25. message OutputDo
  26. {
  27. required int32 Do0 = 1; //外门 开门(1)
  28. required int32 Do1 = 2; //外门 关门(1)
  29. required int32 Do2 = 3; //备用
  30. required int32 Do3 = 4; //备用
  31. required int32 Do4 = 5; //备用
  32. required int32 Do5 = 6; //备用
  33. required int32 Do6 = 7; //备用
  34. required int32 Do7 = 8; //备用
  35. }
  36. //流程控制
  37. enum Process_control
  38. {
  39. PROCESS_CONTROL_UNKNOWN = 0;//未知
  40. PROCESS_CONTROL_FULL_AUTO = 1;//全自动,
  41. PROCESS_CONTROL_MANUAL = 2;//手动
  42. PROCESS_CONTROL_AUTO_CLOSE = 3;//半自动关门
  43. PROCESS_CONTROL_AUTO_OPEN = 4;//半自动开门
  44. PROCESS_CONTROL_TO_READY = 5;//切换到待机
  45. PROCESS_CONTROL_RESET = 7;//重启
  46. PROCESS_CONTROL_STOP = 8;//急停
  47. PROCESS_CONTROL_FAULT = 9;//故障
  48. PROCESS_CONTROL_INLET_0 = 10 ;//未知
  49. PROCESS_CONTROL_INLET_1 = 11 ;//未知
  50. PROCESS_CONTROL_INLET_2 = 12 ;//未知
  51. PROCESS_CONTROL_INLET_3 = 13 ;//未知
  52. PROCESS_CONTROL_INLET_4 = 14 ;//未知
  53. PROCESS_CONTROL_INLET_5 = 15 ;//未知
  54. PROCESS_CONTROL_INLET_6 = 16 ;//未知
  55. PROCESS_CONTROL_INLET_7 = 17 ;//未知
  56. PROCESS_CONTROL_INLET_8 = 18 ;//未知
  57. PROCESS_CONTROL_INLET_9 = 19 ;//未知
  58. PROCESS_CONTROL_OUTLET_0 = 30 ;//未知
  59. PROCESS_CONTROL_OUTLET_1 = 31 ;//未知
  60. PROCESS_CONTROL_OUTLET_2 = 32 ;//未知
  61. PROCESS_CONTROL_OUTLET_3 = 33 ;//未知
  62. PROCESS_CONTROL_OUTLET_4 = 34 ;//未知
  63. PROCESS_CONTROL_OUTLET_5 = 35 ;//未知
  64. PROCESS_CONTROL_OUTLET_6 = 36 ;//未知
  65. PROCESS_CONTROL_OUTLET_7 = 37 ;//未知
  66. PROCESS_CONTROL_OUTLET_8 = 38 ;//未知
  67. PROCESS_CONTROL_OUTLET_9 = 39 ;//未知
  68. };
  69. //终端给单片机
  70. message terminal_msg
  71. {
  72. required int32 TerminalID = 1; // 终端号(单片机号)
  73. required int32 DispatchDirection= 2; // 方向(1入口,2出口)
  74. required Process_control ProcessControl= 3; // 门控
  75. required OutputDo OutPutDo= 4; // 输入口
  76. }
  77. //超界状态
  78. enum Over_border_status
  79. {
  80. OVER_BORDER_STATUS_UNKNOWN = 0 ;//未知
  81. OVER_BORDER_STATUS_NORMAL = 1 ;//正常
  82. OVER_BORDER_STATUS_FRONT = 2 ;//前超界
  83. OVER_BORDER_STATUS_BACK = 3 ;//后超界
  84. OVER_BORDER_STATUS_LEFT = 4 ;//左超界
  85. OVER_BORDER_STATUS_RIGHT = 5 ;//右超界
  86. };
  87. //车高状态
  88. enum Car_height_status
  89. {
  90. CAR_HEIGHT_STATUS_UNKNOWN = 0 ;//未知
  91. CAR_HEIGHT_STATUS_SMALL = 1 ;//小车
  92. CAR_HEIGHT_STATUS_MEDIUM = 2 ;//中车
  93. CAR_HEIGHT_STATUS_LARGE = 3 ;//大车
  94. CAR_HEIGHT_STATUS_HUGE = 4 ;//巨大车
  95. CAR_HEIGHT_STATUS_FAULT = 5 ;//故障车
  96. };
  97. //外门的状态
  98. enum Outside_door_status
  99. {
  100. OUTSIDE_DOOR_STATUS_UNKNOWN = 0 ;//未知
  101. OUTSIDE_DOOR_STATUS_OPEN = 1 ;//外门开到位
  102. OUTSIDE_DOOR_STATUS_CLOSE = 2 ;//外门关到位
  103. OUTSIDE_DOOR_STATUS_RUN = 3 ;//外门运行中
  104. OUTSIDE_DOOR_STATUS_FAULT = 4 ;//外门故障
  105. };
  106. //外门的控制
  107. enum Outside_door_control
  108. {
  109. OUTSIDE_DOOR_CONTROL_UNKNOWN = 0 ;//未知
  110. OUTSIDE_DOOR_CONTROL_OPEN = 1 ;//外门开
  111. OUTSIDE_DOOR_CONTROL_CLOSE = 2 ;//外门关
  112. };
  113. //流程状态
  114. enum Process_status
  115. {
  116. PROCESS_STATUS_UNKNOWN = 0;//未知
  117. PROCESS_STATUS_FULL_AUTO = 1;//全自动,
  118. PROCESS_STATUS_MANUAL = 2;//手动
  119. PROCESS_STATUS_AUTO_CLOSE = 3;//半自动关门
  120. PROCESS_STATUS_AUTO_OPEN = 4;//半自动开门
  121. PROCESS_STATUS_TO_READY = 5;//切换到待机
  122. PROCESS_STATUS_RESET = 7;//重启
  123. PROCESS_STATUS_STOP = 8;//急停
  124. PROCESS_STATUS_FAULT = 9;//故障
  125. //自动模式的步骤
  126. PROCESS_STATUS_INLET_0 = 10 ;//入口待机, 等待门外地感触发。
  127. PROCESS_STATUS_INLET_1 = 11 ;//执行开门
  128. PROCESS_STATUS_INLET_2 = 12 ;//等待门开到位
  129. PROCESS_STATUS_INLET_3 = 13 ;//等待汽车进入
  130. PROCESS_STATUS_INLET_4 = 14 ;//停车完成,统计汽车经过门口的车高。
  131. PROCESS_STATUS_INLET_5 = 15 ;//等待终端关门,执行关门
  132. PROCESS_STATUS_INLET_6 = 16 ;//等待门关到位
  133. PROCESS_STATUS_INLET_7 = 17 ;//等待plc调度,或者终端重置
  134. PROCESS_STATUS_INLET_8 = 18 ;//未知
  135. PROCESS_STATUS_INLET_9 = 19 ;//未知
  136. PROCESS_STATUS_OUTLET_0 = 30 ;//出口待机,等待终端开门,执行开门
  137. PROCESS_STATUS_OUTLET_1 = 31 ;//等待门开到位
  138. PROCESS_STATUS_OUTLET_2 = 32 ;//等待门口的光电产生信号,表示汽车正从车库出去。汽车正在离开中。
  139. PROCESS_STATUS_OUTLET_3 = 33 ;//汽车离开后,延迟5秒关门,执行关门
  140. PROCESS_STATUS_OUTLET_4 = 34 ;//等待门关到位
  141. PROCESS_STATUS_OUTLET_5 = 35 ;//等待plc调度,或者终端重置
  142. PROCESS_STATUS_OUTLET_6 = 36 ;//未知
  143. PROCESS_STATUS_OUTLET_7 = 37 ;//未知
  144. PROCESS_STATUS_OUTLET_8 = 38 ;//未知
  145. PROCESS_STATUS_OUTLET_9 = 39 ;//未知
  146. };
  147. //单片机给终端
  148. message singlechip_data
  149. {
  150. required int32 TerminalID= 1; // 终端号(单片机号)
  151. required int32 DispatchDirection= 2; // 方向(1入口,2出口)
  152. required Process_status ProcessStatus= 3; //流程状态
  153. required InputDi InPutDi = 4; // 输入口
  154. required int32 ResetFlag = 5; //重置标志位
  155. required Process_control ProcessControl = 6; //流程控制
  156. required int32 InsideExistenceFlag = 7; //内部存在标志
  157. required Over_border_status OverBorderStatus = 8; //边界状态
  158. required Car_height_status CarHeightStatusCurrent = 9; //当前车高状态--斜角对射光电
  159. required Car_height_status CarHeightStatusPassing = 10; //车高状态--门口经过式光电
  160. required int32 StopFlag = 11; //停车标志位
  161. required Outside_door_status OutsideDoorStatus = 12; //外门状态
  162. required Outside_door_control OutsideDoorControl = 13; //外门控制
  163. required int32 DispatchFinishFlag = 14; //调度完成标志
  164. required int32 OutsideExistenceFlag = 15; //外部存在标志
  165. }
  166. //终端状态消息
  167. message terminal_status_msg
  168. {
  169. required Base_info base_info =1; //消息类型
  170. required int32 terminal_id=2; //终端号
  171. required singlechip_data singlechipData=3; //单片机的数据
  172. }