You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.1 KiB

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