AGVHelper.cs 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace MainForm.ClassFile.XiaomiClass
  7. {
  8. public class AGVHelper
  9. {
  10. /// <summary>
  11. /// 容器搬运请求接⼝
  12. /// 协议:x5
  13. /// ⽤途: SMT装备向物流服务发送空箱搬运下线的请求;装备之间物料的纯搬运动作,不经过MES.
  14. /// PATH:${HOST
  15. /// ls/x5/task/carry/create
  16. /// X5_METHOD: createCarryTask
  17. /// </summary>
  18. #region 输入字段描述
  19. public class Request_AGV_t
  20. {
  21. public string taskType="CARRY"; //必填:否 任务类型 ‘CARRY'
  22. public string containerCode; //必填:是 容器编码;如果⽆法知晓当前容器编码,传当前时间戳
  23. public string startingContainerCode; //必填:是 起始点:料站点(接驳⼝/地⾯码)
  24. public string containerType; //必填:否 容器类型
  25. public string startingArea; //必填:否 起始区域
  26. public string targetArea; //必填:否 ⽬标区域
  27. public string targetContainerCode; //必填:否 ⽬标料站点
  28. }
  29. #endregion
  30. #region 输出字段描述
  31. public class Response_AGV_t
  32. {
  33. public ResponseHeaderAGV_t header; //必填:是 响应头
  34. public ResponseBodtyAGV_t body; //必填:是 返回值,如果有返回的话
  35. }
  36. public class ResponseHeaderAGV_t
  37. {
  38. public int code; //200表⽰成功,⾮200表⽰失败
  39. public string desc; //code为⾮200,这⾥表⽰具体的失败原因,如果code为200,这⾥成功的描述,可能是空
  40. }
  41. public class ResponseBodtyAGV_t
  42. {
  43. public string taskNo; //必填:是 任务编码
  44. }
  45. #endregion
  46. #region AGV⼊料
  47. //1.1 AGV向装备⼊料请求
  48. //Topic:iiot_tm_comm_control_down/tm/down/control/${portCode
  49. #region AGV向装备⼊料请求
  50. public class Request_AGV_PassIn_t
  51. {
  52. string things;
  53. AgvService_t service;
  54. string time;
  55. }
  56. public class AgvService_t
  57. {
  58. string callId; //"1660412396530"
  59. string identifier; //"control/incoming"
  60. AgvInputItems_t inputItems;
  61. }
  62. public class AgvInputItems_t
  63. {
  64. string portCode; //接驳⼝编码
  65. string quantity; //送料数量.空箱传0
  66. }
  67. #endregion
  68. //1.2 装备向AGV返回【是否允许】----⼊料请求
  69. //Topic:iiot_tm_comm_control_up/tm/up/control/agv
  70. #region 装备向AGV返回是否允许
  71. public class Response_AGV_PassIn_t
  72. {
  73. string time;
  74. string things;
  75. AgvResponseBody_t service;
  76. }
  77. public class AgvResponseBody_t
  78. {
  79. string identifier; //"control/incoming"
  80. string callId; //"1660412396530"
  81. string executeStatus; //"SUCCESS"
  82. AgvOutputItems_t outputItems;
  83. }
  84. public class AgvOutputItems_t
  85. {
  86. string portCode; //接驳⼝编码
  87. string message; //"agree" or "refuse
  88. }
  89. #endregion
  90. //1.3 AGV向装备发送⼊料完成
  91. //Topic:iiot_tm_comm_control_down/tm/down/control/${portCode}
  92. #region AGV向装备发送⼊料完成
  93. public class Request_AGV_PassInFinish_t
  94. {
  95. string things;
  96. AgvRequestPassInFin_t service;
  97. string time;
  98. }
  99. public class AgvRequestPassInFin_t
  100. {
  101. string callId; //"1660412396530"
  102. string identifier; //"control/incoming/finish"
  103. AgvInputItems_t inputItems;
  104. string time;
  105. }
  106. #endregion
  107. //1.4 装备向AGV返回⼊料完成
  108. //Topic:iiot_tm_comm_control_up/tm/up/control/agv
  109. #region 装备向AGV返回⼊料完成
  110. public class Response_AGV_PassInFinish_t
  111. {
  112. string time;
  113. string things;
  114. AgvResponsePassInFin_t service;
  115. }
  116. public class AgvResponsePassInFin_t
  117. {
  118. string identifier; //"control/incoming/finish"
  119. string callId; //"1660412396530"
  120. string executeStatus; //"SUCCESS"
  121. AgvOutputItems_t outputItems;
  122. }
  123. #endregion
  124. #endregion
  125. #region AGV出料
  126. //2.1 该信号在未收到装备允许的信号前会持续发送,频率为2秒⼀次
  127. //Topic:iiot_tm_comm_control_down/tm/down/control/${portCode}
  128. #region AGV向装备出料请求
  129. public class Request_AGV_PassOut_t
  130. {
  131. string things;
  132. AgvServiceOut_t service;
  133. string time;
  134. }
  135. public class AgvServiceOut_t
  136. {
  137. string callId; //"1660412396530"
  138. string identifier; //"control/outgoing"
  139. AgvInputItemsOut_t inputItems;
  140. }
  141. public class AgvInputItemsOut_t
  142. {
  143. string portCode; //接驳⼝编码
  144. }
  145. #endregion
  146. //2.2 装备向AGV返回出料请求
  147. //Topic:iiot_tm_comm_control_up/tm/up/control/agv
  148. #region 装备向AGV返回出料请求
  149. public class Response_AGV_PassOut_t
  150. {
  151. string time;
  152. string things;
  153. AgvResponseServiceOut_t service;
  154. }
  155. public class AgvResponseServiceOut_t
  156. {
  157. string identifier; //"control/outgoing"
  158. string callId; //"1660412396530"
  159. string executeStatus; //"SUCCESS"
  160. AgvOutItemsOut_t outputItems;
  161. }
  162. public class AgvOutItemsOut_t
  163. {
  164. string portCode; //接驳⼝编码
  165. string message; //"agree" or "refuse"
  166. }
  167. #endregion
  168. //2.3 AGV向装备发送出料完成
  169. //Topic:iiot_tm_comm_control_down/tm/down/control/${portCode}
  170. #region AGV向装备发送出料完成
  171. public class Request_AGV_PassOutFinish_t
  172. {
  173. string things;
  174. AgvRequestServiceOutFinish_t service;
  175. string time;
  176. }
  177. public class AgvRequestServiceOutFinish_t
  178. {
  179. string callId; //"1660412396530"
  180. string identifier; //"control/outgoing/finish"
  181. AgvInputItemsOutFin_t inputItems;
  182. }
  183. public class AgvInputItemsOutFin_t
  184. {
  185. string portCode; //接驳⼝编码
  186. }
  187. #endregion
  188. //2.4 装备向AGV返回出料完成
  189. //Topic:iiot_tm_comm_control_up/tm/up/control/agv
  190. #region AGV向装备发送出料完成
  191. public class Response_AGV_PassOutFinish_t
  192. {
  193. string time;
  194. string things;
  195. AgvResponseServiceOutFinish_t service;
  196. }
  197. public class AgvResponseServiceOutFinish_t
  198. {
  199. string identifier; //"control/outgoing/finish"
  200. string callId; //"1660412396530"
  201. string executeStatus; //"SUCCESS"
  202. AgvOutputItemsOutFin_t outputItems;
  203. }
  204. public class AgvOutputItemsOutFin_t
  205. {
  206. string portCode; //接驳⼝编码
  207. }
  208. #endregion
  209. #endregion
  210. }
  211. }