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/ttyS3";
///
/// websocket地址
///
public string WebSocketUrl { get; set; } = "wss://api.device.suzhou.ljflytjl.cn/device_rpc";
///
/// 时间戳
///
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 class UpdateStatusDto
{
///
/// 记录ID
///
public string ResultId { get; set; } = "";
///
/// 机器码
///
public string ECode { get; set; } = "";
///
/// 上报状态,1-成功,0-失败
///
public int status { get; set; } = 0;
}
///
/// 获取设备信息请求数据,并上报数据
///
public class GetDevInfoRequestDto : DevHeartRequestDto
{
///
/// 记录ID
///
public string ResultId { get; set; } = "";
///
/// 串口数据
///
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; }
}
///
/// wifi模块发送的数据
///
public class WifiRequestC2SDto
{
///
/// 参数,包含sn和测量数据
///
public string @params { get; set; }
}
///
/// wifi模块发送的数据解析
///
public class WifiRequestS2SDto
{
///
/// 设备机器码
///
public string sn { get; set; }
///
/// 包头,固定为A9
///
public string Header { get; set; } = "";
///
/// 分隔符,固定为00
///
public string splitstr { get; set; } = "";
///
/// 解密出的16进制数据
///
public string data { get; set; } = "";
///
/// 数据是否验证通过
///
public bool ischecked { get; set; } = true;
///
/// 是否为心跳包
///
public bool IsHeart { get; set; } = false;
///
/// 结果集
///
public byte[] databyte { get; set; }
}
///
/// 消息发送
///
public class SendMessageS2SDto
{
///
/// 设备ID
///
public Guid DeviceId { get; set; }
///
/// 垃圾类别
///
public string WasteType { get; set; }
///
/// 重量,单位KG
///
public string Weight { get; set; }
///
/// 垃圾桶编号
///
public string TrashCode { get; set; }
///
/// 上报时间
///
public DateTime Time { get; set; }
}
///
/// app端返回的信息
///
public class AppS2CDto
{
///
/// 信息
///
public T status { get; set; }
}
///
/// app端返回的通用信息
///
public class AppCommonS2CDto
{
///
/// 错误代码
///
public int code { get; set; }
///
/// 名称
///
public string name { get; set; }
///
/// 错误信息
///
public string message { get; set; }
}
///
/// app端版本信息返回值
///
public class AppVerS2CDto
{
///
/// 版本号
///
public int code { get; set; }
///
/// 版本说明
///
public string name { get; set; }
///
/// 下载地址
///
public string update_url { get; set; }
}
}