using HybirdFrameworkCore.Autofac.Attribute; namespace Service.Charger.Msg.Host.Resp { /// /// 3.3.4 监控平台应答充电设备登录签到报文 /// public class LogSignMessage : ASDU { [Property(0, 8)] public byte RecordType { get; set; } /// /// 结果 /// 0:成功/确认 ///1:失败-平台处理该消息失败 ///2:消息有误-消息校验错误/消息长度有误 ///4:该设备编码在系统没有找到 ///5:该设备编码在系统中异常,可能存在冲突 ///6:充电控制器数目不对 ///255:其它错误 /// [Property(8, 8)] public byte Result { get; set; } /// /// 年 /// [Property(16, 16)] public ushort TimeYear { get; set; } /// /// 月 /// [Property(32, 8)] public byte TimeMonth { get; set; } /// /// 日 /// [Property(40, 8)] public byte TimeDay { get; set; } /// /// 时 /// [Property(48, 8)] public byte TimeHour { get; set; } /// /// 分 /// [Property(56, 8)] public byte TimeMinute { get; set; } /// /// 秒 /// [Property(64, 8)] public byte TimeSecond { get; set; } /// /// 保留:1位, 默认0xFF /// [Property(72, 8)] public byte Time { get; set; } public LogSignMessage(byte result) { Result = result; CtlArea = 0; SrcAddr = 0; FrameTypeNo = 45; MsgBodyCount = 1; TransReason = 4; PublicAddr = 0; MsgBodyAddr = new byte[] { 0, 0, 0 }; RecordType = 12; DateTime dtime = DateTime.Now; TimeYear = Convert.ToUInt16(dtime.Year.ToString()); TimeMonth = Convert.ToByte(dtime.Month); TimeDay = Convert.ToByte(dtime.Day); TimeHour = Convert.ToByte(dtime.Hour); TimeMinute = Convert.ToByte(dtime.Minute); TimeSecond = Convert.ToByte(dtime.Second); } } }