AGVDefaultList.cs 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace IMCS.DefaultList
  7. {
  8. public class AGVPositionCodePathList
  9. {
  10. public string positionCode { get; set; } = "";
  11. public string type { get; set; }
  12. }
  13. public class AGVPrioritiesList
  14. {
  15. /// <summary>
  16. /// 当前整在执行的任务编号
  17. /// </summary>
  18. public string taskCode { get; set; }
  19. /// <summary>
  20. /// 优先级 1-127级别=,最大优先级越高
  21. /// </summary>
  22. public string priority { get; set; }
  23. }
  24. /// <summary>
  25. /// CCS--->>AGV
  26. /// </summary>
  27. public class AGVRequestDefaultList
  28. {
  29. /// <summary>
  30. /// 请求编号,每个请求都要一个唯一编号, 同一个请求重复提交, 使用同一编号。由上层系统设定
  31. /// 最大长度:32
  32. /// </summary>
  33. public string reqCode { get; set; }
  34. /// <summary>
  35. /// 最大长度:20
  36. /// 请求时间截 格式: “yyyy-MM-dd HH:mm:ss”。由上层系统设定
  37. /// </summary>
  38. public string reqTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
  39. /// <summary>
  40. /// 客户端编号,如 PDA, HCWMS 等。如果填写,需先在RCS-2000 系统配置,上层系统调用时进行填写,当多系统 调用时,调度系统可以进行调用方区分
  41. /// 最大长度:16
  42. /// </summary>
  43. public string clientCode { get; set; } = "HCWM";
  44. /// <summary>
  45. /// 令牌号, 由调度系统颁发。如果填写,需先在 RCS-2000 系 统配置,上层系统调用时进行填写
  46. /// 最大长度:64
  47. /// </summary>
  48. public string tokenCode { get; set; }
  49. /// <summary>
  50. /// 最大长度:16
  51. ///任务类型,与在 RCS-2000 端配置
  52. ///的主任务类型编号一致。
  53. ///内置任务类型:
  54. ///厂内货架搬运: F01
  55. ///厂内货架空满交换: F02
  56. ///RCS-2000 接口协议 对外发布
  57. ///辊筒搬运接驳:F03
  58. ///厂内货架出库 AGV 待命:F04
  59. ///旋转货架: F05
  60. ///厂内电梯任务: F06
  61. ///以下为叉车专用任务类型
  62. ///高位货架到工作台: F11
  63. ///工作台到高位货架: F12
  64. ///巷道到工作台: F13
  65. ///工作台到巷道: F14
  66. ///高位货架到工作台(接驳) : F15
  67. ///工作台到高位货架(接驳) : F16
  68. ///巷道到工作台(接驳) : F17
  69. ///工作台到巷道(接驳) : F18
  70. ///叉车电梯主任务: F20
  71. /// </summary>
  72. public string taskTyp { get; set; } = "F01";
  73. /// <summary>
  74. /// 最大长度:16
  75. /// 容器类型(叉车专用)
  76. /// 叉车项目必传
  77. /// </summary>
  78. public string ctnrTyp { get; set; }
  79. /// <summary>
  80. /// 最大长度:32
  81. /// 容器编号(叉车专用)
  82. /// </summary>
  83. public string ctnrCode { get; set; }
  84. /// <summary>
  85. /// 最大长度:32
  86. /// 工作位,一般为机台或工作台位置,
  87. /// 与 RCS-2000 端配置的位置名称一
  88. /// 致, 工作位名称为字母\数字\或组
  89. /// 合, 不超过 32 位
  90. /// </summary>
  91. public string wbCode { get; set; }
  92. /// <summary>
  93. /// 列表长度小于 50
  94. /// 最大长度:50
  95. /// 位置路径:AGV 关键路径位置集合,
  96. ///与任务类型中模板配置的位置路径
  97. ///一一对应。待现场地图部署、配置
  98. ///完成后可获取。
  99. ///positionCode:位置编号, 单个编
  100. ///号不超过 64 位
  101. ///type:位置类型说明:
  102. ///00 表示:位置编号
  103. ///01 表示:物料批次号
  104. ///02 表示:策略编号(含多个区域)
  105. ///RCS-2000 接口协议 对外发布
  106. ///如:第一个区域放不下, 可以放第二
  107. ///个区域
  108. ///03 表示:货架编号,通过货架编号
  109. ///找到货架所在位置
  110. ///04 表示:区域编号,在区域中查找
  111. ///可用位置
  112. ///05 表示:仓位编号(叉车专用)
  113. ///06 表示:巷道编号(叉车专用)
  114. /// </summary>
  115. public List<AGVPositionCodePathList> positionCodePath { get; set; }
  116. /// <summary>
  117. /// 最大长度:16
  118. /// /货架编号,不指定货架可以为空
  119. /// </summary>
  120. public string podCode { get; set; }
  121. /// <summary>
  122. /// 最大长度:4
  123. /// 180”,”0”,”90”,”-90” 分
  124. ///别 对 应 地 图 的 ” 左 ”,” 右 ”,”
  125. ///上”,”下” ,不指定方向可以为空
  126. /// </summary>
  127. public string podDir { get; set; }
  128. /// <summary>
  129. /// 最大长度:16
  130. /// 货架类型, 传空时表示随机找个货架
  131. ///找空货架传参方式如下:
  132. ///-1: 代表不关心货架类型, 找到空
  133. ///货架即可.
  134. ///-2: 代表从工作位获取关联货架类
  135. ///型, 如果未配置, 只找空货架.
  136. ///货架类型编号: 只找该货架类型的
  137. ///空货架.
  138. /// </summary>
  139. public string podTyp { get; set; }
  140. /// <summary>
  141. /// 最大长度:32
  142. /// 物料批次或货架上的物料唯一编码,
  143. ///生成任务单时,货架与物料直接绑定
  144. ///时使用. (通过同时传 podCode 和
  145. ///materialLot 来 绑 定 或 通 过
  146. ///wbCode 找 到 位 置 上的 货 架 和
  147. ///materialLot 来绑定)
  148. /// </summary>
  149. public string materialLot { get; set; }
  150. /// <summary>
  151. /// 最大长度:32
  152. /// 优先级,从(1~127)级,最大优
  153. ///先级最高。为空时,采用任务模板
  154. ///RCS-2000 接口协议 对外发布
  155. ///的优先级。
  156. ///taskCode String 64 否
  157. ///任务单号, 选填, 不填系统自动生
  158. ///成,UUID 小于等于 64 位
  159. /// </summary>
  160. public List<AGVPrioritiesList> priority { get; set; }
  161. /// <summary>
  162. /// 最大长度:64
  163. /// 任务单号,选填, 不填系统自动生
  164. ///成,UUID 小于等于 64 位
  165. /// </summary>
  166. public string taskCode { get; set; }
  167. /// <summary>
  168. /// 最大长度:32
  169. /// AGV 编号,填写表示指定某一编号
  170. /// 的 AGV 执行该任务
  171. /// </summary>
  172. public string agvCode { get; set; }
  173. /// <summary>
  174. /// 最大长度:2000
  175. /// 自定义字段,不超过 2000 个字符
  176. /// </summary>
  177. public string data { get; set; }
  178. /// <summary>
  179. /// 位置编号,地图位置的别名,能任
  180. ///意命名(字母+数字),但要唯一,由
  181. ///RCS-2000 界面配置
  182. /// </summary>
  183. public string positionCode { get; set; }
  184. /// <summary>
  185. /// "1": 启用, "0":禁用
  186. /// </summary>
  187. public string indBind { get; set; } = "0";
  188. /// <summary>
  189. /// 当前位置编号
  190. ///任务开始:该位置为任务起点
  191. ///走出储位:该位置为任务起点
  192. ///任务单取消:该位置为工作位编号
  193. ///任务结束:该位置为任务终点
  194. /// </summary>
  195. public string currentPositionCode { get; set; }
  196. /// <summary>
  197. /// 方法名, 可使用任务类型做为方法名
  198. ///由 RCS-2000 任务模板配置后并告
  199. ///知上层系统
  200. ///默认使用方式:
  201. ///RCS-2000 接口协议 对外发布
  202. ///start : 任务开始
  203. ///outbin : 走出储位
  204. ///end : 任务结束
  205. ///cancel : 任务单取消
  206. /// </summary>
  207. public string method { get; set; }
  208. /// <summary>
  209. /// AGV 编号(同 agvCode )
  210. /// </summary>
  211. public string robotCode { get; set; }
  212. }
  213. public enum EnumAGVCode
  214. {
  215. /// <summary>
  216. /// 成功
  217. /// </summary>
  218. Success = 0,
  219. /// <summary>
  220. /// 参数相关的错误
  221. /// </summary>
  222. ParamError = 1,
  223. /// <summary>
  224. /// 重复发送,上层系统不需要重发
  225. /// </summary>
  226. reuseSend = 6,
  227. /// <summary>
  228. /// 其他未知错误,调用失败后,可以重试
  229. /// </summary>
  230. OtherError = 99,
  231. /// <summary>
  232. /// 该任务不存在,上层系统不需要重发,需要人工接入才处理
  233. /// </summary>
  234. NoTask = 100
  235. }
  236. /// <summary>
  237. /// AGV-->CCS
  238. /// </summary>
  239. public class AGVResponseDefaultList
  240. {
  241. /// <summary>
  242. /// 请求编号返回,形成一一对应
  243. /// </summary>
  244. public string reqCode { get; set; }
  245. /// <summary>
  246. /// 返回编号, “0”:成功, 1~N:失败
  247. /// </summary>
  248. public string code { get; set; }
  249. /// <summary>
  250. /// “0”:成功 1~N:其他的详细描述
  251. /// </summary>
  252. public string message { get; set; }
  253. /// <summary>
  254. /// 返回的数据结构
  255. /// </summary>
  256. public string data { get; set; }
  257. }
  258. }