ResultData.cs
3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class ResultData
{
public int code { get; set; }
public string msg { get; set; }
public RobotStates data { get; set; }
}
public class RobotStates
{
public List<RobotState> robots { get; set; }
}
public class RobotState
{
/// <summary>
/// 编码
/// </summary>
public string robotCode { get; set; }
/// <summary>
/// 型号
/// </summary>
public string robotTypeCode { get; set; }
/// <summary>
/// 节点编码
/// 机器人当前所处节点
/// </summary>
public string pointCode { get; set; }
/// <summary>
/// 坐标X,单位mm
/// </summary>
public long positionX { get; set; }
/// <summary>
/// 坐标Y,单位mm
/// </summary>
public long positionY { get; set; }
/// <summary>
/// 电量
/// </summary>
public int energyLevel { get; set; }
/// <summary>
/// 机器人角度
/// </summary>
public int theta { get; set; }
/// <summary>
/// 货叉高度
/// </summary>
public long forkHeight { get; set; }
/// <summary>
/// 货叉长度
/// </summary>
public long forkLength { get; set; }
/// <summary>
/// 货叉相对机器人角度
/// </summary>
public int forkTheta { get; set; }
/// <summary>
/// 工作站编码
/// </summary>
public string stationCode { get; set; }
/// <summary>
/// 工作位编码
/// </summary>
public string locationCode { get; set; }
/// <summary>
/// 机器人状态
/// UNAVAILABLE = 杀机器人后,在场外的状态
///UNKNOWN = 未知, 待初始化
///ERROR = 错误(机器人状态更新超时)
///IDLE = 空闲
///EXECUTING = 执行任务中
///AWAITING = 原地等待
/// </summary>
public string state { get; set; }
/// <summary>
/// 机器人硬件状态
/// ROBOT_READY_TO_INIT = 机器人启动以后的初始状态,等待初始化指令
///ROBOT_IDLE = 空闲状态,等待任务指令(MOVE、BIN_OP)
///ROBOT_RUNNING = 运行状态(正在执行任务)
///ROBOT_ABNORMAL = 异常状态(内部故障,或者执行任务过程中发生异常需要处理)
///ROBOT_RECOVERY = 恢复状态
///ROBOT_PAUSED = 暂停状态
/// </summary>
public string hardwareState { get; set; }
/// <summary>
/// 背篓描述
/// </summary>
public List<tray> trays { get; set; }
}
public class tray
{
/// <summary>
/// 背篓序号
/// 货叉标识64
/// </summary>
public int trayLevel { get; set; }
/// <summary>
/// 容器编码
/// 若背篓为空则为空
/// </summary>
public string containerCode { get; set; }
/// <summary>
/// 业务任务
/// 容器对应的业务任务编码
/// </summary>
public List<string> taskCodes { get; set; }
/// <summary>
/// 位置编码
/// 格式为机器人id#背篓序号
/// </summary>
public string positionCode { get; set; }
}
}