站外充电桩调试

master
CZ 4 months ago
parent 3bb00a2b15
commit a8b53f0306

@ -249,7 +249,7 @@ public class Decoder : ByteToMessageDecoder
7 => ModelConvert.Decode<PileChargeCompleteReq>(bytes),
12 => ModelConvert.Decode<PileUploadTelemetry>(bytes),
11 => ModelConvert.Decode<PileUploadRemoteSignal>(bytes),
14 => ModelConvert.Decode<PileUploadChargeRecord>(bytes),
13 => ModelConvert.Decode<PileUploadChargeRecord>(bytes),
10 => ModelConvert.Decode<PileAdjustPowerRes>(bytes),
_ => throw new InvalidOperationException("This should never be reached"),
},

@ -108,45 +108,6 @@ public static class ChargerUtils
}
/// <summary>
/// 根据本地充电枪编号,充电机code,计算云平台下发充电枪编号
/// </summary>
/// <param name="chargerGun"></param>
/// <param name="chargerCode"></param>
/// <returns></returns>
/// <exception cref="ArgumentException"></exception>
public static string ReverseCalculateChargerGun(byte chargerGun, string chargerCode)
{
int number;
if (int.TryParse(chargerCode, out number))
{
int originalChargerGun;
if (chargerGun == 2)
{
// 站外2枪
originalChargerGun = number * 2;
}
else if (chargerGun == 1)
{
// 站外1枪
originalChargerGun = number * 2 - 1;
}
else
{
throw new ArgumentException("无效的chargerGun");
}
return originalChargerGun.ToString();
}
else
{
throw new ArgumentException("转换失败");
}
}
/// <summary>
/// 计算Byte随机数值
/// </summary>

@ -25,6 +25,10 @@ public class PileChargeCompleteHandler : SimpleChannelInboundHandler<PileChargeC
if (ClientMgr.TryGetClient(ctx.Channel, out var sn, out var client))
{
Log.Info($"receive {msg} from {sn}");
PileChargeCompleteRes res = new PileChargeCompleteRes(msg.Pn,0);
ctx.Channel.WriteAndFlushAsync(res);
if (msg.Result == 0)
{
ChargeOrder? chargeOrder = ChargeOrderRepository.GetLatestChargeGunOrder(msg.Pn.ToString(), sn);
@ -40,8 +44,6 @@ public class PileChargeCompleteHandler : SimpleChannelInboundHandler<PileChargeC
ChargeOrderRepository.Update(chargeOrder);
}
PileChargeCompleteRes res = new PileChargeCompleteRes(msg.Pn,0);
ctx.Channel.WriteAndFlushAsync(res);
}
}
}

