using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Waste.Application.ThirdApiInfo
{
///
/// 心跳包上报数据
///
public class DevHeartRequestDto
{
///
/// 机器码
///
public string ECode { get; set; } = "";
///
/// IMEI
///
public string IMEI { get; set; } = "";
///
/// ICCID
///
public string ICCID { get; set; } = "";
///
/// IMSI
///
public string IMSI { get; set; } = "";
///
/// 信号强度
///
public int GSLQ { get; set; } = 0;
///
/// 纬度
///
public decimal Latitude { get; set; } = 0;
///
/// 经度
///
public decimal Longitude { get; set; } = 0;
}
///
/// 注册注册信息返回值
///
public class DevRegInfoResponseDto
{
///
/// 设备状态,0-使用中,1-异常,2-检修,3-检修结束,4-启用,5-未知
///
public int status { get; set; } = 0;
///
/// 波特率
///
public int baudrate { get; set; } = 9600;
///
/// 串口号
///
public string serialno { get; set; } = "/dev/ttyS1";
}
///
/// 获取设备信息请求数据,并上报数据
///
public class GetDevInfoRequestDto: DevHeartRequestDto
{
///
/// 记录ID
///
public Guid? ResultId { get; set; } = null;
///
/// 串口数据
///
public string data { get; set; } = "";
}
///
/// 获取设备信息响应数据
///
public class GetDevInfoResponseDto
{
///
/// 解析数据是否正常
///
public bool IsSuccessed { get; set; } = false;
///
/// 时间戳
///
public int timestamp { get; set; }
///
/// 随机数
///
public int noncestr { get; set; }
///
/// 用户ID
///
public string UserId { get; set; }
///
/// secret
///
public string Secret { get; set; }
///
/// secrethash
///
public string SecretHash { get; set; }
///
/// 设备ID
///
public string DeviceId { get; set; } = "";
///
/// 上报地址
///
public string PostUrl { get; set; } = "";
///
/// 垃圾桶编号
///
public string trash { get; set; } = "";
///
/// 垃圾类型
///
public int type { get; set; }
///
/// 体重
///
public double Weight { get; set; }
///
/// 设备状态,0-使用中,1-异常,2-检修,3-检修结束,4-启用,5-未知
///
public int status { get; set; } = 0;
///
/// 数据扫描时间,UNIX时间戳
///
public int ScanningTime { get; set; }
///
/// 签名
///
public string sign { get; set; }
///
/// 记录ID
///
public Guid ResultId { get; set; }
}
///
/// 日志上报
///
public class BugModel
{
///
/// 机器码
///
public string ecode { get; set; }
///
/// 位置
///
public string ExceptionPos { get; set; }
///
/// 错误信息
///
public string ExceptionInfo { get; set; }
}
}