From 2180a4a5f595e3dfa9eddc9941ac7f8e338be879 Mon Sep 17 00:00:00 2001 From: lxw Date: Fri, 15 Nov 2024 17:48:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E7=94=B5=E6=9C=BA=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Dto/Resp/BatteryBaseInfoResp.cs | 6 ++-- Service/Charger/Msg/Charger/Req/Login.cs | 36 +++++++++---------- Service/Charger/Msg/Charger/Req/VehicleVIN.cs | 7 ++++ .../Msg/Charger/Resp/BatteryBaseInfo.cs | 26 ++++++++------ 4 files changed, 45 insertions(+), 30 deletions(-) diff --git a/Entity/Dto/Resp/BatteryBaseInfoResp.cs b/Entity/Dto/Resp/BatteryBaseInfoResp.cs index d2ad9a6..9ecb066 100644 --- a/Entity/Dto/Resp/BatteryBaseInfoResp.cs +++ b/Entity/Dto/Resp/BatteryBaseInfoResp.cs @@ -5,8 +5,10 @@ /// public class BatteryBaseInfoResp { - public string Pgn { get; set; } - + /// + /// 电池编码 + /// + public string BatteryNo { get; set; } /// /// 电池包额定量度 /// diff --git a/Service/Charger/Msg/Charger/Req/Login.cs b/Service/Charger/Msg/Charger/Req/Login.cs index 89e6182..9f6f060 100644 --- a/Service/Charger/Msg/Charger/Req/Login.cs +++ b/Service/Charger/Msg/Charger/Req/Login.cs @@ -16,73 +16,73 @@ namespace Service.Charger.Msg.Charger.Req /// /// 监控网关编号 /// - [Property(8, 16)] - public UInt16 GatewayNo { get; set; } + [Property(8, 8*16)] + public String GatewayNo { get; set; } /// /// 设备属性 /// - [Property(24, 8)] + [Property(24+14*8, 8)] public byte EquipType { get; set; } /// /// 通讯协议版本 /// - [Property(32, 8)] public byte ConnProtocolVersion0 { get; set; } - [Property(40, 8)] public byte ConnProtocolVersion1 { get; set; } - [Property(48, 8)] public byte ConnProtocolVersion2 { get; set; } + [Property(32+14*8, 8)] public byte ConnProtocolVersion0 { get; set; } + [Property(40+14*8, 8)] public byte ConnProtocolVersion1 { get; set; } + [Property(48+14*8, 8)] public byte ConnProtocolVersion2 { get; set; } public string ConnProtocolVersion { get; set; } /// /// 充电控制器硬件版本号 /// - [Property(56, 8)] public byte ControllerHardwareVersion0 { get; set; } - [Property(64, 8)] public byte ControllerHardwareVersion1 { get; set; } - [Property(72, 8)] public byte ControllerHardwareVersion2 { get; set; } + [Property(56+14*8, 8)] public byte ControllerHardwareVersion0 { get; set; } + [Property(64+14*8, 8)] public byte ControllerHardwareVersion1 { get; set; } + [Property(72+14*8, 8)] public byte ControllerHardwareVersion2 { get; set; } public string ControllerHardwareVersion { get; set; } /// /// 充电控制器软件版本 /// - [Property(80, 8)] public byte ControllerSoftwareVersion0 { get; set; } - [Property(88, 8)] public byte ControllerSoftwareVersion1 { get; set; } - [Property(96, 8)] public byte ControllerSoftwareVersion2 { get; set; } + [Property(80+14*8, 8)] public byte ControllerSoftwareVersion0 { get; set; } + [Property(88+14*8, 8)] public byte ControllerSoftwareVersion1 { get; set; } + [Property(96+14*8, 8)] public byte ControllerSoftwareVersion2 { get; set; } public string ControllerSoftwareVersion { get; set; } /// /// 充电枪口数目 /// - [Property(104, 8)] + [Property(104+14*8, 8)] public byte GunNum { get; set; } /// /// 充电模块数目 /// - [Property(112, 8)] + [Property(112+14*8, 8)] public byte GunModuleNum { get; set; } /// /// 额定功率 /// - [Property(128, 16)] + [Property(128+14*8, 16)] public ushort RatedPower { get; set; } /// /// 当前功率 /// - [Property(136, 8)] + [Property(136+14*8, 8)] public byte CurrentPower { get; set; } /// /// 当前速率 /// - [Property(144, 8)] + [Property(144+14*8, 8)] public byte CurrentSpeed { get; set; } /// /// 分流器量程 /// - [Property(152, 16)] + [Property(152+14*8, 16)] public ushort DiverterRange { get; set; } } } \ No newline at end of file diff --git a/Service/Charger/Msg/Charger/Req/VehicleVIN.cs b/Service/Charger/Msg/Charger/Req/VehicleVIN.cs index bf10f62..321d8db 100644 --- a/Service/Charger/Msg/Charger/Req/VehicleVIN.cs +++ b/Service/Charger/Msg/Charger/Req/VehicleVIN.cs @@ -22,5 +22,12 @@ namespace Service.Charger.Msg.Charger.Req /// [Property(8, 17, type: PropertyReadConstant.Byte)] public string Vin { get; set; } + + + /// + /// VIN + /// + [Property(8+17*8, 1, type: PropertyReadConstant.Byte)] + public byte GunNo { get; set; } } } diff --git a/Service/Charger/Msg/Charger/Resp/BatteryBaseInfo.cs b/Service/Charger/Msg/Charger/Resp/BatteryBaseInfo.cs index 7f8ede9..2edc2af 100644 --- a/Service/Charger/Msg/Charger/Resp/BatteryBaseInfo.cs +++ b/Service/Charger/Msg/Charger/Resp/BatteryBaseInfo.cs @@ -7,47 +7,53 @@ namespace Service.Charger.Msg.Charger.Resp; /// public class BatteryBaseInfo: ASDU { - [Property(0, 24)] - public string Pgn { get; set; } + /// + /// 记录类型 + /// + [Property(0, 8)] + public byte RecordType { get; set; } + + [Property(8, 8*16)] + public string BatteryNo { get; set; } /// /// 电池包额定量度 /// - [Property(0, 16)] + [Property(0+8*17, 16)] public byte RatedMeasurement{get;set;} /// /// 电池包额定电压 /// - [Property(16, 16)] + [Property(16+8*17, 16)] public byte PackVoltage{get;set;} /// /// 电池包额定总能量 /// - [Property(32, 16)] + [Property(32+8*17, 16)] public byte RatedBatteryPack{get;set;} /// /// 电池冷却方式 /// - [Property(48, 8)] + [Property(48+8*17, 8)] public byte BatteryCoolingSystem{get;set;} /// /// 电池类型 /// - [Property(56, 8)] + [Property(56+8*17, 8)] public byte BatteryType{get;set;} /// /// 电池系统中 CSC总的数目(电池监控单元数目) /// - [Property(64, 8)] + [Property(64+8*17, 8)] public byte BatteryCSCSNumber{get;set;} /// /// PACK 中单体电芯的总数目 /// - [Property(72, 16)] + [Property(72+8*17, 16)] public byte PACKNumber{get;set;} /// /// PACK 中电芯温度点(探针)的总数目 /// - [Property(88, 16)] + [Property(88+8*17, 16)] public byte PACKTemperatureNumber{get;set;} } \ No newline at end of file