@ -29,6 +29,7 @@ public class PileUploadChargeRecordHandler : SimpleChannelInboundHandler<PileUpl
{
if (ClientMgr.TryGetClient(ctx.Channel, out var sn, out var client))
{
ctx.Channel.WriteAndFlushAsync(new PileUploadChargeRecordRes(msg.Pn));
if (client == null)
{
return;
@ -42,8 +43,8 @@ public class PileUploadChargeRecordHandler : SimpleChannelInboundHandler<PileUpl
var startTime = new DateTime(msg.StartYear + 2000, msg.StartMonth, msg.StartDay, msg.StartHour,
msg.StartMinute, msg.StartSecond);
var endTime = new DateTime(msg.EndYear + 2000, msg.EndMonth, msg.EndDay, msg.EndHour, msg.EndMinute,
msg.EndSecond);
var endTime = DateTime.Now;//new DateTime(msg.EndYear + 2000, msg.EndMonth, msg.EndDay, msg.EndHour, msg.EndMinute,
//msg.EndSecond);
float chargingPower = msg.ChargingPower;
@ -112,14 +113,14 @@ public class PileUploadChargeRecordHandler : SimpleChannelInboundHandler<PileUpl
}
}
ctx.Channel.WriteAndFlushAsync(new PileUploadChargeRecordRes(msg.Pn));
}
private static void UploadChargeRecord(PileUploadChargeRecord msg, ChargerClient client, PileEndChargeReq req,
string sn, DateTime startTime, DateTime endTime, float chargingPower, byte socBefore, byte socAfter)
{
ChargerPile chargerPile = client.ChargerPile[msg.Pn];
req.pn = ChargerUtils.ReverseCalculateChargerGun(msg.Pn, sn);
req.pn = msg.Pn.ToString();
req.ct = chargerPile.ct;
req.cp = chargerPile.cp;
req.st = chargerPile.st;
@ -168,86 +169,35 @@ public class PileUploadChargeRecordHandler : SimpleChannelInboundHandler<PileUpl
private static float[] PeaksAndValleys(PileUploadChargeRecord msg, float[] powersPeriods)
{
if (msg.FlagOfTime1 >= 1 && msg.FlagOfTime1 <= 4)
{
powersPeriods[msg.FlagOfTime1 - 1] += msg.ChargingPowerOfTime1;
}
if (msg.FlagOfTime2 >= 1 && msg.FlagOfTime2 <= 4)
{
powersPeriods[msg.FlagOfTime2 - 1] += msg.ChargingPowerOfTime2;
}
if (msg.FlagOfTime3 >= 1 && msg.FlagOfTime3 <= 4)
{
powersPeriods[msg.FlagOfTime3 - 1] += msg.ChargingPowerOfTime3;
}
if (msg.FlagOfTime4 >= 1 && msg.FlagOfTime4 <= 4)
{
powersPeriods[msg.FlagOfTime4 - 1] += msg.ChargingPowerOfTime4;
}
if (msg.FlagOfTime5 >= 1 && msg.FlagOfTime5 <= 4)
{
powersPeriods[msg.FlagOfTime5 - 1] += msg.ChargingPowerOfTime5;
}
if (msg.FlagOfTime6 >= 1 && msg.FlagOfTime6 <= 4)
{
powersPeriods[msg.FlagOfTime6 - 1] += msg.ChargingPowerOfTime6;
}
if (msg.FlagOfTime7 >= 1 && msg.FlagOfTime7 <= 4)
{
powersPeriods[msg.FlagOfTime7 - 1] += msg.ChargingPowerOfTime7;
}
if (msg.FlagOfTime8 >= 1 && msg.FlagOfTime8 <= 4)
{
powersPeriods[msg.FlagOfTime8 - 1] += msg.ChargingPowerOfTime8;
}
if (msg.FlagOfTime1 >= 1 && msg.FlagOfTime1 <= 4){powersPeriods[msg.FlagOfTime1 - 1] += msg.ChargingPowerOfTime1;}
if (msg.FlagOfTime2 >= 1 && msg.FlagOfTime2 <= 4){powersPeriods[msg.FlagOfTime2 - 1] += msg.ChargingPowerOfTime2;}
if (msg.FlagOfTime3 >= 1 && msg.FlagOfTime3 <= 4){powersPeriods[msg.FlagOfTime3 - 1] += msg.ChargingPowerOfTime3;}
if (msg.FlagOfTime4 >= 1 && msg.FlagOfTime4 <= 4){powersPeriods[msg.FlagOfTime4 - 1] += msg.ChargingPowerOfTime4;}
if (msg.FlagOfTime5 >= 1 && msg.FlagOfTime5 <= 4){powersPeriods[msg.FlagOfTime5 - 1] += msg.ChargingPowerOfTime5;}
if (msg.FlagOfTime6 >= 1 && msg.FlagOfTime6 <= 4){powersPeriods[msg.FlagOfTime6 - 1] += msg.ChargingPowerOfTime6;}
if (msg.FlagOfTime7 >= 1 && msg.FlagOfTime7 <= 4){powersPeriods[msg.FlagOfTime7 - 1] += msg.ChargingPowerOfTime7;}
if (msg.FlagOfTime8 >= 1 && msg.FlagOfTime8 <= 4){powersPeriods[msg.FlagOfTime8 - 1] += msg.ChargingPowerOfTime8;}
if (msg.FlagOfTime9 >= 1 && msg.FlagOfTime9 <= 4){powersPeriods[msg.FlagOfTime9 - 1] += msg.ChargingPowerOfTime9;}
if (msg.FlagOfTime10 >= 1 && msg.FlagOfTime10 <= 4){powersPeriods[msg.FlagOfTime10 - 1] += msg.ChargingPowerOfTime10;}
if (msg.FlagOfTime11 >= 1 && msg.FlagOfTime11 <= 4){powersPeriods[msg.FlagOfTime11 - 1] += msg.ChargingPowerOfTime11;}
if (msg.FlagOfTime12 >= 1 && msg.FlagOfTime12 <= 4){powersPeriods[msg.FlagOfTime12 - 1] += msg.ChargingPowerOfTime12;}
if (msg.FlagOfTime13 >= 1 && msg.FlagOfTime13 <= 4){powersPeriods[msg.FlagOfTime13 - 1] += msg.ChargingPowerOfTime13;}
if (msg.FlagOfTime14 >= 1 && msg.FlagOfTime14 <= 4){powersPeriods[msg.FlagOfTime14 - 1] += msg.ChargingPowerOfTime14;}
float[] acPowersPeriods = new float[4] { 0, 0, 0, 0 }; //元素索引顺序代表值1234
if (msg.AcFlagOfTime1 >= 1 && msg.AcFlagOfTime1 <= 4)
{
acPowersPeriods[msg.AcFlagOfTime1 - 1] += msg.AcChargingPowerOfTime1;
}
if (msg.AcFlagOfTime2 >= 1 && msg.AcFlagOfTime2 <= 4)
{
acPowersPeriods[msg.AcFlagOfTime2 - 1] += msg.AcChargingPowerOfTime2;
}
if (msg.AcFlagOfTime3 >= 1 && msg.AcFlagOfTime3 <= 4)
{
acPowersPeriods[msg.AcFlagOfTime3 - 1] += msg.AcChargingPowerOfTime3;
}
if (msg.AcFlagOfTime4 >= 1 && msg.AcFlagOfTime4 <= 4)
{
acPowersPeriods[msg.AcFlagOfTime4 - 1] += msg.AcChargingPowerOfTime4;
}
if (msg.AcFlagOfTime5 >= 1 && msg.AcFlagOfTime5 <= 4)
{
acPowersPeriods[msg.AcFlagOfTime5 - 1] += msg.AcChargingPowerOfTime5;
}
if (msg.AcFlagOfTime6 >= 1 && msg.AcFlagOfTime6 <= 4)
{
acPowersPeriods[msg.AcFlagOfTime6 - 1] += msg.AcChargingPowerOfTime6;
}
if (msg.AcFlagOfTime7 >= 1 && msg.AcFlagOfTime7 <= 4)
{
acPowersPeriods[msg.AcFlagOfTime7 - 1] += msg.AcChargingPowerOfTime7;
}
if (msg.AcFlagOfTime8 >= 1 && msg.AcFlagOfTime8 <= 4)
{
acPowersPeriods[msg.AcFlagOfTime8 - 1] += msg.AcChargingPowerOfTime8;
}
if (msg.AcFlagOfTime1 >= 1 && msg.AcFlagOfTime1 <= 4){acPowersPeriods[msg.AcFlagOfTime1 - 1] += msg.AcChargingPowerOfTime1;}
if (msg.AcFlagOfTime2 >= 1 && msg.AcFlagOfTime2 <= 4){acPowersPeriods[msg.AcFlagOfTime2 - 1] += msg.AcChargingPowerOfTime2;}
if (msg.AcFlagOfTime3 >= 1 && msg.AcFlagOfTime3 <= 4){acPowersPeriods[msg.AcFlagOfTime3 - 1] += msg.AcChargingPowerOfTime3;}
if (msg.AcFlagOfTime4 >= 1 && msg.AcFlagOfTime4 <= 4){acPowersPeriods[msg.AcFlagOfTime4 - 1] += msg.AcChargingPowerOfTime4;}
if (msg.AcFlagOfTime5 >= 1 && msg.AcFlagOfTime5 <= 4){acPowersPeriods[msg.AcFlagOfTime5 - 1] += msg.AcChargingPowerOfTime5;}
if (msg.AcFlagOfTime6 >= 1 && msg.AcFlagOfTime6 <= 4){acPowersPeriods[msg.AcFlagOfTime6 - 1] += msg.AcChargingPowerOfTime6;}
if (msg.AcFlagOfTime7 >= 1 && msg.AcFlagOfTime7 <= 4){acPowersPeriods[msg.AcFlagOfTime7 - 1] += msg.AcChargingPowerOfTime7;}
if (msg.AcFlagOfTime8 >= 1 && msg.AcFlagOfTime8 <= 4){acPowersPeriods[msg.AcFlagOfTime8 - 1] += msg.AcChargingPowerOfTime8;}
if (msg.AcFlagOfTime9 >= 1 && msg.AcFlagOfTime9 <= 4){acPowersPeriods[msg.AcFlagOfTime9 - 1] += msg.AcChargingPowerOfTime9;}
if (msg.AcFlagOfTime10 >= 1 && msg.AcFlagOfTime10 <= 4){acPowersPeriods[msg.AcFlagOfTime10 - 1] += msg.AcChargingPowerOfTime10;}
if (msg.AcFlagOfTime11 >= 1 && msg.AcFlagOfTime11 <= 4){acPowersPeriods[msg.AcFlagOfTime11 - 1] += msg.AcChargingPowerOfTime11;}
if (msg.AcFlagOfTime12 >= 1 && msg.AcFlagOfTime12 <= 4){acPowersPeriods[msg.AcFlagOfTime12 - 1] += msg.AcChargingPowerOfTime12;}
if (msg.AcFlagOfTime13 >= 1 && msg.AcFlagOfTime13 <= 4){acPowersPeriods[msg.AcFlagOfTime13 - 1] += msg.AcChargingPowerOfTime13;}
if (msg.AcFlagOfTime14 >= 1 && msg.AcFlagOfTime14 <= 4){acPowersPeriods[msg.AcFlagOfTime14 - 1] += msg.AcChargingPowerOfTime14;}
return acPowersPeriods;
}

@ -99,17 +99,6 @@ public class PileUploadChargeRecord : ASDU
[Property(360, 8)]
public byte EndYear { get; set; }
/// <summary>
/// 充电开始时间 秒-分-时-日-月-年
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 充电结束时间
/// </summary>
public string EndTime { get; set; }
/// <summary>
/// 1 枪充电前电能表数据
/// </summary>
@ -354,245 +343,537 @@ public class PileUploadChargeRecord : ASDU
/// <summary>
/// 时段8 标识
/// </summary>
[Property(992, 8)]
[Property(992, 8)] //976
public byte FlagOfTime8 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(592 + 56 * 7 + 16, 8)]
public byte StartTime9 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(600 + 56 * 7 + 16, 8)]
public byte StartTimeMinute9 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(608 + 56 * 7 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float ChargingPowerOfTime9 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(640 + 56 * 7 + 16, 8)]
public byte FlagOfTime9 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(648 + 56 * 7 + 16, 8)]
public byte StartTime10 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(656 + 56 * 7 + 16, 8)]
public byte StartTimeMinute10 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(664 + 56 * 7 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float ChargingPowerOfTime10 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(696 + 56 * 7 + 16, 8)]
public byte FlagOfTime10 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(704 + 56 * 7 + 16, 8)]
public byte StartTime11 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(712 + 56 * 7 + 16, 8)]
public byte StartTimeMinute11 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(720 + 56 * 7 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float ChargingPowerOfTime11 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(752 + 56 * 7 + 16, 8)]
public byte FlagOfTime11 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(760 + 56 * 7 + 16, 8)]
public byte StartTime12 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(768 + 56 * 7 + 16, 8)]
public byte StartTimeMinute12 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(776 + 56 * 7 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float ChargingPowerOfTime12 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(808 + 56 * 7 + 16, 8)]
public byte FlagOfTime12 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(816 + 56 * 7 + 16, 8)]
public byte StartTime13 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(824 + 56 * 7 + 16, 8)]
public byte StartTimeMinute13 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(832 + 56 * 7 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float ChargingPowerOfTime13 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(864 + 56 * 7 + 16, 8)]
public byte FlagOfTime13 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(872 + 56 * 7 + 16, 8)]
public byte StartTime14 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(880 + 56 * 7 + 16, 8)]
public byte StartTimeMinute14 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(888 + 56 * 7 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float ChargingPowerOfTime14 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(920 + 56 * 7 + 16, 8)]
public byte FlagOfTime14 { get; set; }
/// <summary>
/// 充电模式 0站内充电 1站外充电
/// </summary>
[Property(1000, 8)]
[Property(984 + 336 + 16, 8)]
public byte ChargeMode { get; set; }
/// <summary>
/// 启动模式 0: 站控启动 1本地启动
/// </summary>
[Property(1008, 8)]
[Property(992 + 336 + 16, 8)]
public byte StartMode { get; set; }
/// <summary>
/// 充电前直流表值
/// </summary>
[Property(1016, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1000 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float DcMeterDataBefore { get; set; }
/// <summary>
/// 充电后直流表值
/// </summary>
[Property(1048, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1032 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float DcMeterDataAfter { get; set; }
/// <summary>
/// 充电前交流表值
/// </summary>
[Property(1080, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1064 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcMeterDataBefore { get; set; }
/// <summary>
/// 充电后交流表值
/// </summary>
[Property(1112, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1096 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcMeterDataAfter { get; set; }
/// <summary>
/// 本次充电交流表值
/// 交流表充电量
/// </summary>
[Property(1144, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1128 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcMeterElecCount { get; set; }
#region 交流峰谷电
/// <summary>
/// 时段1 开始时间 时
/// </summary>
[Property(1176, 8)]
[Property(1160 + 336 + 16, 8)]
public byte AcStartTime1 { get; set; }
/// <summary>
/// 时段1 开始时间 分
/// </summary>
[Property(1184, 8)]
[Property(1168 + 336 + 16, 8)]
public byte AcStartTimeMinute1 { get; set; }
/// <summary>
/// 时段1 电量
/// </summary>
[Property(1192, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1176 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime1 { get; set; }
/// <summary>
/// 时段1 标识
/// </summary>
[Property(1224, 8)]
[Property(1208 + 336 + 16, 8)]
public byte AcFlagOfTime1 { get; set; }
/// <summary>
/// 时段2 开始时间 时
/// </summary>
[Property(1232, 8)]
[Property(1160 + 56 + 336 + 16, 8)]
public byte AcStartTime2 { get; set; }
/// <summary>
/// 时段2 开始时间 分
/// </summary>
[Property(1240, 8)]
[Property(1168 + 56 + 336, 8)]
public byte AcStartTimeMinute2 { get; set; }
/// <summary>
/// 时段2 电量
/// </summary>
[Property(1248, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1176 + 56 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime2 { get; set; }
/// <summary>
/// 时段2 标识
/// </summary>
[Property(1280, 8)]
[Property(1208 + 56 + 336 + 16, 8)]
public byte AcFlagOfTime2 { get; set; }
/// <summary>
/// 时段3 开始时间 时
/// </summary>
[Property(1288, 8)]
[Property(1160 + 56 * 2 + 336 + 16, 8)]
public byte AcStartTime3 { get; set; }
/// <summary>
/// 时段3 开始时间 分
/// </summary>
[Property(1296, 8)]
[Property(1168 + 56 * 2 + 336 + 16, 8)]
public byte AcStartTimeMinute3 { get; set; }
/// <summary>
/// 时段3 电量
/// </summary>
[Property(1304, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1176 + 56 * 2 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime3 { get; set; }
/// <summary>
/// 时段3 标识
/// </summary>
[Property(1336, 8)]
[Property(1208 + 56 * 2 + 336 + 16, 8)]
public byte AcFlagOfTime3 { get; set; }
/// <summary>
/// 时段4 开始时间 时
/// </summary>
[Property(1344, 8)]
[Property(1160 + 56 * 3 + 336 + 16, 8)]
public byte AcStartTime4 { get; set; }
/// <summary>
/// 时段4 开始时间 分
/// </summary>
[Property(1352, 8)]
[Property(1168 + 56 * 3 + 336 + 16, 8)]
public byte AcStartTimeMinute4 { get; set; }
/// <summary>
/// 时段4 电量
/// </summary>
[Property(1360, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1176 + 56 * 3 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime4 { get; set; }
/// <summary>
/// 时段4 标识
/// </summary>
[Property(1392, 8)]
[Property(1208 + 56 * 3 + 336 + 16, 8)]
public byte AcFlagOfTime4 { get; set; }
/// <summary>
/// 时段5 开始时间 时
/// </summary>
[Property(1400, 8)]
[Property(1160 + 56 * 4 + 336 + 16, 8)]
public byte AcStartTime5 { get; set; }
/// <summary>
/// 时段5 开始时间 分
/// </summary>
[Property(1408, 8)]
[Property(1168 + 56 * 4 + 336 + 16, 8)]
public byte AcStartTimeMinute5 { get; set; }
/// <summary>
/// 时段5 电量
/// </summary>
[Property(1416, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1176 + 56 * 4 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime5 { get; set; }
/// <summary>
/// 时段5 标识
/// </summary>
[Property(1448, 8)]
[Property(1208 + 56 * 4 + 336 + 16, 8)]
public byte AcFlagOfTime5 { get; set; }
/// <summary>
/// 时段6 开始时间 时
/// </summary>
[Property(1456, 8)]
[Property(1160 + 56 * 5 + 336 + 16, 8)]
public byte AcStartTime6 { get; set; }
/// <summary>
/// 时段6 开始时间 分
/// </summary>
[Property(1464, 8)]
[Property(1168 + 56 * 5 + 336 + 16, 8)]
public byte AcStartTimeMinute6 { get; set; }
/// <summary>
/// 时段6 电量
/// </summary>
[Property(1472, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1176 + 56 * 5 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime6 { get; set; }
/// <summary>
/// 时段6 标识
/// </summary>
[Property(1504, 8)]
[Property(1208 + 56 * 5 + 336 + 16, 8)]
public byte AcFlagOfTime6 { get; set; }
/// <summary>
/// 时段7 开始时间 时
/// </summary>
[Property(1512, 8)]
[Property(1160 + 56 * 6 + 336 + 16, 8)]
public byte AcStartTime7 { get; set; }
/// <summary>
/// 时段7 开始时间 分
/// </summary>
[Property(1520, 8)]
[Property(1168 + 56 * 6 + 336 + 16, 8)]
public byte AcStartTimeMinute7 { get; set; }
/// <summary>
/// 时段7 电量
/// </summary>
[Property(1528, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1176 + 56 * 6 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime7 { get; set; }
/// <summary>
/// 时段7 标识
/// </summary>
[Property(1560, 8)]
[Property(1208 + 56 * 6 + 336 + 16, 8)]
public byte AcFlagOfTime7 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(1568, 8)]
[Property(1160 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTime8 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(1572, 8)]
[Property(1168 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTimeMinute8 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(1580, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(1176 + 56 * 7 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime8 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(1612, 8)]
[Property(1208 + 56 * 7 + 336 + 16, 8)]
public byte AcFlagOfTime8 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(1216 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTime9 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(1224 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTimeMinute9 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(1232 + 56 * 7 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime9 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(1240 + 56 * 7 + 336 + 16, 8)]
public byte AcFlagOfTime9 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(1248 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTime10 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(1256 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTimeMinute10 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(1264 + 56 * 7 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime10 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(1272 + 56 * 7 + 336 + 16, 8)]
public byte AcFlagOfTime10 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(1280 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTime11 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(1288 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTimeMinute11 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(1296 + 56 * 7 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime11 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(1304 + 56 * 7 + 336 + 16, 8)]
public byte AcFlagOfTime11 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(1312 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTime12 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(1320 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTimeMinute12 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(1328 + 56 * 7 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime12 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(1336 + 56 * 7 + 336 + 16, 8)]
public byte AcFlagOfTime12 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(1344 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTime13 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(1352 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTimeMinute13 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(1360 + 56 * 7 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime13 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(1368 + 56 * 7 + 336 + 16, 8)]
public byte AcFlagOfTime13 { get; set; }
/// <summary>
/// 时段8 开始时间 时
/// </summary>
[Property(1376 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTime14 { get; set; }
/// <summary>
/// 时段8 开始时间 分
/// </summary>
[Property(1384 + 56 * 7 + 336 + 16, 8)]
public byte AcStartTimeMinute14 { get; set; }
/// <summary>
/// 时段8 电量
/// </summary>
[Property(1392 + 56 * 7 + 336 + 16, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float AcChargingPowerOfTime14 { get; set; }
/// <summary>
/// 时段8 标识
/// </summary>
[Property(1400 + 56 * 7 + 336 + 16, 8)] //2144
public byte AcFlagOfTime14 { get; set; }
#endregion
}

@ -8,7 +8,7 @@ namespace Service.Charger.Msg.Charger.Req
public class RecordCharge : ASDU
{
/// <summary>
/// 订单编
/// 充电流水
/// </summary>
[Property(0, 32, PropertyReadConstant.Byte)]
public string ChargerOrderNo { get; set; }

Loading…
Cancel
Save