AHTC/RGD/RGD.HaiRouAPI/HaiRouModel/RobotStatue.cs

150 lines
4.9 KiB
C#
Raw Normal View History

2025-05-19 09:22:33 +08:00
/*************************************************************************************
*
* : RobotStatue
* : AGV状态查询
* :
* Du
* 2022/8/1 8:50:01
*************************************************************************************/
using System.Collections.Generic;
namespace RGD.HaiRouAPI.HaiRouModel
{
public class RobotStatue
{
private List<string> robotsCodes;
/// <summary>
/// 机器人编码,可传多个,若不传则查全部
/// </summary>
public List<string> RobotsCodes { get => robotsCodes; set => robotsCodes = value; }
}
public class robot
{
private string RobotCode;
private string RobotTypeCode;
private string PointCode;
private long PositionX;
private long PositionY;
private int Theta;
private long ForkHeight;
private long ForkLength;
private int ForkTheta;
private string StationCode;
private string LocationCode;
private string State;
private string HardwareState;
private List<tray> trays;
/// <summary>
/// 编码
/// </summary>
public string robotCode { get => RobotCode; set => RobotCode = value; }
/// <summary>
/// 型号
/// </summary>
public string robotTypeCode { get => RobotTypeCode; set => RobotTypeCode = value; }
/// <summary>
/// 节点编码,机器人当前所处节点
/// </summary>
public string pointCode { get => PointCode; set => PointCode = value; }
/// <summary>
/// X坐标
/// </summary>
public long positionX { get => PositionX; set => PositionX = value; }
/// <summary>
/// Y坐标
/// </summary>
public long positionY { get => PositionY; set => PositionY = value; }
/// <summary>
/// 机器人角度
/// </summary>
public int theta { get => Theta; set => Theta = value; }
/// <summary>
/// 货叉高度
/// </summary>
public long forkHeight { get => ForkHeight; set => ForkHeight = value; }
/// <summary>
/// 货叉长度
/// </summary>
public long forkLength { get => ForkLength; set => ForkLength = value; }
/// <summary>
/// 货叉相对机器人角度
/// </summary>
public int forkTheta { get => ForkTheta; set => ForkTheta = value; }
/// <summary>
/// 工作站编码,当机器人在工作站工作时会具有
/// </summary>
public string stationCode { get => StationCode; set => StationCode = value; }
/// <summary>
/// 当机器人控制权在工作位上时会具有
/// </summary>
public string locationCode { get => LocationCode; set => LocationCode = value; }
/// <summary>
/// 机器人状态
/// UNAVAILABLE = 杀机器人后,在场外的状态
/// UNKNOWN = 未知,待初始化
/// ERROR = 错误(机器人状态更新超时)
/// IDLE = 空闲
/// EXECUTING = 执行任务中
/// AWAITING = 原地等待
/// </summary>
public string state { get => State; set => State = value; }
/// <summary>
/// 机器人硬件状态
/// ROBOT_READY_TO_INIT = 机器人启动以后的初始状态,等待初始化指令
/// ROBOT_IDLE = 空闲状态,等待任务指令(MOVE、BIN_OP)
/// ROBOT_RUNNING = 运行状态(正在执行任务)
/// ROBOT_ABNORMAL = 异常状态(内部故障,或者执行任务过程中发生异常需要处理)
/// ROBOT_RECOVERY = 恢复状态
/// </summary>
public string hardwareState { get => HardwareState; set => HardwareState = value; }
/// <summary>
/// 背篓描述
/// </summary>
public List<tray> Trays { get => trays; set => trays = value; }
}
public class tray
{
private int TrayLevel;
private string ContainerCode;
private List<string> TaskCodes;
private string PositionCode;
/// <summary>,货叉标识
/// 背篓编号
/// </summary>
public int trayLevel { get => TrayLevel; set => TrayLevel = value; }
/// <summary>
/// 容器编码,若背篓为空则为空
/// </summary>
public string containerCode { get => ContainerCode; set => ContainerCode = value; }
/// <summary>
/// 业务任务,容器对应的业务任务编码
/// </summary>
public List<string> taskCodes { get => TaskCodes; set => TaskCodes = value; }
/// <summary>
/// 位置编码,格式为机器人id#背篓编号
/// </summary>
public string positionCode { get => PositionCode; set => PositionCode = value; }
}
}