diff --git a/src/GBNewEnergy.Protocol/NEProperties/NEControlProperty.cs b/src/GBNewEnergy.Protocol/NEProperties/NEControlProperty.cs index 7ebd502..bab00e7 100644 --- a/src/GBNewEnergy.Protocol/NEProperties/NEControlProperty.cs +++ b/src/GBNewEnergy.Protocol/NEProperties/NEControlProperty.cs @@ -11,8 +11,8 @@ namespace GBNewEnergy.Protocol.NEProperties public class NEControlProperty : INEProperties { public string VIN { get; set ; } - /// - /// 命令ID 只能发送一个 + /// + /// 命令ID 只能发送一个 /// public NEControlCmd CmdID { get; set; } /// diff --git a/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadDrivenElectricalProperty.cs b/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadDrivenElectricalProperty.cs new file mode 100644 index 0000000..1d84b91 --- /dev/null +++ b/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadDrivenElectricalProperty.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Text; +using GBNewEnergy.Protocol.Enums; + +namespace GBNewEnergy.Protocol.NEProperties.NEUploadProperties +{ + /// + /// 驱动电机数据 + /// + public class NEUploadDrivenElectricalProperty : NEUploadPropertyBase + { + public override NEInfoType NEInfoType => NEInfoType.驱动电机数据; + + /// + /// 电机个数 + /// + public byte ElectricalCount; + /// + /// 电机信息集合 + /// + public IEnumerable ElectricalList { get; set; } + } + + /// + /// 电机信息 + /// + public class ElectricalInfo + { + /// + /// 电机序号 + /// + public byte ElNo { get; set; } + /// + /// 电机状态 + /// + public byte ElStatus { get; set; } + /// + /// 电机控制器温度 + /// + public int ElControlTemp { get; set; } + /// + /// 电机转速 + /// + public int ElSpeed { get; set; } + /// + /// 电机转矩 + /// + public double ElTorque { get; set; } + /// + /// 电机温度 + /// + public int ElTemp { get; set; } + /// + /// 电机电压 + /// + public double ElVoltage { get; set; } + /// + /// 电机母线电流 + /// + public double ElCurrent { get; set; } + } +} diff --git a/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadProperty.cs b/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadProperty.cs new file mode 100644 index 0000000..17fdfc9 --- /dev/null +++ b/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadProperty.cs @@ -0,0 +1,17 @@ +using GBNewEnergy.Protocol.Enums; +using System; +using System.Collections.Generic; +using System.Text; + +namespace GBNewEnergy.Protocol.NEProperties.NEUploadProperties +{ + /// + /// 上报信息 + /// + public class NEUploadProperty : INEProperties + { + public string VIN { get ; set; } + + + } +} diff --git a/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadPropertyBase.cs b/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadPropertyBase.cs new file mode 100644 index 0000000..97df227 --- /dev/null +++ b/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadPropertyBase.cs @@ -0,0 +1,12 @@ +using GBNewEnergy.Protocol.Enums; +using System; +using System.Collections.Generic; +using System.Text; + +namespace GBNewEnergy.Protocol.NEProperties.NEUploadProperties +{ + public abstract class NEUploadPropertyBase + { + public abstract NEInfoType NEInfoType { get; } + } +} diff --git a/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadVehicleProperty.cs b/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadVehicleProperty.cs new file mode 100644 index 0000000..b01a676 --- /dev/null +++ b/src/GBNewEnergy.Protocol/NEProperties/NEUploadProperties/NEUploadVehicleProperty.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Text; +using GBNewEnergy.Protocol.Enums; + +namespace GBNewEnergy.Protocol.NEProperties.NEUploadProperties +{ + /// + /// 整车数据 + /// + public class NEUploadVehicleProperty : NEUploadPropertyBase + { + public override NEInfoType NEInfoType => NEInfoType.整车数据; + + /// + /// 车辆状态 + /// + public byte CarStatus { get; set; } + /// + /// 充放电状态 + /// + public byte ChargeStatus { get; set; } + /// + /// 运行模式 + /// + public byte OperationMode { get; set; } + /// + /// 车速 + /// + public double Speed { get; set; } + /// + /// 当前里程 + /// + public double Dis { get; set; } + /// + /// 总里程 + /// + public double TotalDis { get; set; } + /// + /// 总电压 + /// + public double TotalVoltage { get; set; } + /// + /// 总电流 + /// + public double TotalTemp { get; set; } + /// + /// SOC + /// + public byte soc { get; set; } + /// + /// DC-DC 状态 + /// + public byte DCStatus { get; set; } + /// + /// 档位 + /// + public byte Stall { get; set; } + /// + /// 加速踏板行程值 + /// + public byte Accelerator { get; set; } + /// + /// 制动踏板状态 + /// + public byte Brakes { get; set; } + /// + /// 绝缘电阻 + /// + public int Resistance { get; set; } + } +}