5.26周日更改

zw
CZ 6 months ago
parent 256840279b
commit c897fc0385

@ -61,6 +61,7 @@ public static class BitUtls
{
length = length / 8;
var bt = new byte[length];
start = start / 8;
for (var i = start; i < start + length; i++) bt[i - start] = bytes[i];

@ -19,8 +19,8 @@ public class Decoder : ByteToMessageDecoder
{
private static readonly ILog Log = LogManager.GetLogger(typeof(Decoder));
private readonly IByteBuffer[] _delimiters = { Unpooled.CopiedBuffer(ChargerConst.StartChar) };
private readonly IByteBuffer[] _delimiters = { Unpooled.CopiedBuffer(ChargerConst.StartChar) };
protected override void Decode(IChannelHandlerContext context, IByteBuffer buffer, List<object> output)
{
@ -100,16 +100,16 @@ public class Decoder : ByteToMessageDecoder
return -1;
}
public ASDU Parse(IByteBuffer byteBuffer, int totalFrameLength, out byte[] data)
public ASDU Parse(IByteBuffer byteBuffer, int totalFrameLength, out byte[] data)
{
data = new byte[totalFrameLength];
byteBuffer.ReadBytes(data);
//string ou = string.Empty;
//for (int i = 0; i < data.Length; i++)
//{
// ou += data[i].ToString("X2") + " ";
//}
string ou = string.Empty;
for (int i = 0; i < data.Length; i++)
{
ou += data[i].ToString("X2") + " ";
}
//TODO bug length取值不对上述测试使用
int removeIndex = _delimiters.Length;
@ -136,11 +136,9 @@ public class Decoder : ByteToMessageDecoder
41 => ModelConvert.Decode<VehicleVIN>(bytes),
44 => ModelConvert.Decode<OfflineStopChargingRes>(bytes),
48 => ModelConvert.Decode<ResponseSetting>(bytes),
47 => ModelConvert.Decode<SetPeakValleyTime>(bytes),
49 => ModelConvert.Decode<InquireGatewaySpikesValleys>(bytes),
50 => ModelConvert.Decode<SdUpPkFtValSet>(bytes),
50 => ModelConvert.Decode<ChangeChargeModeRes>(bytes),
52 => ModelConvert.Decode<AuthVINRes>(bytes),
75 => ModelConvert.Decode<UploadModuleStatus>(bytes),
//75 => ModelConvert.Decode<UploadModuleStatus>(bytes),
80 => ModelConvert.Decode<ModuleState>(bytes),
81 => ModelConvert.Decode<RemoteSignaling>(bytes),
82 => ModelConvert.Decode<BatteryPackData>(bytes),
@ -214,7 +212,12 @@ public class Decoder : ByteToMessageDecoder
57 => ModelConvert.Decode<CscSumVolt>(bytes),
58 => ModelConvert.Decode<CscSumTemp>(bytes),
59 => ModelConvert.Decode<TimingInfo>(bytes),
60 => ModelConvert.Decode<UpBms>(bytes),
61 => ModelConvert.Decode<UpAlarm>(bytes),
62 => ModelConvert.Decode<VoltageCurrentSoc>(bytes),
65 => ModelConvert.Decode<VoltageExtremumStatistics>(bytes),
66 => ModelConvert.Decode<Detectionpointextremumdata>(bytes),
72 => ModelConvert.Decode<BasicParameter>(bytes),
81 => ModelConvert.Decode<QueryBatterySnRes>(bytes),
142 => ModelConvert.Decode<BattenergyInfo1>(bytes),
143 => ModelConvert.Decode<BattenergyInfo2>(bytes),

@ -0,0 +1,28 @@
using DotNetty.Transport.Channels;
using log4net;
using Service.Charger.Client;
using Service.Charger.Msg.Charger.Req;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Charger.Handler
{
/// <summary>
/// 3.6.2.2 充放电机上传基本参数 2PGN:0x00F802
/// </summary>
public class BasicParameterHandler : SimpleChannelInboundHandler<BasicParameter>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(BasicParameterHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, BasicParameter msg)
{
if (ClientMgr.TryGetClient(ctx.Channel, out string sn, out var client))
{
Log.Info($"receive {msg} from {sn}");
}
}
}
}

@ -0,0 +1,28 @@
using DotNetty.Transport.Channels;
using log4net;
using Service.Charger.Client;
using Service.Charger.Msg.Charger.Req;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Charger.Handler
{
/// <summary>
///
/// </summary>
public class DetectionpointextremumdataHandler : SimpleChannelInboundHandler<Detectionpointextremumdata>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(DetectionpointextremumdataHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, Detectionpointextremumdata msg)
{
if (ClientMgr.TryGetClient(ctx.Channel, out string sn, out var client))
{
Log.Info($"receive {msg} from {sn}");
}
}
}
}

@ -27,10 +27,6 @@ namespace Service.Charger.Handler
HeartBeatRes heartBeatRes = new HeartBeatRes(0);
ctx.Channel.WriteAndFlushAsync(heartBeatRes);
}
else
{
client.ChargingStatus = (int)ChargingStatus.StartChargingFailed;
}
}
}
}

