RobotRealtimeStatusDto.cs 2.07 KB
using Rcs.Application.Services;
using Rcs.Domain.Entities;

namespace Rcs.Application.DTOs
{
    /// <summary>
    /// 机器人实时状态 DTO(用于 WebSocket 推送)
    /// @author zzy
    /// </summary>
    public class RobotRealtimeStatusDto
    {
        /// <summary>
        /// 机器人ID
        /// </summary>
        public string RobotId { get; set; } = string.Empty;
        /// <summary>
        /// 机器人编码
        /// </summary>
        public int RobotType { get; set; }

        /// <summary>
        /// 机器人编码
        /// </summary>
        public string RobotCode { get; set; } = string.Empty;

        /// <summary>
        /// 机器人名称
        /// </summary>
        public string RobotName { get; set; } = string.Empty;

        /// <summary>
        /// 当前X坐标
        /// </summary>
        public double? X { get; set; }

        /// <summary>
        /// 当前Y坐标
        /// </summary>
        public double? Y { get; set; }

        /// <summary>
        /// 当前角度
        /// </summary>
        public double? Theta { get; set; }

        /// <summary>
        /// 状态:1=空闲,2=忙碌,3=异常
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 在线状态:1=在线,2=离线,3=连接中断
        /// </summary>
        public int Online { get; set; }

        /// <summary>
        /// 电量百分比 0-100
        /// </summary>
        public int? BatteryLevel { get; set; }

        /// <summary>
        /// 是否行驶中
        /// </summary>
        public bool Driving { get; set; }

        /// <summary>
        /// 是否充电中
        /// </summary>
        public bool Charging { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public List<RobotError>? Errors { get; set; }

        /// <summary>
        /// 路径点位信息(key为路径类型,value为坐标点列表[[x,y], [x,y], ...])
        /// @author zzy
        /// </summary>
        public List<List<double>>? Path { get; set; }
    }
}