dispatch_communication.h 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. //
  2. // Created by huli on 2020/9/25.
  3. //
  4. #ifndef NNXX_TESTS_DISPATCH_COMMUNICATION_H
  5. #define NNXX_TESTS_DISPATCH_COMMUNICATION_H
  6. #include "../tool/singleton.h"
  7. #include "../snap7_communication/snap7_communication_base.h"
  8. class Dispatch_communication:public Singleton<Dispatch_communication>, public Snap7_communication_base
  9. {
  10. public:
  11. //snap7的通信参数路径
  12. #define SNAP7_COMMUNICATION_PARAMETER_PATH_A "snap7_communication_a.prototxt"
  13. #define SNAP7_COMMUNICATION_PARAMETER_PATH_B "snap7_communication_b.prototxt"
  14. #define SNAP7_COMMUNICATION_PARAMETER_PATH_C "snap7_communication_c.prototxt"
  15. #define SNAP7_COMMUNICATION_PARAMETER_PATH_A1 "snap7_communication_a1.prototxt"
  16. #define SNAP7_COMMUNICATION_PARAMETER_PATH_A2 "snap7_communication_a2.prototxt"
  17. #define SNAP7_COMMUNICATION_PARAMETER_PATH_A3 "snap7_communication_a3.prototxt"
  18. #define SNAP7_COMMUNICATION_PARAMETER_PATH_A4 "snap7_communication_a4.prototxt"
  19. #define SNAP7_COMMUNICATION_PARAMETER_PATH_B1 "snap7_communication_b1.prototxt"
  20. #define SNAP7_COMMUNICATION_PARAMETER_PATH_B2 "snap7_communication_b2.prototxt"
  21. #define SNAP7_COMMUNICATION_PARAMETER_PATH_B3 "snap7_communication_b3.prototxt"
  22. #define SNAP7_COMMUNICATION_PARAMETER_PATH_B4 "snap7_communication_b4.prototxt"
  23. #define SNAP7_COMMUNICATION_PARAMETER_PATH_B5 "snap7_communication_b5.prototxt"
  24. #define SNAP7_COMMUNICATION_PARAMETER_PATH_C1 "snap7_communication_c1.prototxt"
  25. #define SNAP7_COMMUNICATION_PARAMETER_PATH_C2 "snap7_communication_c2.prototxt"
  26. //发送db快的标记位, 保证先发数据再发唯一码
  27. enum Send_database_flag
  28. {
  29. E_SEND_UNKNOW = 0,
  30. E_SEND_DATA_START = 1, //开始发送数据
  31. E_SEND_DATA_END = 2, //结束发送数据
  32. E_SEND_KEY_START = 3, //开始发送唯一码
  33. E_SEND_KEY_END = 4, //结束发送唯一码
  34. };
  35. #pragma pack(push, 1) //struct按照1个byte对齐
  36. //抓车模块给plc发送请求消息的DB编号
  37. #define CATCHER_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_1 110
  38. #define CATCHER_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_2 120
  39. //抓车模块给plc发送请求消息的指令结构体
  40. struct Catcher_request_from_dispatch_to_plc_for_data
  41. {
  42. //指令信息
  43. unsigned char m_reserved50 = 0; //预留
  44. unsigned char m_reserved51_69[19] = {0}; //预留
  45. // 请求的目标坐标和动作
  46. float m_request_x = 0; //机器人坐标x轴,
  47. float m_request_y = 0; //机器人坐标y轴,
  48. float m_request_b = 0; //机器人坐标b轴, 旋转范围80~280
  49. float m_request_z = 0; //机器人坐标z轴,
  50. unsigned char m_request_clamp_motion = 0; //机器人夹车杆. 0=无动作,1=夹紧,2=松开
  51. unsigned char m_reserved87_89[3] = {0}; //预留
  52. float m_request_wheelbase = 0; //机器人抓车杆前后轮距.
  53. float m_request_d1 = 0; //机器人坐标d1轴, 机器人抓车杆纵向移动(前轮抓杆)
  54. float m_request_d2 = 0; //机器人坐标d2轴, 机器人抓车杆纵向移动(后轮抓杆)
  55. };
  56. //抓车模块给plc发送请求消息的指令结构体
  57. struct Catcher_request_from_dispatch_to_plc_for_key
  58. {
  59. //指令信息
  60. unsigned char m_request_key[50] = {0}; //指令key(任务唯一码), 作为通信标志位
  61. };
  62. //plc给抓车模块发送答复消息的DB编号
  63. #define CATCHER_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_1 111
  64. #define CATCHER_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_2 121
  65. //plc给抓车模块发送答复消息的指令结构体
  66. struct Catcher_response_from_plc_to_dispatch
  67. {
  68. //指令信息
  69. unsigned char m_respons_key[50] = {0}; //指令key(任务唯一码), 作为通信标志位
  70. unsigned char m_respons_status = 0; //指令完成状态, 机器人答复指令, 返回任务完成的情况
  71. unsigned char m_reserved51_69[19] = {0}; //预留
  72. //请求的目标坐标和动作
  73. float m_respons_x = 0; //机器人坐标x轴,
  74. float m_respons_y = 0; //机器人坐标y轴,
  75. float m_respons_b = 0; //机器人坐标b轴, 旋转范围80~280
  76. float m_respons_z = 0; //机器人坐标z轴,
  77. unsigned char m_respons_clamp_motion = 0; //机器人夹车杆. 0=无动作,1=夹紧,2=松开
  78. unsigned char m_reserved87_89[3] = {0}; //预留
  79. float m_respons_wheelbase = 0; //机器人抓车杆前后轮距.
  80. float m_respons_d1 = 0; //机器人坐标d1轴, 机器人抓车杆纵向移动(前轮抓杆)
  81. float m_respons_d2 = 0; //机器人坐标d2轴, 机器人抓车杆纵向移动(后轮抓杆)
  82. };
  83. //plc给抓车模块发送状态消息的DB编号
  84. #define CATCHER_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_1 113
  85. #define CATCHER_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_2 123
  86. //plc给抓车模块发送状态消息的指令结构体
  87. struct Catcher_status_from_plc_to_dispatch
  88. {
  89. unsigned char m_heartbeat = 0; //心跳位, 0-255循环
  90. unsigned char m_safe_status = 0; //设备的安全状态
  91. unsigned char m_work_status = 0; //机器人的硬件设备状态
  92. unsigned char m_actual_load_status = 0; //机器人的负载状态, 机器人上面是否有车.
  93. unsigned char m_reserved4_37[34] = {0}; //预留
  94. float m_actual_x = 0; //机器人坐标x轴,
  95. float m_actual_y = 0; //机器人坐标y轴,
  96. float m_actual_b = 0; //机器人坐标b轴, 旋转范围80~280
  97. float m_actual_z = 0; //机器人坐标z轴,
  98. float m_actual_d1 = 0; //机器人坐标d1轴, 机器人抓车杆纵向移动(前轮抓杆)
  99. float m_actual_d2 = 0; //机器人坐标d2轴, 机器人抓车杆纵向移动(后轮抓杆)
  100. unsigned char m_actual_clamp_motion1 = 0; //机器人夹车杆. 0=无动作,1=夹紧,2=松开
  101. unsigned char m_actual_clamp_motion2 = 0; //机器人夹车杆. 0=无动作,1=夹紧,2=松开
  102. unsigned char m_actual_clamp_motion3 = 0; //机器人夹车杆. 0=无动作,1=夹紧,2=松开
  103. unsigned char m_actual_clamp_motion4 = 0; //机器人夹车杆. 0=无动作,1=夹紧,2=松开
  104. unsigned char m_reserved66_99[34] = {0}; //预留
  105. //故障信息
  106. unsigned char m_actual_error_code[50] = {0}; //搬运器错误码
  107. unsigned char m_actual_warning_code[50] = {0}; //升降机错误码
  108. unsigned char m_actual_error_description[256] = {0}; //升降机错误描述
  109. };
  110. //搬运器给plc发送请求消息的DB编号
  111. #define CARRIER_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_1 200
  112. #define CARRIER_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_2 270
  113. #define CARRIER_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_3 230
  114. //搬运器给plc发送请求消息的指令结构体
  115. struct Carrier_request_from_dispatch_to_plc_for_data
  116. {
  117. //指令信息
  118. unsigned char m_reserved50 = 0; //预留
  119. unsigned char m_reserved51_71[21] = {0}; //预留
  120. //请求的目标坐标和动作
  121. float m_request_x; //搬运器坐标x轴, 中跑车控制横向移动
  122. float m_request_y; //搬运器坐标y轴, 小跑车控制纵向移动
  123. float m_request_z; //搬运器坐标z轴, 电梯控制上下移动
  124. float m_request_y1; //搬运器坐标y1轴, 小跑车控制纵向移动(前轮抓杆)
  125. float m_request_y2; //搬运器坐标y2轴, 小跑车控制纵向移动(后轮抓杆)
  126. unsigned char m_request_clamp_motion; //小跑车夹车杆. 0=无动作,1=夹紧,2=松开
  127. unsigned char m_request_joint_motion_x; //电梯与X轴的横向轨道对接,0=无动作,1=进行对接, 2=松开对接
  128. unsigned char m_request_joint_motion_y; //小跑车与Y轴的横向轨道对接,0=无动作,1=进行对接, 2=松开对接
  129. unsigned char m_reserved95 = 0; //预留
  130. int m_request_space_id; //搬运器空间位置的id.
  131. int m_request_floor_id; //搬运器楼层位置的id.
  132. float m_request_wheelbase; //搬运器小跑车的抓车杆前后轮距.
  133. };
  134. //搬运器给plc发送请求消息的指令结构体
  135. struct Carrier_request_from_dispatch_to_plc_for_key
  136. {
  137. //指令信息
  138. unsigned char m_request_key[50] = {0}; //指令key(任务唯一码), 作为通信标志位
  139. };
  140. //plc给搬运器发送答复消息的DB编号
  141. #define CARRIER_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_1 201
  142. #define CARRIER_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_2 271
  143. #define CARRIER_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_3 231
  144. //plc给搬运器发送答复消息的指令结构体
  145. struct Carrier_response_from_plc_to_dispatch
  146. {
  147. //指令信息
  148. unsigned char m_respons_key[50] = {0}; //指令key(任务唯一码), 作为通信标志位
  149. unsigned char m_respons_status = 0; //指令完成状态, 机器人答复指令, 返回任务完成的情况
  150. unsigned char m_reserved51_71[21] = {0}; //预留
  151. //请求的目标坐标和动作
  152. float m_respons_x; //搬运器坐标x轴, 中跑车控制横向移动
  153. float m_respons_y; //搬运器坐标y轴, 小跑车控制纵向移动
  154. float m_respons_z; //搬运器坐标z轴, 电梯控制上下移动
  155. float m_respons_y1; //搬运器坐标y1轴, 小跑车控制纵向移动(前轮抓杆)
  156. float m_respons_y2; //搬运器坐标y2轴, 小跑车控制纵向移动(后轮抓杆)
  157. unsigned char m_respons_clamp_motion; //小跑车夹车杆. 0=无动作,1=夹紧,2=松开
  158. unsigned char m_respons_joint_motion_x; //电梯与X轴的横向轨道对接,0=无动作,1=进行对接, 2=松开对接
  159. unsigned char m_respons_joint_motion_y; //小跑车与Y轴的横向轨道对接,0=无动作,1=进行对接, 2=松开对接
  160. unsigned char m_reserved95 = 0; //预留
  161. int m_respons_space_id; //搬运器空间位置的id.
  162. int m_respons_floor_id; //搬运器楼层位置的id.
  163. float m_respons_wheelbase; //搬运器小跑车的抓车杆前后轮距.
  164. };
  165. //plc给搬运器发送状态消息的DB编号
  166. #define CARRIER_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_1 203
  167. #define CARRIER_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_2 273
  168. #define CARRIER_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_3 233
  169. //plc给搬运器发送状态消息的指令结构体
  170. struct Carrier_status_from_plc_to_dispatch
  171. {
  172. unsigned char m_heartbeat = 0; //心跳位, 0-255循环
  173. unsigned char m_safe_status = 0; //设备的安全状态
  174. unsigned char m_work_status = 0; //搬运器的硬件设备状态
  175. unsigned char m_actual_load_status = 0; //搬运器的负载状态, 小跑车上面是否有车.
  176. unsigned char m_reserved4_37[34] = {0}; //预留
  177. float m_actual_x = 0; //搬运器坐标x轴,
  178. float m_actual_y = 0; //搬运器坐标y轴,
  179. float m_actual_z = 0; //搬运器坐标z轴,
  180. float m_actual_y1 = 0; //搬运器坐标y1轴, 小跑车控制纵向移动(前轮抓杆)
  181. float m_actual_y2 = 0; //搬运器坐标y2轴, 小跑车控制纵向移动(前轮抓杆)
  182. unsigned char m_actual_clamp_motion1 = 0; //小跑车夹车杆. 0=无动作,1=夹紧,2=松开
  183. unsigned char m_actual_clamp_motion2 = 0; //小跑车夹车杆. 0=无动作,1=夹紧,2=松开
  184. unsigned char m_actual_small_sports_car_motion = 0; //小跑车的位置,是否在中跑车上面, 0=无动作,1=出发到位,2=返回到位
  185. unsigned char m_actual_joint_motion_x1 = 0; //电梯与X轴的横向轨道对接,0=无动作,1=伸出到位,2=收回到位
  186. unsigned char m_actual_joint_motion_x2 = 0; //电梯与X轴的横向轨道对接,0=无动作,1=伸出到位,2=收回到位
  187. unsigned char m_reserved63_101[39] = {0}; //预留
  188. //故障信息
  189. unsigned char m_actual_error_code[50] = {0}; //搬运器错误码
  190. unsigned char m_actual_warning_code[50] = {0}; //升降机错误码
  191. unsigned char m_actual_error_description[256] = {0}; //升降机错误描述
  192. };
  193. //通道口给plc发送请求消息的DB编号
  194. #define PASSAGEWAY_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_0 300
  195. #define PASSAGEWAY_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_1 310
  196. #define PASSAGEWAY_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_2 320
  197. #define PASSAGEWAY_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_3 330
  198. #define PASSAGEWAY_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_4 340
  199. #define PASSAGEWAY_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_5 350
  200. #define PASSAGEWAY_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_6 360
  201. #define PASSAGEWAY_REQUEST_FROM_DISPATCH_TO_PLC_DBNUMBER_7 370
  202. //通道口给plc发送请求消息的指令结构体
  203. struct Passageway_request_from_dispatch_to_plc_for_data
  204. {
  205. //指令信息
  206. unsigned char m_reserved50 = 0; //预留
  207. unsigned char m_reserved51_69[19] = {0}; //预留
  208. // 请求的目标坐标和动作
  209. unsigned char m_request_inside_door_motion = 0; //通道口 内门动作
  210. unsigned char m_request_outside_door_motion = 0; //通道口 外门动作
  211. unsigned char m_request_turntable_direction = 0; //通道口 转台方向
  212. };
  213. //通道口给plc发送请求消息的指令结构体
  214. struct Passageway_request_from_dispatch_to_plc_for_key
  215. {
  216. //指令信息
  217. unsigned char m_request_key[50] = {0}; //指令key(任务唯一码), 作为通信标志位
  218. };
  219. //plc给通道口发送答复消息的DB编号
  220. #define PASSAGEWAY_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_0 301
  221. #define PASSAGEWAY_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_1 311
  222. #define PASSAGEWAY_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_2 321
  223. #define PASSAGEWAY_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_3 331
  224. #define PASSAGEWAY_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_4 341
  225. #define PASSAGEWAY_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_5 351
  226. #define PASSAGEWAY_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_6 361
  227. #define PASSAGEWAY_RESPONSE_FROM_PLC_TO_DISPATCH_DBNUMBER_7 371
  228. //plc给通道口发送答复消息的指令结构体
  229. struct Passageway_response_from_plc_to_dispatch
  230. {
  231. //指令信息
  232. unsigned char m_respons_key[50] = {0}; //指令key(任务唯一码), 作为通信标志位
  233. unsigned char m_respons_status = 0; //指令完成状态, 机器人答复指令, 返回任务完成的情况
  234. unsigned char m_reserved51_69[19] = {0}; //预留
  235. unsigned char m_respons_inside_door_motion = 0; //通道口 内门动作
  236. unsigned char m_respons_outside_door_motion = 0; //通道口 外门动作
  237. unsigned char m_respons_turntable_direction = 0; //通道口 转台方向
  238. };
  239. //plc给通道口发送状态消息的DB编号
  240. #define PASSAGEWAY_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_0 303
  241. #define PASSAGEWAY_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_1 313
  242. #define PASSAGEWAY_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_2 323
  243. #define PASSAGEWAY_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_3 333
  244. #define PASSAGEWAY_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_4 343
  245. #define PASSAGEWAY_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_5 353
  246. #define PASSAGEWAY_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_6 363
  247. #define PASSAGEWAY_STATUS_FROM_PLC_TO_DISPATCH_DBNUMBER_7 373
  248. //plc给通道口发送状态消息的指令结构体
  249. struct Passageway_status_from_plc_to_dispatch
  250. {
  251. unsigned char m_heartbeat = 0; //心跳位, 0-255循环
  252. unsigned char m_safe_status = 0; //设备的安全状态
  253. unsigned char m_sensor_status1 = 0; //设备的传感器状态1
  254. unsigned char m_sensor_status2 = 0; //设备的传感器状态2
  255. unsigned char m_reserved4_35[32] = {0}; //预留
  256. unsigned char m_actual_turntable_direction; //通道口 转台方向
  257. unsigned char m_reserved37 = 0; //预留
  258. //故障信息
  259. unsigned char m_actual_error_code[50] = {0}; //通道口错误码
  260. unsigned char m_actual_warning_code[50] = {0}; //升降机错误码
  261. unsigned char m_actual_error_description[256] = {0}; //升降机错误描述
  262. };
  263. //调度管理给plc发送调度指令 的DB编号
  264. #define DISPATCH_REQUEST_FROM_MANAGER_TO_PLC_DBNUMBER_0 9000
  265. //调度管理给plc发送调度指令 的结构体
  266. struct Dispatch_request_from_manager_to_plc_for_data
  267. {
  268. //指令信息
  269. unsigned short m_request_status = 0; //指令完成状态, 机器人答复指令, 返回任务完成的情况
  270. float m_request_working_total_time; //搬运总时间(秒)
  271. float m_request_working_remaining_time; //剩余时间(秒)
  272. unsigned char m_reserved60_73[14] = {0}; //预留
  273. // 调度指令的起点,终点,方向
  274. unsigned short m_request_dispatch_motion_direction = 0; //调度方向 0=未知,1=存车,2=取车
  275. unsigned char m_reserved75_79[4] = {0}; //预留
  276. unsigned int m_request_passageway_id = 0; //出入口id 6个入口和6个出口
  277. unsigned char m_request_passageway_direction = 0; //出入口方向 0=未知,1=入口,2=出口
  278. unsigned char m_reserved85 = 0; //预留
  279. unsigned short m_request_car_height_level = 0; //车高 0=无车 1=1480 2=1500 3=2050 4=超高车
  280. unsigned char m_reserved88_89[2] = {0}; //预留
  281. unsigned int m_request_parkingspace_index_id = 0; //楼上车位索引id 1~180(3*6*13)
  282. unsigned int m_request_parkingspace_unit_id = 0; //楼上车位单元号 1~3
  283. unsigned int m_request_parkingspace_label_id = 0; //楼上车位标签号 1~78
  284. unsigned int m_request_parkingspace_floor_id = 0; //楼上车位楼层号 2~11
  285. unsigned int m_request_parkingspace_room_id = 0; //楼上车位房间号 1~6
  286. unsigned char m_request_parkingspace_direction = 0; //楼上车位方向 0=未知,1=朝南,2=朝北
  287. unsigned char m_reserved111 = 0; //预留
  288. //汽车的定位信息(地面雷达)
  289. float m_request_car_center_x = 0; //整车的中心点x值, 四轮的中心, 单位:米 m
  290. float m_request_car_center_y = 0; //整车的中心点y值, 四轮的中心, 单位:米 m
  291. float m_request_car_angle = 0; //整车的车身旋转角, 单位:度 (-90~90)
  292. float m_request_car_front_theta = 0; //整车的前轮的旋转角, 单位:度 (-90~90)
  293. float m_request_car_length = 0; //整车的长度, 用于规避碰撞, 单位:米 m
  294. float m_request_car_width = 0; //整车的宽度, 用于规避碰撞, 单位:米 m
  295. float m_request_car_height = 0; //整车的高度, 用于规避碰撞, 单位:米 m
  296. float m_request_car_wheel_base = 0; //整车的轮距, 前后轮的距离, 用于机器人或agv的抓车, 单位:米 m
  297. float m_request_car_wheel_width = 0; //整车的轮距, 左右轮的距离, 用于机器人或agv的抓车, 单位:米 m
  298. unsigned char m_request_car_license[20] = {0}; //车牌号(汽车唯一标示) 例如: 鄂A12345
  299. /* unsigned char m_reserved168_187[20] = {0}; //预留
  300. unsigned char m_request_car_type = 0; //0=未知,1=小车,2=中车,3=大车 ..188
  301. unsigned char m_reserved189_191[3] = {0}; //预留
  302. float m_request_uniformed_car_x = 0; //转角复位后,车辆中心点x
  303. float m_request_uniformed_car_y = 0; //转角复位后,车辆中心点y
  304. unsigned char m_reserved200_209[10] = {0}; //预留
  305. //防撞雷达 ..210
  306. unsigned char m_request_anticollision_lidar_flag = 0; //汽车是否停到正确的位置, 防撞雷达 预留, 楚天暂时不用,0=未知,1=位置正常,2=位置异常
  307. unsigned char m_reserved211_215[5] = {0}; //预留
  308. //轮距雷达 ..216
  309. float m_request_car_wheel_base_exact_value = 0; //汽车前后轮距,轮距雷达的精确值 预留, 楚天暂时不用,单位:米 m
  310. unsigned char m_reserved220_231[12] = {0}; //预留
  311. */
  312. };
  313. //调度管理给plc发送调度指令 的结构体
  314. struct Dispatch_request_from_manager_to_plc_for_key
  315. {
  316. //指令信息
  317. unsigned char m_request_key[50] = {0}; //指令key(任务唯一码), 作为通信标志位
  318. };
  319. //plc给调度管理发送调度答复 的DB编号
  320. #define DISPATCH_RESPONSE_FROM_PLC_TO_MANAGER_DBNUMBER_0 9001
  321. //plc给调度管理发送调度答复 的结构体
  322. struct Dispatch_response_from_plc_to_manager
  323. {
  324. unsigned char m_response_key[50] = {0}; //指令key(任务唯一码), 作为通信标志位
  325. //指令信息
  326. unsigned short m_response_status = 0; //指令完成状态, 机器人答复指令, 返回任务完成的情况
  327. float m_response_working_total_time; //搬运总时间(秒)
  328. float m_response_working_remaining_time; //剩余时间(秒)
  329. unsigned char m_reserved60_73[14] = {0}; //预留
  330. // 调度指令的起点,终点,方向
  331. unsigned short m_response_dispatch_motion_direction = 0; //调度方向 0=未知,1=存车,2=取车
  332. unsigned char m_reserved75_79[4] = {0}; //预留
  333. unsigned int m_response_passageway_id = 0; //出入口id 6个入口和6个出口
  334. unsigned char m_response_passageway_direction = 0; //出入口方向 0=未知,1=入口,2=出口
  335. unsigned char m_reserved85 = 0; //预留
  336. unsigned short m_response_car_height_level = 0; //车高 0=无车 1=1480 2=1500 3=2050 4=超高车
  337. unsigned char m_reserved88_89[2] = {0}; //预留
  338. unsigned int m_response_parkingspace_index_id = 0; //楼上车位索引id 1~180(3*6*13)
  339. unsigned int m_response_parkingspace_unit_id = 0; //楼上车位单元号 1~3
  340. unsigned int m_response_parkingspace_label_id = 0; //楼上车位标签号 1~78
  341. unsigned int m_response_parkingspace_floor_id = 0; //楼上车位楼层号 2~11
  342. unsigned int m_response_parkingspace_room_id = 0; //楼上车位房间号 1~6
  343. unsigned char m_response_parkingspace_direction = 0; //楼上车位方向 0=未知,1=朝南,2=朝北
  344. unsigned char m_reserved111 = 0; //预留
  345. //汽车的定位信息(地面雷达)
  346. float m_response_car_center_x = 0; //整车的中心点x值, 四轮的中心, 单位:米 m
  347. float m_response_car_center_y = 0; //整车的中心点y值, 四轮的中心, 单位:米 m
  348. float m_response_car_angle = 0; //整车的车身旋转角, 单位:度 (-90~90)
  349. float m_response_car_front_theta = 0; //整车的前轮的旋转角, 单位:度 (-90~90)
  350. float m_response_car_length = 0; //整车的长度, 用于规避碰撞, 单位:米 m
  351. float m_response_car_width = 0; //整车的宽度, 用于规避碰撞, 单位:米 m
  352. float m_response_car_height = 0; //整车的高度, 用于规避碰撞, 单位:米 m
  353. float m_response_car_wheel_base = 0; //整车的轮距, 前后轮的距离, 用于机器人或agv的抓车, 单位:米 m
  354. float m_response_car_wheel_width = 0; //整车的轮距, 左右轮的距离, 用于机器人或agv的抓车, 单位:米 m
  355. unsigned char m_response_car_license[20] = {0}; //车牌号(汽车唯一标示) 例如: 鄂A12345
  356. /* unsigned char m_reserved168_187[20] = {0}; //预留
  357. unsigned char m_response_car_type = 0; //0=未知,1=小车,2=中车,3=大车 ..188
  358. unsigned char m_reserved189_191[3] = {0}; //预留
  359. float m_response_uniformed_car_x = 0; //转角复位后,车辆中心点x
  360. float m_response_uniformed_car_y = 0; //转角复位后,车辆中心点y
  361. unsigned char m_reserved200_209[10] = {0}; //预留
  362. //防撞雷达 ..210
  363. unsigned char m_response_anticollision_lidar_flag = 0; //汽车是否停到正确的位置, 防撞雷达 预留, 楚天暂时不用,0=未知,1=位置正常,2=位置异常
  364. unsigned char m_reserved211_215[5] = {0}; //预留
  365. //轮距雷达 ..216
  366. float m_response_car_wheel_base_exact_value = 0; //汽车前后轮距,轮距雷达的精确值 预留, 楚天暂时不用,单位:米 m
  367. unsigned char m_reserved220_231[12] = {0}; //预留
  368. */
  369. };
  370. #ifdef CHUTIAN_PROJECT_PROJECT
  371. //调度管理的的状态信息 的DB编号
  372. #define DISPATCH_PLC_STATUS_FROM_MANAGER_TO_PLC_DBNUMBER_0 9002
  373. //调度管理给plc发送状态消息的指令结构体
  374. struct Dispatch_plc_status_from_manager_to_plc
  375. {
  376. unsigned char m_dispatch_heartbeat = 0; //心跳位, 0-255循环
  377. };
  378. //plc的状态信息 的DB编号
  379. #define DISPATCH_PLC_STATUS_FROM_PLC_TO_MANAGER_DBNUMBER_0 9003
  380. //plc给通道口发送状态消息的指令结构体
  381. struct Dispatch_plc_status_from_plc_to_manager
  382. {
  383. unsigned char m_plc_heartbeat = 0; //心跳位, 0-255循环
  384. unsigned char m_plc_status_info = 0; //plc状态的集合
  385. //0 bit, 手动模式
  386. //1 bit, 自动模式
  387. //2 bit, 自动运行中
  388. //3 bit, 复位
  389. //4 bit, 1号口可以进车
  390. //5 bit, 2号口可以进车
  391. //6 bit, 预留
  392. //7 bit, 预留
  393. unsigned char m_reserved2_37[36] = {0}; //预留 36个
  394. float m_turnplate_angle_min1 = 0; //1号口转盘最小值
  395. float m_turnplate_angle_max1 = 0; //1号口转盘最大值
  396. float m_turnplate_angle_min2 = 0; //2号口转盘最小值
  397. float m_turnplate_angle_max2 = 0; //2号口转盘最大值
  398. };
  399. #endif // CHUTIAN_PROJECT_PROJECT
  400. #ifdef SHANGGUJIE_PROJECT_PROJECT
  401. //调度管理的的状态信息 的DB编号
  402. #define DISPATCH_PLC_STATUS_FROM_MANAGER_TO_PLC_DBNUMBER_0 9002
  403. //调度管理给plc发送状态消息 的结构体
  404. struct Dispatch_plc_status_from_manager_to_plc
  405. {
  406. unsigned short m_dispatch_heartbeat = 0; //心跳位, 0-255循环
  407. };
  408. //plc的状态信息 的DB编号
  409. #define DISPATCH_PLC_STATUS_FROM_PLC_TO_MANAGER_DBNUMBER_0 9003
  410. //plc出入口状态结构体
  411. struct Dispatch_plc_passway_status
  412. {
  413. unsigned short m_car_height = 0; //车高 0=无车 1=1480 2=1500 3=2050 4=超高车
  414. unsigned short m_outside_door_status = 0; //外门状态 0=无状态 1=开到位 2=关到位
  415. unsigned short m_inside_door_status = 0; //内门状态 0=无状态 1=开到位 2=关到位
  416. unsigned short m_comb_body_status = 0; //梳体状态 0=无状态 1=上到位 2=下到位
  417. float m_turnplate_angle_min = 0; //转盘角度最小值, 负值, 例如 -5度
  418. float m_turnplate_angle_max = 0; //转盘角度最大值, 正值, 例如 +5度
  419. unsigned char m_sensor_1 = 0; //传感器状态的集合1
  420. //0 bit, 地感 0=无车 1=有车
  421. //1 bit, 移动检测 0=运动 1=静止
  422. //2 bit, 动态超限 0=遮挡 1=正常
  423. //3 bit, 后超界 0=遮挡 1=正常
  424. //4 bit, 前超界 0=遮挡 1=正常
  425. //5 bit, 左超界 0=遮挡 1=正常
  426. //6 bit, 右超界 0=遮挡 1=正常
  427. //7 bit, 车高1480 0=遮挡 1=正常
  428. unsigned char m_sensor_2 = 0; //传感器状态的集合1
  429. //0 bit, 车高1500 0=遮挡 1=正常
  430. //1 bit, 车高2050 0=遮挡 1=正常
  431. //2 bit, 有车检测 0=无车 1=有车
  432. //3 bit, 车轮1检测 0=无车 1=有车
  433. //4 bit, 车轮2检测 0=无车 1=有车
  434. //5 bit, 预留
  435. //6 bit, 预留
  436. //7 bit, 预留
  437. unsigned char m_reserved28_29[2] = {0}; //预留 2个
  438. };
  439. //plc给调度管理发送状态消息 的结构体
  440. struct Dispatch_plc_status_from_plc_to_manager
  441. {
  442. unsigned short m_plc_heartbeat = 0; //心跳位, 0-255循环
  443. unsigned char m_plc_status_info = 0; //plc状态的集合
  444. //0 bit, 手动模式, 维修模式
  445. //1 bit, 自动模式
  446. //2 bit, 自动运行中
  447. //3 bit, 复位
  448. //4 bit, 入口1 可进车
  449. //5 bit, 入口2 可进车
  450. //6 bit, 出口3 可出车
  451. //7 bit, 出口4 可出车
  452. unsigned char m_reserved3 = 0; //预留 1个
  453. unsigned short m_plc_carrier_status; //搬运器状态 0=故障 1=存车 2=取车 3=空闲 4=维护
  454. unsigned char m_reserved6_9[4] = {0}; //预留 4个
  455. //plc出入口状态结构体 数组下标0~1是入口, 数组下标2~3是出口
  456. Dispatch_plc_passway_status m_passway_vector[4]; //plc出入口状态结构体
  457. };
  458. #endif // SHANGGUJIE_PROJECT_PROJECT
  459. //地面雷达给plc
  460. #define GROUND_LIDAR_RESPONSE_FROM_MANAGER_TO_PLC_DBNUMBER_0 9004
  461. #define GROUND_LIDAR_RESPONSE_FROM_MANAGER_TO_PLC_DBNUMBER_1 9014
  462. struct Ground_lidar_response_from_manager_to_plc_for_key
  463. {
  464. unsigned char m_response_heartbeat = 0; //心跳位, 0-255循环
  465. unsigned char m_response_communication_mode = 0; //通信模式 0 = 未知, 1=自动循环模式,2=手动刷新模式
  466. unsigned char m_response_refresh_command = 0; //刷新指令 0-255任意数字,与上一次不同即可
  467. unsigned char m_response_data_validity = 0; //数据有效性, 0 = 未知, 1 = 有效, 2 = 无效
  468. };
  469. struct Ground_lidar_response_from_manager_to_plc_for_data
  470. {
  471. //汽车的定位信息(地面雷达)
  472. float m_response_car_center_x = 0; //整车的中心点x值, 四轮的中心, 单位:米 m
  473. float m_response_car_center_y = 0; //整车的中心点y值, 四轮的中心, 单位:米 m
  474. float m_response_car_angle = 0; //整车的车身旋转角, 单位:度 (-90~90)
  475. float m_response_car_front_theta = 0; //整车的前轮的旋转角, 单位:度 (-90~90)
  476. float m_response_car_length = 0; //整车的长度, 用于规避碰撞, 单位:米 m
  477. float m_response_car_width = 0; //整车的宽度, 用于规避碰撞, 单位:米 m
  478. float m_response_car_height = 0; //整车的高度, 用于规避碰撞, 单位:米 m
  479. float m_response_car_wheel_base = 0; //整车的轮距, 前后轮的距离, 用于机器人或agv的抓车, 单位:米 m
  480. float m_response_car_wheel_width = 0; //整车的轮距, 左右轮的距离, 用于机器人或agv的抓车, 单位:米 m
  481. float m_response_uniformed_car_x = 0; //转角复位后,车辆中心点x
  482. float m_response_uniformed_car_y = 0; //转角复位后,车辆中心点y
  483. unsigned char m_response_locate_correct = 0; //数据是否有效, 0=无效, 1=有效
  484. unsigned char m_response_ground_status = 0; ////0 ok 1,nothing 2,noise 3,border
  485. unsigned char m_reserved46_47[2] = {0}; //预留
  486. unsigned char m_response_heartbeat = 0; //心跳位, 0-255循环
  487. unsigned char m_response_communication_mode = 0; //通信模式 0 = 未知, 1=自动循环模式,2=手动刷新模式
  488. unsigned char m_response_refresh_command = 0; //刷新指令 0-255任意数字,与上一次不同即可
  489. unsigned char m_response_data_validity = 0; //数据有效性, 0 = 未知, 1 = 有效, 2 = 无效
  490. int m_response_border_status = 0; //超界状态描述, 按位运算
  491. };
  492. //plc给地面雷达
  493. #define GROUND_LIDAR_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_0 9005
  494. #define GROUND_LIDAR_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_1 9015
  495. struct Ground_lidar_request_from_plc_to_manager
  496. {
  497. unsigned char m_request_heartbeat = 0; //心跳位, 0-255循环
  498. unsigned char m_request_communication_mode = 0; //通信模式 0 = 未知, 1=自动循环模式,2=手动刷新模式
  499. unsigned char m_request_refresh_command = 0; //刷新指令 0-255任意数字,与上一次不同即可
  500. unsigned char m_request_data_validity = 0; //数据有效性, 0 = 未知, 1 = 有效, 2 = 无效
  501. };
  502. //防撞雷达给plc
  503. #define ANTICOLLISION_LIDAR_RESPONSE_FROM_MANAGER_TO_PLC_DBNUMBER_0 9006
  504. struct Anticollision_lidar_response_from_manager_to_plc_for_key
  505. {
  506. unsigned char m_response_heartbeat = 0; //心跳位, 0-255循环
  507. unsigned char m_response_communication_mode = 0; //通信模式 0 = 未知, 1=自动循环模式,2=手动刷新模式
  508. unsigned char m_response_refresh_command = 0; //刷新指令 0-255任意数字,与上一次不同即可
  509. unsigned char m_response_data_validity = 0; //数据有效性, 0 = 未知, 1 = 有效, 2 = 无效
  510. };
  511. struct Anticollision_lidar_response_from_manager_to_plc_for_data
  512. {
  513. unsigned char m_response_anticollision_lidar_flag = 0; //汽车是否停到正确的位置, 防撞雷达 预留, 楚天暂时不用,0=未知,1=位置正常,2=位置异常
  514. unsigned char m_reserved5_7[3] = {0}; //预留
  515. float m_response_offset_x = 0; //汽车x轴的偏移量, -1.0~+1.0, 单位米
  516. float m_response_offset_angle = 0; //汽车角度的偏移量, -7~+7, 单位度
  517. };
  518. //plc给防撞雷达
  519. #define ANTICOLLISION_LIDAR_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_0 9007
  520. struct Anticollision_lidar_request_from_plc_to_manager
  521. {
  522. unsigned char m_request_heartbeat = 0; //心跳位, 0-255循环
  523. unsigned char m_request_communication_mode = 0; //通信模式 0 = 未知, 1=自动循环模式,2=手动刷新模式
  524. unsigned char m_request_refresh_command = 0; //刷新指令 0-255任意数字,与上一次不同即可
  525. unsigned char m_request_data_validity = 0; //数据有效性, 0 = 未知, 1 = 有效, 2 = 无效
  526. };
  527. //单片机给plc
  528. #define SINGLECHIP_RESPONSE_FROM_MANAGER_TO_PLC_DBNUMBER_0 9008
  529. #define SINGLECHIP_RESPONSE_FROM_MANAGER_TO_PLC_DBNUMBER_1 9018
  530. #define SINGLECHIP_RESPONSE_FROM_MANAGER_TO_PLC_DBNUMBER_2 9028
  531. #define SINGLECHIP_RESPONSE_FROM_MANAGER_TO_PLC_DBNUMBER_3 9038
  532. struct Singlechip_response_from_manager_to_plc
  533. {
  534. unsigned char m_process_status; //流程状态
  535. unsigned char m_process_control; //流程控制
  536. unsigned char m_over_border_status; //超界状态, 0:未知, 1:正常, 2:前超界, 3:后超界, 4:左超界, 5:右超界
  537. unsigned char m_car_height_status_current; //车高状态,当前持续的状态, 0:未知, 1:小车, 2:中车, 3:大车, 4:巨大车, 5:故障车
  538. unsigned char m_car_height_status_passing; //车高状态,经过外门口的状态, 0:未知, 1:小车, 2:中车, 3:大车, 4:巨大车, 5:故障车
  539. unsigned char m_outside_door_status; //外门的状态, 0:未知, 1:外门开到位, 2:外门关到位, 3:外门运行中, 4:外门故障
  540. unsigned char m_outside_door_control; //外门的控制, 0:未知, 1:外门开, 2:外门关,
  541. unsigned char m_dispatch_finish_flag; //调度完成标志位,true表示允许终端放下一辆车进入入口
  542. unsigned char m_inside_existence_flag; //门内是否存在汽车的标志位, true表示有车
  543. unsigned char m_outside_existence_flag; //门外是否存在汽车的标志位, 门外地感触发停车流程, true表示有车
  544. unsigned char m_reset_flag; //重启标志, true:控制看门狗重启
  545. unsigned char m_stop_flag; //急停标志,true:把控制口全部写0,并关闭流程。
  546. unsigned int m_error_code; //错误码
  547. unsigned char m_reserved16_35[20] = {0}; //预留
  548. unsigned char m_gpio_input[16] = {0}; //gpio输入口原始数据,
  549. unsigned char m_gpio_output[8] = {0}; //gpio输出口原始数据,
  550. unsigned char m_reserved60_79[20] = {0}; //预留
  551. unsigned char m_response_heartbeat = 0; //心跳位, 0-255循环
  552. unsigned char m_response_communication_mode = 0; //通信模式 0 = 未知, 1=自动循环模式,2=手动刷新模式
  553. unsigned char m_response_refresh_command = 0; //刷新指令 0-255任意数字,与上一次不同即可
  554. unsigned char m_response_data_validity = 0; //数据有效性, 0 = 未知, 1 = 有效, 2 = 无效
  555. };
  556. //plc给单片机
  557. #define SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_0 9009
  558. #define SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_1 9019
  559. #define SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_2 9029
  560. #define SINGLECHIP_REQUEST_FROM_PLC_TO_MANAGER_DBNUMBER_3 9039
  561. struct Singlechip_request_from_plc_to_manager
  562. {
  563. unsigned char m_request_heartbeat = 0; //心跳位, 0-255循环
  564. unsigned char m_request_communication_mode = 0; //通信模式 0 = 未知, 1=自动循环模式,2=手动刷新模式
  565. unsigned char m_request_refresh_command = 0; //刷新指令 0-255任意数字,与上一次不同即可
  566. unsigned char m_request_data_validity = 0; //数据有效性, 0 = 未知, 1 = 有效, 2 = 无效
  567. unsigned char m_request_insidedoor_status = 0; //内门状态, 0:未知, 1:外门开到位, 2:外门关到位,
  568. unsigned char m_request_outsidedoor_control = 0; //外门控制, 0:必须关门, 1:可以开门, (触发地感后可以开门)
  569. };
  570. //plc数据储存
  571. #define DATA_STORAGE_FROM_PLC_TO_MANAGER_DBNUMBER_0 9500
  572. #define DATA_STORAGE_PLC_DATA_LENGTH 60
  573. struct Data_storage_from_plc_to_manager
  574. {
  575. float m_plc_data[DATA_STORAGE_PLC_DATA_LENGTH];
  576. float m_heartbeat;
  577. };
  578. #pragma pack(pop) //取消对齐
  579. // 子类必须把父类设定为友元函数,这样父类才能使用子类的私有构造函数。
  580. friend class Singleton<Dispatch_communication>;
  581. private:
  582. // 父类的构造函数必须保护,子类的构造函数必须私有。
  583. Dispatch_communication();
  584. public:
  585. //必须关闭拷贝构造和赋值构造,只能通过 get_instance 函数来进行操作唯一的实例。
  586. Dispatch_communication(const Dispatch_communication& other) = delete;
  587. Dispatch_communication& operator =(const Dispatch_communication& other) = delete;
  588. ~Dispatch_communication();
  589. public://API functions
  590. //初始化 通信 模块。如下三选一
  591. virtual Error_manager communication_init(int plc_id);
  592. //反初始化 通信 模块。
  593. virtual Error_manager communication_uninit();
  594. public://get or set member variable
  595. // std::mutex * get_data_lock();
  596. // Request_from_dispatch_to_plc * get_request_from_dispatch_to_plc();
  597. // Response_from_plc_to_dispatch * get_response_from_plc_to_dispatch();
  598. // Status_from_dispatch_to_plc * get_status_from_dispatch_to_plc();
  599. // Status_from_plc_to_dispatch * get_status_from_plc_to_dispatch();
  600. protected://member functions
  601. //更新数据
  602. virtual Error_manager updata_receive_buf();
  603. virtual Error_manager updata_send_buf();
  604. protected://member variable
  605. public:
  606. int m_plc_id; //plc的id, 楚天车库的单元号
  607. std::mutex m_data_lock; //数据锁
  608. // Catcher_request_from_dispatch_to_plc_for_data m_catcher_request_from_dispatch_to_plc_for_data[2]; //抓车模块给plc发送请求消息的指令结构体
  609. // Catcher_request_from_dispatch_to_plc_for_key m_catcher_request_from_dispatch_to_plc_for_key[2]; //抓车模块给plc发送请求消息的指令结构体
  610. // Catcher_response_from_plc_to_dispatch m_catcher_response_from_plc_to_dispatch[2]; //plc给抓车模块发送答复消息的指令结构体
  611. // Catcher_status_from_plc_to_dispatch m_catcher_status_from_plc_to_dispatch[2]; //plc给抓车模块发送状态消息的指令结构体
  612. //
  613. // Carrier_request_from_dispatch_to_plc_for_data m_carrier_request_from_dispatch_to_plc_for_data[3]; //搬运器给plc发送请求消息的指令结构体
  614. // Carrier_request_from_dispatch_to_plc_for_key m_carrier_request_from_dispatch_to_plc_for_key[3]; //搬运器给plc发送请求消息的指令结构体
  615. // Carrier_response_from_plc_to_dispatch m_carrier_response_from_plc_to_dispatch[3]; //plc给搬运器发送答复消息的指令结构体
  616. // Carrier_status_from_plc_to_dispatch m_carrier_status_from_plc_to_dispatch[3]; //plc给搬运器发送状态消息的指令结构体
  617. //
  618. // Passageway_request_from_dispatch_to_plc_for_data m_passageway_request_from_dispatch_to_plc_for_data[8]; //通道口给plc发送请求消息的指令结构体
  619. // Passageway_request_from_dispatch_to_plc_for_key m_passageway_request_from_dispatch_to_plc_for_key[8]; //通道口给plc发送请求消息的指令结构体
  620. // Passageway_response_from_plc_to_dispatch m_passageway_response_from_plc_to_dispatch[8]; //plc给通道口发送答复消息的指令结构体
  621. // Passageway_status_from_plc_to_dispatch m_passageway_status_from_plc_to_dispatch[8]; //plc给通道口发送状态消息的指令结构体
  622. //调度指令
  623. Dispatch_request_from_manager_to_plc_for_data m_dispatch_request_from_manager_to_plc_for_data;
  624. Dispatch_request_from_manager_to_plc_for_key m_dispatch_request_from_manager_to_plc_for_key;
  625. Dispatch_response_from_plc_to_manager m_dispatch_response_from_plc_to_manager;
  626. //调度状态
  627. Dispatch_plc_status_from_manager_to_plc m_dispatch_plc_status_from_manager_to_plc;
  628. Dispatch_plc_status_from_plc_to_manager m_dispatch_plc_status_from_plc_to_manager;
  629. //地面雷达指令
  630. Ground_lidar_response_from_manager_to_plc_for_data m_ground_lidar_response_from_manager_to_plc_for_data[2];
  631. Ground_lidar_response_from_manager_to_plc_for_key m_ground_lidar_response_from_manager_to_plc_for_key[2];
  632. Ground_lidar_request_from_plc_to_manager m_ground_lidar_request_from_plc_to_manager[2];
  633. //防撞雷达指令
  634. Anticollision_lidar_response_from_manager_to_plc_for_data m_anticollision_lidar_response_from_manager_to_plc_for_data;
  635. Anticollision_lidar_response_from_manager_to_plc_for_key m_anticollision_lidar_response_from_manager_to_plc_for_key;
  636. Anticollision_lidar_request_from_plc_to_manager m_anticollision_lidar_request_from_plc_to_manager;
  637. //单片机
  638. Singlechip_response_from_manager_to_plc m_singlechip_response_from_manager_to_plc[4];
  639. Singlechip_request_from_plc_to_manager m_singlechip_request_from_plc_to_manager[4];
  640. //plc数据储存
  641. Data_storage_from_plc_to_manager m_data_storage_from_plc_to_manager;
  642. private:
  643. };
  644. #endif //NNXX_TESTS_DISPATCH_COMMUNICATION_H