@ -0,0 +1,28 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.Charger.Client;
using Service.Charger.Msg.Charger.Resp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Charger.Handler
{
[Order(8)]
[Scope("InstancePerDependency")]
public class UpAlarmHandler : SimpleChannelInboundHandler<UpAlarm>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(UpAlarmHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, UpAlarm msg)
{
if (ClientMgr.TryGetClient(ctx.Channel, out string sn, out var client))
{
Log.Info($"receive {msg} from {sn}");
}
}
}
}

@ -0,0 +1,34 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.Charger.Client;
using Service.Charger.Msg.Charger.Req;
using Service.Charger.Msg.Charger.Resp;
using Service.Charger.Msg.Host.Req;
using Service.Charger.Msg.Host.Resp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Charger.Handler
{
/// <summary>
///
/// </summary>
[Order(8)]
[Scope("InstancePerDependency")]
public class UpgradeRequestHandler : SimpleChannelInboundHandler<UpgradeRequestRes>, IBaseHandler
{
private static readonly ILog Log = LogManager.GetLogger(typeof(UpgradeRequestHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, UpgradeRequestRes msg)
{
if (ClientMgr.TryGetClient(ctx.Channel, out string sn, out var client))
{
Log.Info($"receive {msg} from {sn}");
}
}
}
}

@ -0,0 +1,29 @@
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Service.Charger.Client;
using Service.Charger.Msg.Charger.Req;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Charger.Handler
{
[Order(8)]
[Scope("InstancePerDependency")]
public class VoltageExtremumStatisticsHandler : SimpleChannelInboundHandler<VoltageExtremumStatistics>, IBaseHandler
{
private readonly ILog Log = LogManager.GetLogger(typeof(VoltageExtremumStatisticsHandler));
protected override void ChannelRead0(IChannelHandlerContext ctx, VoltageExtremumStatistics msg)
{
if (ClientMgr.TryGetClient(ctx.Channel, out string sn, out var client))
{
Log.Info($"receive {msg} from {sn}");
}
}
}
}

@ -0,0 +1,94 @@
using AutoMapper.Execution;
using HybirdFrameworkCore.Autofac.Attribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static COSXML.Model.Tag.ListBucketVersions;
namespace Service.Charger.Msg.Charger.Req
{
/// <summary>
/// 3.6.2.2 充放电机上传基本参数 2PGN:0x00F802
/// </summary>
public class BasicParameter : ASDU
{
/// <summary>
/// 记录类型
/// </summary>
[Property(0, 8)]
public byte RecordType { get; set; }
/// <summary>
/// PGN 码
/// </summary>
[Property(8, 8)]
public byte Pgn1 { get; set; }
[Property(16, 8)]
public byte Pgn2 { get; set; }
[Property(24, 8)]
public byte Pgn3 { get; set; }
/// <summary>
/// 电池编码
/// </summary>
public byte BatteryCode { get; set; }
/// <summary>
/// 产权标识
/// </summary>
public byte TitleMarke { get; set; }
/// <summary>
/// 电池成组厂商
/// </summary>
public byte Batterymanufacturers { get; set; }
/// <summary>
/// 电池成组生产日期:年
/// </summary>
public byte GroupYear { get; set; }
/// <summary>
/// 电池成组生产日期:月
/// </summary>
public byte GroupMonth { get; set; }
/// <summary>
/// 电池成组生产日期:日
/// </summary>
public byte GroupDay { get; set; }
/// <summary>
/// 电池电芯生产厂商
/// </summary>
public byte BatteryManufacturer { get; set; }
/// <summary>
/// 电池电芯生产日期:年
/// </summary>
public byte CellYear { get; set; }
/// <summary>
/// 电池电芯生产日期:月
/// </summary>
public byte CellMonth { get; set; }
/// <summary>
/// 电池电芯生产日期:日
/// </summary>
public byte CellDay { get; set; }
/// <summary>
/// 电池箱电子控制单元生产厂商
/// </summary>
public byte Manufacturer { get; set; }
/// <summary>
/// 电池箱电子控制单元硬件版本
/// </summary>
public byte HardwareVersion { get; set; }
/// <summary>
/// 电池箱电子控制单元软件版本
/// </summary>
public byte SoftwareVersion { get; set; }
/// <summary>
/// 电池包序列号
/// </summary>
public byte SerialNumber { get; set; }
/// <summary>
/// 电池包型号
/// </summary>
public byte ModelNumber { get; set; }
}
}

@ -0,0 +1,78 @@
using HybirdFrameworkCore.Autofac.Attribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Formats.Asn1.AsnWriter;
namespace Service.Charger.Msg.Charger.Req
{
/// <summary>
/// 3.6.1.5 充放电机上传温度检测点极值数据PGN:0x00F823
/// </summary>
public class Detectionpointextremumdata : ASDU
{
/// <summary>
/// 记录类型
/// </summary>
[Property(0, 8)]
public byte RecordType { get; set; }
/// <summary>
/// PGN 码
/// </summary>
[Property(8, 8)]
public byte Pgn1 { get; set; }
[Property(16, 8)]
public byte Pgn2 { get; set; }
[Property(24, 8)]
public byte Pgn3 { get; set; }
/// <summary>
/// 最高温度
/// 分辨率1℃/位,偏移量:-50℃数值范围-50℃~200℃
/// </summary>
[Property(32, 8, offset: 50)]
public int MaximumTemp { get; set; }
/// <summary>
/// 最高温度检测点编号
/// 分辨率1/位偏移量0数值范围1~250
/// </summary>
[Property(40, 8)]
public byte MaximumTempNum { get; set; }
/// <summary>
/// 最低温度
/// 分辨率1℃/位,偏移量:-50℃数值范围-50℃~200℃
/// </summary>
[Property(48, 8, offset: 50)]
public int MinimumTemp { get; set; }
/// <summary>
/// 最低温度检测点编号
/// 分辨率1℃/位偏移量0数值范围1~250
/// </summary>
[Property(56, 8, offset: 50)]
public int MinimumTempNum { get; set; }
/// <summary>
/// 连接器总正极柱温度
/// 分辨率1℃/位,偏移量:-50℃数值范围-50℃~200℃
/// </summary>
[Property(64, 8, offset: 50)]
public int PositiveTemp { get; set; }
/// <summary>
/// 连接器总负极柱温度
/// 分辨率1℃/位,偏移量:-50℃数值范围-50℃~200℃
/// </summary>
[Property(72, 8, offset: 50)]
public int NegativeTemp { get; set; }
/// <summary>
/// 单体平均温度
/// 分辨率1℃/位,偏移量:-50℃数值范围-50℃~200℃
/// </summary>
[Property(80, 8, offset: 50)]
public int MonomerMeantemp { get; set; }
/// <summary>
/// 保留
/// </summary>
[Property(88, 8)]
public byte Reserve { get; set; }
}
}

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Charger.Msg.Charger.Req
{
/// <summary>
/// 3.5.9 电池包实时数据上报(站内充电模式有电池包时周期性上传)
/// </summary>
public class RealDataReporting:ASDU
{
//TODO
/*
SOC
SOH
)
()
线()
SOC
SOH
Total
Charging
Discharge
Positive
Negative
Battery
voltage
*/
}
}

@ -3,14 +3,14 @@
namespace Service.Charger.Msg.Charger.Req
{
/// <summary>
/// 3.5.5 主动上送充电记录
/// 3.5.6 主动上送充电记录
/// </summary>
public class RecordCharge : ASDU
{
/// <summary>
/// 订单编号
/// </summary>
[Property(0, 256, PropertyReadConstant.Byte)]
[Property(0, 32, PropertyReadConstant.Byte)]
public string ChargerOrderNo { get; set; }
/// <summary>

@ -26,7 +26,7 @@ namespace Service.Charger.Msg.Charger.Req
public ushort MaxTempDetectionPointNo { get; set; }
/// <summary>
/// 最低蓄电池温度
/// 最低蓄电池温度数据分辨率1ºC/位,-50 ºC 偏移量;数据范围:-50ºC ~+200ºC
/// </summary>
[Property(40, 16, PropertyReadConstant.Bit, 1, 0, 50)]
public Int16 MinBatteryTemp { get; set; }
@ -110,82 +110,88 @@ namespace Service.Charger.Msg.Charger.Req
public Int16 ChargingInterfaceDetectionTwoTemp { get; set; }
/// <summary>
/// 充电接口温度探头 4
/// 充电接口温度探头 3
/// </summary>
[Property(232, 8, PropertyReadConstant.Bit, 1, 0, 50)]
public Int16 ChargingInterfaceDetectionTheTemp { get; set; }
/// <summary>
/// 充电接口温度探头 4
/// </summary>
[Property(232 + 8, 8, PropertyReadConstant.Bit, 1, 0, 50)]
public Int16 ChargingInterfaceDetectionFourTemp { get; set; }
/// <summary>
/// 直流电表当前电量
/// </summary>
[Property(240, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(240 + 8, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float DcMeterCurrentPower { get; set; }
/// <summary>
/// 充电电压(直流电表电压)
/// </summary>
[Property(272, 16, PropertyReadConstant.Bit, 0.1, 1)]
[Property(272 + 8, 16, PropertyReadConstant.Bit, 0.1, 1)]
public float DcMeterVoltage { get; set; }
/// <summary>
/// 充电电流(直流电表电流)
/// </summary>
[Property(288, 16, PropertyReadConstant.Bit, 0.1, 1)]
[Property(288 + 8, 16, PropertyReadConstant.Bit, 0.1, 1)]
public float DcMeterCurrent { get; set; }
/// <summary>
/// 高压采集电压
/// </summary>
[Property(304, 16, PropertyReadConstant.Bit, 0.1, 1)]
[Property(304 + 8, 16, PropertyReadConstant.Bit, 0.1, 1)]
public float HighVoltageAcquisitionVoltage { get; set; }
/// <summary>
/// 高压采集电流
/// </summary>
[Property(320, 16, PropertyReadConstant.Bit, 0.1, 1)]
[Property(320 + 8, 16, PropertyReadConstant.Bit, 0.1, 1)]
public float HighVoltageAcquisitionCurrent { get; set; }
/// <summary>
/// 桩内部温度
/// </summary>
[Property(336, 8, PropertyReadConstant.Bit, 1, 0)]
[Property(336 + 8, 8, PropertyReadConstant.Bit, 1, 0)]
public byte ChargerInsideTemp { get; set; }
/// <summary>
/// 本次充电时间
/// </summary>
[Property(344, 16)]
[Property(344 + 8, 16)]
public ushort ChargingTime { get; set; }
/// <summary>
/// 模块进风口温度
/// </summary>
[Property(360, 8)]
[Property(360 + 8, 8)]
public byte ModuleOneAirInletTemp { get; set; }
/// <summary>
/// 模块出风口温度
/// </summary>
[Property(368, 8)]
[Property(368 + 8, 8)]
public byte ModuleTwoAirInletTemp { get; set; }
/// <summary>
/// 充电模式 0站内充电 1站外充电
/// </summary>
[Property(376, 8)]
[Property(376 + 8, 8)]
public byte ChargeModel { get; set; }
/// <summary>
/// 充电启动方式 1站控启动 2本地充电
/// </summary>
[Property(384, 8)]
[Property(384 + 8, 8)]
public byte ChargingStartMethod { get; set; }
/// <summary>
/// 交流电表当前电量
/// </summary>
[Property(392, 32, PropertyReadConstant.Bit, 0.01, 2)]
[Property(392 + 8, 32, PropertyReadConstant.Bit, 0.01, 2)]
public float ACMeterCurrentBatteryValue { get; set; }
}

@ -12,31 +12,45 @@ namespace Service.Charger.Msg.Charger.Req
/// </summary>
public class VoltageCurrentSoc : ASDU
{
/// <summary>
/// 记录类型
/// </summary>
[Property(0, 8)]
public byte RecordType { get; set; }
/// <summary>
/// PGN 码
/// </summary>
[Property(8, 8)]
public byte Pgn1 { get; set; }
[Property(16, 8)]
public byte Pgn2 { get; set; }
[Property(24, 8)]
public byte Pgn3 { get; set; }
/// <summary>
/// 电压测量值 分辨率0.1V/位偏移量0V数值范围0V ~750V
/// </summary>
[Property(0, 16, scale: 0.1)]
[Property(32, 16, scale: 0.1)]
public float Voltage { get; set; }
/// <summary>
/// 电流测量值 分辨率0.05A/位,偏移量:-1600A数值范围-1600A~1612.75A
/// </summary>
[Property(16, 16, scale: 0.05, offset: 1600)]
[Property(48, 16, scale: 0.05, offset: 1600)]
public float Current { get; set; }
/// <summary>
/// 当前SOC 分辨率0.1%/位偏移量0%,数值范围 0%~100%
/// </summary>
[Property(32, 16, scale: 0.01)]
[Property(64, 16, scale: 0.1)]
public float SOC { get; set; }
/// <summary>
/// 当前SOH 分辨率1%/位偏移量0%,数值范围 0%~100%
/// </summary>
[Property(48, 8, scale: 0.01)]
[Property(80, 8, scale: 0.01)]
public float SOH { get; set; }
/// <summary>
/// 保留
/// </summary>
[Property(56, 8)]
public byte Reserve { get; set; }
///// <summary>
///// 保留
///// </summary>
//[Property(88, 8)]
//public byte Reserve { get; set; }
}
}

@ -0,0 +1,60 @@
using HybirdFrameworkCore.Autofac.Attribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Charger.Msg.Charger.Req
{
/// <summary>
/// 3.6.1.4 充放电机上传单体动力蓄电池电压极值统计PGN:0x00F822
/// </summary>
public class VoltageExtremumStatistics : ASDU
{
/// <summary>
/// 记录类型
/// </summary>
[Property(0, 8)]
public byte RecordType { get; set; }
/// <summary>
/// PGN 码
/// </summary>
[Property(8, 8)]
public byte Pgn1 { get; set; }
[Property(16, 8)]
public byte Pgn2 { get; set; }
[Property(24, 8)]
public byte Pgn3 { get; set; }
/// <summary>
/// 单体蓄电池或蓄电池模块最高电压
/// 分辨率0.01V/位偏移量0V数值范围0V ~24V
/// </summary>
[Property(32, 16, scale: 0.01)]
public float MaximumVoltage { get; set; }
/// <summary>
/// 最高电压单体蓄电池或蓄电池模块的编号
/// 分辨率1/位偏移量0数值范围
/// </summary>
[Property(48, 8)]
public float MaximumVoltageNum { get; set; }
/// <summary>
/// 单体蓄电池或蓄电池模块最低电压
/// 分辨率0.01V/位偏移量0V数值范围0V ~24V
/// </summary>
[Property(56, 16, scale: 0.01)]
public float MinimumVoltage { get; set; }
/// <summary>
/// 最低电压单体蓄电池或蓄电池模块的编号
/// 分辨率1/位偏移量0数值范围1~250
/// </summary>
[Property(72, 8)]
public float MinimumVoltageNum { get; set; }
/// <summary>
/// 单体平均电压
/// 分辨率0.01V/位偏移量0V数值范围0V ~24V
/// </summary>
[Property(80, 16)]
public float CellAverageVoltage { get; set; }
}
}

@ -1,9 +1,9 @@
using HybirdFrameworkCore.Autofac.Attribute;
namespace Service.Charger.Msg.Charger.Resp;
namespace Service.Charger.Msg.Charger.Req;
/// <summary>
/// 3.6.2.2 充放电机回复电池基本参数 2PGN:0x00F802
/// 3.6.2.3 充放电机回复电池基本参数 2PGN:0x00F802
/// </summary>
public class QueryBatterySnRes : ASDU
{
@ -19,7 +19,7 @@ public class QueryBatterySnRes : ASDU
/// <summary>
/// 电池编码 长度 0 "Do not transmit this Code"
/// </summary>
[Property(32, 1)]
[Property(32, 8)]
public byte BatterSnLength { get; set; }
/// <summary>
@ -27,7 +27,7 @@ public class QueryBatterySnRes : ASDU
/// 1 "CATL" 2 "Li Shen" 3 "MGL"
/// 4 "SAMSUN" 5 "LG" 6"EVE",7"BYD"
/// </summary>
[Property(33, 1)]
[Property(40, 8)]
public byte BatterFactory { get; set; }
/// <summary>
@ -41,6 +41,6 @@ public class QueryBatterySnRes : ASDU
/// "R"83 "S" 84 "T" 85 "U" 86 "V" 87
/// "W"88 "X" 89 "Y" 90 "Z
/// </summary>
[Property(34, 27 * 8)]
[Property(start: 48, length: 27, PropertyReadConstant.Byte)]
public byte[] BatterSnBytes { get; set; }
}

@ -0,0 +1,135 @@
using HybirdFrameworkCore.Autofac.Attribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Service.Charger.Msg.Charger.Resp
{
/// <summary>
/// 3.6.1.2 充放电机上传报警状态
/// </summary>
public class UpAlarm : ASDU
{
/// <summary>
/// 记录类型
/// </summary>
[Property(0, 8)]
public byte RecordType { get; set; }
/// <summary>
/// PGN 码
/// </summary>
[Property(8, 8)]
public byte Pgn1 { get; set; }
[Property(16, 8)]
public byte Pgn2 { get; set; }
[Property(24, 8)]
public byte Pgn3 { get; set; }
/// <summary>
/// 单体蓄电池或蓄电池模块电压越限
/// </summary>
[Property(32, 16)]
public short SingleBattery { get; set; }
/// <summary>
/// 电压偏差越限
/// </summary>
[Property(48, 16)]
public short VoltageOvershoot { get; set; }
/// <summary>
/// 温度越限
/// </summary>
[Property(64, 16)]
public short TemperatureExceedance { get; set; }
/// <summary>
/// 温度偏差越限
/// </summary>
[Property(80, 16)]
public short TemperatureDifference { get; set; }
/// <summary>
/// SOC 低
/// </summary>
[Property(96, 16)]
public short LowSOC { get; set; }
/// <summary>
/// 放电电流越限
/// </summary>
[Property(112, 16)]
public short DischargeCurrent { get; set; }
/// <summary>
/// 充电电流限
/// </summary>
[Property(128, 16)]
public short ChargingCurrentLimit { get; set; }
/// <summary>
/// 总正负极柱温度越限
/// </summary>
[Property(144, 16)]
public short TotalTemp { get; set; }
/// <summary>
/// 电池系统故障码
/// </summary>
[Property(160, 16)]
public short BatteryFaultCode { get; set; }
/// <summary>
/// 高压绝缘低
/// </summary>
[Property(176, 16)]
public short HighVoltageLow { get; set; }
/// <summary>
/// 单体蓄电池或蓄电池模块电压越极限
/// </summary>
[Property(192, 16)]
public short MonomerLimit { get; set; }
/// <summary>
/// 电压偏差越极限a
/// </summary>
[Property(200, 16)]
public short VoltageDifference { get; set; }
/// <summary>
/// 温度越极限
/// </summary>
[Property(216, 16)]
public short TemperatureOvershoot { get; set; }
/// <summary>
/// 温度偏差越极限
/// </summary>
[Property(232, 16)]
public short TempDifference { get; set; }
/// <summary>
/// SOC 极低
/// </summary>
[Property(248, 16)]
public short VeryLowSOC { get; set; }
/// <summary>
/// 放电电流越极限
/// </summary>
[Property(264, 16)]
public short DischargeCurrentLimit { get; set; }
/// <summary>
/// 充电电流越极限
/// </summary>
[Property(280, 16)]
public short ChargingCurrent { get; set; }
/// <summary>
/// 总正负极柱温度越极限
/// </summary>
[Property(296, 16)]
public short TotalTempLimit { get; set; }
/// <summary>
/// 高压绝缘极低
/// </summary>
[Property(312, 16)]
public short highVoltageInsulation { get; set; }
/// <summary>
/// 硬件故障
/// </summary>
[Property(328, 16)]
public short HardwareFailure { get; set; }
/// <summary>
/// 保留
/// </summary>
[Property(344, 16)]
public short Reserve { get; set; }
}
}

@ -21,11 +21,13 @@ namespace Service.Charger.Msg.Charger.Resp
/// <summary>
/// 应答结果
/// </summary>
[Property(8, 8)]
public byte ResponseResult { get; set; }
/// <summary>
/// 失败原因
/// </summary>
[Property(16, 8)]
public byte CauseFailure { get; set; }
}
}

@ -17,7 +17,7 @@ namespace Service.Charger.Msg.Host.Req
/// 00:无效 01:站内 02:站外
/// </summary>
[Property(8, 16)]
public byte ChargeMode { get; set; }
public short ChargeMode { get; set; }
public ChangeChargeMode(byte chargeMode)
{

@ -2,9 +2,6 @@
namespace Service.Charger.Msg.Host.Req
{
/// <summary>
/// 3.5.7 站控查询监控网关尖峰平谷设置
/// </summary>
public class InquireGatewaySpikesValleys : ASDU
{
/// <summary>

@ -2,7 +2,7 @@
"ConnectionStrings": {
"ConfigId": "master",
"DbType": "MySql",
"SqlConnection": "server=127.0.0.1;Port=3306;Database=huanneng_dev;Uid=root;Pwd=anyixing2023!@#;Charset=utf8"
"SqlConnection": "server=127.0.0.1;Port=3306;Database=huanneng_dev;Uid=root;Pwd=anyixing2023!@#;Charset=utf8;"
},
"Update": {
"AutoUpdate": "false",

@ -23,7 +23,7 @@ public partial class Form2 : Form
{
this.txtIp.Text = @"172.0.30.13";
this.txtPort.Text = @"2408";
this.txtDestAddr.Text = @"03,01,01,02";
this.txtDestAddr.Text = @"04,00,00,16";
this.grpCmd.Enabled = false;
this.grpData.Enabled = false;

Loading…
Cancel
Save