@@ -0,0 +1,20 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Enums | |||||
{ | |||||
public enum JT808_JTActiveSafety_0x0900_Type : byte | |||||
{ | |||||
/// <summary> | |||||
/// 状态查询 | |||||
/// 外设状态信息:外设工作状态、设备报警信息 | |||||
/// </summary> | |||||
QueryState = 0xF7, | |||||
/// <summary> | |||||
/// 信息查询 | |||||
/// 外设传感器的基本信息:公司信息、产品代码、版本号、外设ID、客户代码。 | |||||
/// </summary> | |||||
QueryInfomation = 0xF8 | |||||
} | |||||
} |
@@ -0,0 +1,14 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Enums | |||||
{ | |||||
public enum USBIDType:byte | |||||
{ | |||||
ADAS=0x64, | |||||
DSM=0x65, | |||||
TPMS=0x66, | |||||
BSD=0x67 | |||||
} | |||||
} |
@@ -0,0 +1,34 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Enums; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Extensions | |||||
{ | |||||
#warning 由于透传消息类型没有向下传递导致下面获取不到,先用这种方式临时处理 | |||||
public static class JT808_JTActiveSafety_0x0900_USBMessageExtensions | |||||
{ | |||||
/// <summary> | |||||
/// 解析透传对象扩展 | |||||
/// </summary> | |||||
/// <param name="jT808_JTActiveSafety_0X0900_USBMessage"></param> | |||||
/// <param name="jT808_JTActiveSafety_0X0900_Type"></param> | |||||
public static void ParseObject(this JT808_JTActiveSafety_0x0900_USBMessage jT808_JTActiveSafety_0X0900_USBMessage, JT808_JTActiveSafety_0x0900_Type jT808_JTActiveSafety_0X0900_Type) | |||||
{ | |||||
switch(jT808_JTActiveSafety_0X0900_Type) | |||||
{ | |||||
case JT808_JTActiveSafety_0x0900_Type.QueryState: | |||||
JT808MessagePackReader QueryStateMessagePackReader = new JT808MessagePackReader(jT808_JTActiveSafety_0X0900_USBMessage.MessageContent); | |||||
jT808_JTActiveSafety_0X0900_USBMessage.MessageContentObejct=JT808_JTActiveSafety_0x0900_USB_0xF7_Formatter.Instance.Deserialize(ref QueryStateMessagePackReader, null); | |||||
break; | |||||
case JT808_JTActiveSafety_0x0900_Type.QueryInfomation: | |||||
JT808MessagePackReader QueryInfomationMessagePackReader = new JT808MessagePackReader(jT808_JTActiveSafety_0X0900_USBMessage.MessageContent); | |||||
jT808_JTActiveSafety_0X0900_USBMessage.MessageContentObejct = JT808_JTActiveSafety_0x0900_USB_0xF7_Formatter.Instance.Deserialize(ref QueryInfomationMessagePackReader, null); | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,117 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Formatters | |||||
{ | |||||
public class JT808_0x8103_0xF364_Formatter : IJT808MessagePackFormatter<JT808_0x8103_0xF364> | |||||
{ | |||||
public JT808_0x8103_0xF364 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_0x8103_0xF364 jT808_0X8103_0XF364 = new JT808_0x8103_0xF364(); | |||||
jT808_0X8103_0XF364.ParamId = reader.ReadUInt32(); | |||||
jT808_0X8103_0XF364.ParamLength = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.AlarmJudgeSpeedThreshold= reader.ReadByte(); | |||||
jT808_0X8103_0XF364.WarningVolume = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.ActivePhotographyStrategy = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.ActivelyTimePhotoInterval = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF364.ActiveDistancePhotographyDistanceInterval = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF364.SingleInitiativePhotos = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.SingleInitiativePhotosInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.PhotoResolution = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VideoRecordingResolution = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.AlarmEnable = reader.ReadUInt32(); | |||||
jT808_0X8103_0XF364.EventEnable = reader.ReadUInt32(); | |||||
jT808_0X8103_0XF364.Placeholder1 = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.DistanceThresholdObstacleAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.HierarchicalSpeedThresholdObstacleAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VideoRecordingTimeBeforeAndAfterObstacleAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.BarrierAlarmPhotographs = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.ObstacleAlarmInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.FrequentChannelChangeAlarmJudgmentTimePeriod = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.FrequentAlarmJudgmentNumberChannelChange = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.HierarchicalSpeedThresholdFrequentChannelChangeAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VideoRecordingTimeBeforeAndAfterFrequentLaneChangeAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.FrequentChannelChangeAlarmPhotos = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.FrequentLaneChangeAlarmInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.GradedSpeedThresholdLaneDeviationAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VideoRecordingTimeBeforeAndAfterLaneDepartureAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.LaneDepartureAlarmPhoto = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.LaneDepartureAlarmPhotoInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.ForwardCollisionWarningTimeThreshold = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.HierarchicalSpeedThresholdForwardCollisionWarning = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VideoRecordingTimeBeforeAndAfterForwardCollisionAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.ForwardCollisionAlarmPhotographs = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.ForwardCollisionAlarmInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.PedestrianCollisionAlarmTimeThreshold = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.PedestrianCollisionAlarmEnablingSpeedThreshold = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VideoRecordingTimeBeforeAndAfterPedestrianCollisionAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.PedestrianCollisionAlarmPhotos = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.PedestrianCollisionAlarmInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VehicleDistanceMonitoringAlarmDistanceThreshold = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VehicleDistanceMonitoringAndAlarmClassificationSpeedThreshold = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.VideoRecordingTimeBeforeAndAfterAlarmVehicleProximity = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.AlarmPhotoVehicleCloseDistance = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.AlarmPhotoVehicleCloseDistanceInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.RoadSignRecognitionPhotographs = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.RoadSignRecognitionPhotographsInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF364.Placeholder2 = reader.ReadArray(4).ToArray(); | |||||
return jT808_0X8103_0XF364; | |||||
} | |||||
public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF364 value, IJT808Config config) | |||||
{ | |||||
writer.WriteUInt32(value.ParamId); | |||||
writer.Skip(1,out int ParamLengthPosition); | |||||
writer.WriteByte(value.AlarmJudgeSpeedThreshold); | |||||
writer.WriteByte(value.WarningVolume); | |||||
writer.WriteByte(value.ActivePhotographyStrategy); | |||||
writer.WriteUInt16(value.ActivelyTimePhotoInterval); | |||||
writer.WriteUInt16(value.ActiveDistancePhotographyDistanceInterval); | |||||
writer.WriteByte(value.SingleInitiativePhotos); | |||||
writer.WriteByte(value.SingleInitiativePhotosInterval); | |||||
writer.WriteByte(value.PhotoResolution); | |||||
writer.WriteByte(value.VideoRecordingResolution); | |||||
writer.WriteUInt32(value.AlarmEnable); | |||||
writer.WriteUInt32(value.EventEnable); | |||||
writer.WriteByte(value.Placeholder1); | |||||
writer.WriteByte(value.DistanceThresholdObstacleAlarm); | |||||
writer.WriteByte(value.HierarchicalSpeedThresholdObstacleAlarm); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterObstacleAlarm); | |||||
writer.WriteByte(value.BarrierAlarmPhotographs); | |||||
writer.WriteByte(value.ObstacleAlarmInterval); | |||||
writer.WriteByte(value.FrequentChannelChangeAlarmJudgmentTimePeriod); | |||||
writer.WriteByte(value.FrequentAlarmJudgmentNumberChannelChange); | |||||
writer.WriteByte(value.HierarchicalSpeedThresholdFrequentChannelChangeAlarm); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterFrequentLaneChangeAlarm); | |||||
writer.WriteByte(value.FrequentChannelChangeAlarmPhotos); | |||||
writer.WriteByte(value.FrequentLaneChangeAlarmInterval); | |||||
writer.WriteByte(value.GradedSpeedThresholdLaneDeviationAlarm); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterLaneDepartureAlarm); | |||||
writer.WriteByte(value.LaneDepartureAlarmPhoto); | |||||
writer.WriteByte(value.LaneDepartureAlarmPhotoInterval); | |||||
writer.WriteByte(value.ForwardCollisionWarningTimeThreshold); | |||||
writer.WriteByte(value.HierarchicalSpeedThresholdForwardCollisionWarning); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterForwardCollisionAlarm); | |||||
writer.WriteByte(value.ForwardCollisionAlarmPhotographs); | |||||
writer.WriteByte(value.ForwardCollisionAlarmInterval); | |||||
writer.WriteByte(value.PedestrianCollisionAlarmTimeThreshold); | |||||
writer.WriteByte(value.PedestrianCollisionAlarmEnablingSpeedThreshold); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterPedestrianCollisionAlarm); | |||||
writer.WriteByte(value.PedestrianCollisionAlarmPhotos); | |||||
writer.WriteByte(value.PedestrianCollisionAlarmInterval); | |||||
writer.WriteByte(value.VehicleDistanceMonitoringAlarmDistanceThreshold); | |||||
writer.WriteByte(value.VehicleDistanceMonitoringAndAlarmClassificationSpeedThreshold); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterAlarmVehicleProximity); | |||||
writer.WriteByte(value.AlarmPhotoVehicleCloseDistance); | |||||
writer.WriteByte(value.AlarmPhotoVehicleCloseDistanceInterval); | |||||
writer.WriteByte(value.RoadSignRecognitionPhotographs); | |||||
writer.WriteByte(value.RoadSignRecognitionPhotographsInterval); | |||||
writer.WriteArray(value.Placeholder2); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - ParamLengthPosition - 1), ParamLengthPosition); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,95 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Formatters | |||||
{ | |||||
public class JT808_0x8103_0xF365_Formatter : IJT808MessagePackFormatter<JT808_0x8103_0xF365> | |||||
{ | |||||
public JT808_0x8103_0xF365 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_0x8103_0xF365 jT808_0X8103_0XF365 = new JT808_0x8103_0xF365(); | |||||
jT808_0X8103_0XF365.ParamId = reader.ReadUInt32(); | |||||
jT808_0X8103_0XF365.ParamLength = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.AlarmJudgeSpeedThreshold = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.WarningVolume = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.ActivePhotographyStrategy = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.ActivelyTimePhotoInterval = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF365.ActiveDistancePhotographyDistanceInterval = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF365.SingleInitiativePhotos = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.SingleInitiativePhotosInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.PhotoResolution = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.VideoRecordingResolution = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.AlarmEnable = reader.ReadUInt32(); | |||||
jT808_0X8103_0XF365.EventEnable = reader.ReadUInt32(); | |||||
jT808_0X8103_0XF365.TimeIntervalSmokingAlarmJudgment = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF365.CallAlarmDetermineTimeInterval = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF365.Reserve = reader.ReadArray(3).ToArray(); | |||||
jT808_0X8103_0XF365.GradedSpeedThresholdFatigueDrivingAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.VideoRecordingTimeBeforeAndAfterFatigueDrivingAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.FatigueDrivingAlarmPhotograph = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.FatigueDrivingAlarmPhotographInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.ClassifiedSpeedThresholdCallAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.VideoRecordingTimeBeforeAndAfterCallAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.CallAlarmTakePicturesDriverFacialFeatures = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.CallAlarmTakePicturesDriverFacialFeaturesInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.ClassifiedSpeedThresholdSmokingAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.VideoRecordingTimeBeforeAndAfterSmokingAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.SmokingAlarmPhotographsDriverFaceCharacteristics = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.SmokingAlarmPhotographsDriverFaceCharacteristicsInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.ClassifiedSpeedThresholdDistractedDrivingAlarm = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.DistractedDrivingAlarmPhotography = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.DistractedDrivingAlarmPhotographyInterval = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.VideoRecordingTimeAbnormalDrivingBehavior = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.PhotographsAbnormalDrivingBehavior = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.PictureIntervalAbnormalDrivingBehavior = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.DriverIdentificationTrigger = reader.ReadByte(); | |||||
jT808_0X8103_0XF365.Retain = reader.ReadArray(reader.ReadCurrentRemainContentLength()).ToArray(); | |||||
return jT808_0X8103_0XF365; | |||||
} | |||||
public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF365 value, IJT808Config config) | |||||
{ | |||||
writer.WriteUInt32(value.ParamId); | |||||
writer.Skip(1, out int ParamLengthPosition); | |||||
writer.WriteByte(value.AlarmJudgeSpeedThreshold); | |||||
writer.WriteByte(value.WarningVolume); | |||||
writer.WriteByte(value.ActivePhotographyStrategy); | |||||
writer.WriteUInt16(value.ActivelyTimePhotoInterval); | |||||
writer.WriteUInt16(value.ActiveDistancePhotographyDistanceInterval); | |||||
writer.WriteByte(value.SingleInitiativePhotos); | |||||
writer.WriteByte(value.SingleInitiativePhotosInterval); | |||||
writer.WriteByte(value.PhotoResolution); | |||||
writer.WriteByte(value.VideoRecordingResolution); | |||||
writer.WriteUInt32(value.AlarmEnable); | |||||
writer.WriteUInt32(value.EventEnable); | |||||
writer.WriteUInt16(value.TimeIntervalSmokingAlarmJudgment); | |||||
writer.WriteUInt16(value.CallAlarmDetermineTimeInterval); | |||||
writer.WriteArray(value.Reserve); | |||||
writer.WriteByte(value.GradedSpeedThresholdFatigueDrivingAlarm); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterFatigueDrivingAlarm); | |||||
writer.WriteByte(value.FatigueDrivingAlarmPhotograph); | |||||
writer.WriteByte(value.FatigueDrivingAlarmPhotographInterval); | |||||
writer.WriteByte(value.ClassifiedSpeedThresholdCallAlarm); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterCallAlarm); | |||||
writer.WriteByte(value.CallAlarmTakePicturesDriverFacialFeatures); | |||||
writer.WriteByte(value.CallAlarmTakePicturesDriverFacialFeaturesInterval); | |||||
writer.WriteByte(value.ClassifiedSpeedThresholdSmokingAlarm); | |||||
writer.WriteByte(value.VideoRecordingTimeBeforeAndAfterSmokingAlarm); | |||||
writer.WriteByte(value.SmokingAlarmPhotographsDriverFaceCharacteristics); | |||||
writer.WriteByte(value.SmokingAlarmPhotographsDriverFaceCharacteristicsInterval); | |||||
writer.WriteByte(value.ClassifiedSpeedThresholdDistractedDrivingAlarm); | |||||
writer.WriteByte(value.DistractedDrivingAlarmPhotography); | |||||
writer.WriteByte(value.DistractedDrivingAlarmPhotographyInterval); | |||||
writer.WriteByte(value.VideoRecordingTimeAbnormalDrivingBehavior); | |||||
writer.WriteByte(value.PhotographsAbnormalDrivingBehavior); | |||||
writer.WriteByte(value.PictureIntervalAbnormalDrivingBehavior); | |||||
writer.WriteByte(value.DriverIdentificationTrigger); | |||||
writer.WriteArray(value.Retain); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - ParamLengthPosition - 1), ParamLengthPosition); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,49 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Formatters | |||||
{ | |||||
public class JT808_0x8103_0xF366_Formatter : IJT808MessagePackFormatter<JT808_0x8103_0xF366> | |||||
{ | |||||
public JT808_0x8103_0xF366 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_0x8103_0xF366 jT808_0X8103_0XF366 = new JT808_0x8103_0xF366(); | |||||
jT808_0X8103_0XF366.ParamId = reader.ReadUInt32(); | |||||
jT808_0X8103_0XF366.ParamLength = reader.ReadByte(); | |||||
jT808_0X8103_0XF366.TyreSpecificationType= reader.ReadString(12); | |||||
jT808_0X8103_0XF366.TyrePressureUnit = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.NormalFetalPressure = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.ThresholdUnbalancedTirePressure = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.SlowLeakageThreshold = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.LowVoltageThreshold = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.HighVoltageThreshold = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.HighTemperatureThreshold = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.VoltageThreshold = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.TimedReportingInterval = reader.ReadUInt16(); | |||||
jT808_0X8103_0XF366.Retain = reader.ReadArray(reader.ReadCurrentRemainContentLength()).ToArray(); | |||||
return jT808_0X8103_0XF366; | |||||
} | |||||
public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF366 value, IJT808Config config) | |||||
{ | |||||
writer.WriteUInt32(value.ParamId); | |||||
writer.Skip(1, out int ParamLengthPosition); | |||||
writer.WriteString(value.TyreSpecificationType); | |||||
writer.WriteUInt16(value.TyrePressureUnit); | |||||
writer.WriteUInt16(value.NormalFetalPressure); | |||||
writer.WriteUInt16(value.ThresholdUnbalancedTirePressure); | |||||
writer.WriteUInt16(value.SlowLeakageThreshold); | |||||
writer.WriteUInt16(value.LowVoltageThreshold); | |||||
writer.WriteUInt16(value.HighVoltageThreshold); | |||||
writer.WriteUInt16(value.HighTemperatureThreshold); | |||||
writer.WriteUInt16(value.VoltageThreshold); | |||||
writer.WriteUInt16(value.TimedReportingInterval); | |||||
writer.WriteArray(value.Retain); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - ParamLengthPosition - 1), ParamLengthPosition); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,30 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Formatters | |||||
{ | |||||
public class JT808_0x8103_0xF367_Formatter : IJT808MessagePackFormatter<JT808_0x8103_0xF367> | |||||
{ | |||||
public JT808_0x8103_0xF367 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_0x8103_0xF367 jT808_0X8103_0XF367 = new JT808_0x8103_0xF367(); | |||||
jT808_0X8103_0XF367.ParamId = reader.ReadUInt32(); | |||||
jT808_0X8103_0XF367.ParamLength = reader.ReadByte(); | |||||
jT808_0X8103_0XF367.RearApproachAlarmTimeThreshold = reader.ReadByte(); | |||||
jT808_0X8103_0XF367.LateralRearApproachAlarmTimeThreshold = reader.ReadByte(); | |||||
return jT808_0X8103_0XF367; | |||||
} | |||||
public void Serialize(ref JT808MessagePackWriter writer, JT808_0x8103_0xF367 value, IJT808Config config) | |||||
{ | |||||
writer.WriteUInt32(value.ParamId); | |||||
writer.WriteByte(2); | |||||
writer.WriteByte(value.RearApproachAlarmTimeThreshold); | |||||
writer.WriteByte(value.LateralRearApproachAlarmTimeThreshold); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,56 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Enums; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Formatters | |||||
{ | |||||
public class JT808_JTActiveSafety_0x0900_Formatter : IJT808MessagePackFormatter<JT808_JTActiveSafety_0x0900> | |||||
{ | |||||
public JT808_JTActiveSafety_0x0900 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_JTActiveSafety_0x0900 jT808_JTActiveSafety_0X0900 = new JT808_JTActiveSafety_0x0900(); | |||||
jT808_JTActiveSafety_0X0900.USBMessageCount = reader.ReadByte(); | |||||
if (jT808_JTActiveSafety_0X0900.USBMessageCount > 0) | |||||
{ | |||||
jT808_JTActiveSafety_0X0900.USBMessages = new List<JT808_JTActiveSafety_0x0900_USBMessage>(); | |||||
for (int i = 0; i < jT808_JTActiveSafety_0X0900.USBMessageCount; i++) | |||||
{ | |||||
JT808_JTActiveSafety_0x0900_USBMessage jT808_JTActiveSafety_0X0900_USBMessage = new JT808_JTActiveSafety_0x0900_USBMessage(); | |||||
jT808_JTActiveSafety_0X0900_USBMessage.USBID= reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USBMessage.MessageLength = reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USBMessage.MessageContent = reader.ReadArray(jT808_JTActiveSafety_0X0900_USBMessage.MessageLength).ToArray(); | |||||
jT808_JTActiveSafety_0X0900.USBMessages.Add(jT808_JTActiveSafety_0X0900_USBMessage); | |||||
} | |||||
} | |||||
return jT808_JTActiveSafety_0X0900; | |||||
} | |||||
public void Serialize(ref JT808MessagePackWriter writer, JT808_JTActiveSafety_0x0900 value, IJT808Config config) | |||||
{ | |||||
if(value.USBMessages!=null && value.USBMessages.Count>0) | |||||
{ | |||||
writer.WriteByte((byte)value.USBMessages.Count); | |||||
foreach(var item in value.USBMessages) | |||||
{ | |||||
writer.WriteByte(item.USBID); | |||||
if(item.MessageContent!=null&& item.MessageContent.Length > 0) | |||||
{ | |||||
writer.WriteByte((byte)item.MessageContent.Length); | |||||
writer.WriteArray(item.MessageContent); | |||||
} | |||||
else if (item.MessageContentObejct != null) | |||||
{ | |||||
writer.Skip(1,out int MessageContentLengthPosition); | |||||
object obj = config.GetMessagePackFormatterByType(item.MessageContentObejct.GetType()); | |||||
JT808MessagePackFormatterResolverExtensions.JT808DynamicSerialize(obj, ref writer, item.MessageContentObejct, config); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - MessageContentLengthPosition - 1), MessageContentLengthPosition); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,27 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Formatters | |||||
{ | |||||
public class JT808_JTActiveSafety_0x0900_USB_0xF7_Formatter : IJT808MessagePackFormatter<JT808_JTActiveSafety_0x0900_USB_0xF7> | |||||
{ | |||||
public readonly static JT808_JTActiveSafety_0x0900_USB_0xF7_Formatter Instance = new JT808_JTActiveSafety_0x0900_USB_0xF7_Formatter(); | |||||
public JT808_JTActiveSafety_0x0900_USB_0xF7 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_JTActiveSafety_0x0900_USB_0xF7 jT808_JTActiveSafety_0X0900_USB_0XF7 = new JT808_JTActiveSafety_0x0900_USB_0xF7(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF7.WorkingCondition = reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF7.AlarmStatus = reader.ReadUInt32(); | |||||
return jT808_JTActiveSafety_0X0900_USB_0XF7; | |||||
} | |||||
public void Serialize(ref JT808MessagePackWriter writer, JT808_JTActiveSafety_0x0900_USB_0xF7 value, IJT808Config config) | |||||
{ | |||||
writer.WriteByte(value.WorkingCondition); | |||||
writer.WriteUInt32(value.AlarmStatus); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,58 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Formatters | |||||
{ | |||||
public class JT808_JTActiveSafety_0x0900_USB_0xF8_Formatter : IJT808MessagePackFormatter<JT808_JTActiveSafety_0x0900_USB_0xF8> | |||||
{ | |||||
public readonly static JT808_JTActiveSafety_0x0900_USB_0xF8_Formatter Instance = new JT808_JTActiveSafety_0x0900_USB_0xF8_Formatter(); | |||||
public JT808_JTActiveSafety_0x0900_USB_0xF8 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_JTActiveSafety_0x0900_USB_0xF8 jT808_JTActiveSafety_0X0900_USB_0XF8 = new JT808_JTActiveSafety_0x0900_USB_0xF8(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.CompantNameLength = reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.CompantName = reader.ReadString(jT808_JTActiveSafety_0X0900_USB_0XF8.CompantNameLength); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.ProductModelLength = reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.ProductModel = reader.ReadString(jT808_JTActiveSafety_0X0900_USB_0XF8.ProductModelLength); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.HardwareVersionNumberLength = reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.HardwareVersionNumber = reader.ReadString(jT808_JTActiveSafety_0X0900_USB_0XF8.HardwareVersionNumberLength); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.SoftwareVersionNumberLength = reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.SoftwareVersionNumber = reader.ReadString(jT808_JTActiveSafety_0X0900_USB_0XF8.SoftwareVersionNumberLength); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.DevicesIDLength = reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.DevicesID = reader.ReadString(jT808_JTActiveSafety_0X0900_USB_0XF8.DevicesIDLength); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.CustomerCodeLength = reader.ReadByte(); | |||||
jT808_JTActiveSafety_0X0900_USB_0XF8.CustomerCode = reader.ReadString(jT808_JTActiveSafety_0X0900_USB_0XF8.CustomerCodeLength); | |||||
return jT808_JTActiveSafety_0X0900_USB_0XF8; | |||||
} | |||||
public void Serialize(ref JT808MessagePackWriter writer, JT808_JTActiveSafety_0x0900_USB_0xF8 value, IJT808Config config) | |||||
{ | |||||
writer.Skip(1, out int CompantNameLengthPosition); | |||||
writer.WriteString(value.CompantName); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - CompantNameLengthPosition - 1), CompantNameLengthPosition); | |||||
writer.Skip(1, out int ProductModelLengthPosition); | |||||
writer.WriteString(value.ProductModel); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - ProductModelLengthPosition - 1), ProductModelLengthPosition); | |||||
writer.Skip(1, out int HardwareVersionNumberLengthPosition); | |||||
writer.WriteString(value.HardwareVersionNumber); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - HardwareVersionNumberLengthPosition - 1), HardwareVersionNumberLengthPosition); | |||||
writer.Skip(1, out int SoftwareVersionNumberLengthPosition); | |||||
writer.WriteString(value.SoftwareVersionNumber); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - SoftwareVersionNumberLengthPosition - 1), SoftwareVersionNumberLengthPosition); | |||||
writer.Skip(1, out int DevicesIDLengthPosition); | |||||
writer.WriteString(value.DevicesID); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - DevicesIDLengthPosition - 1), DevicesIDLengthPosition); | |||||
writer.Skip(1, out int CustomerCodeLengthPosition); | |||||
writer.WriteString(value.CustomerCode); | |||||
writer.WriteByteReturn((byte)(writer.GetCurrentPosition() - CustomerCodeLengthPosition - 1), CustomerCodeLengthPosition); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,39 @@ | |||||
using JT808.Protocol.Extensions.JTActiveSafety.MessageBody; | |||||
using JT808.Protocol.Formatters; | |||||
using JT808.Protocol.MessagePack; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.Formatters | |||||
{ | |||||
public class JT808_JTActiveSafety_0x8900_Formatter : IJT808MessagePackFormatter<JT808_JTActiveSafety_0x8900> | |||||
{ | |||||
public JT808_JTActiveSafety_0x8900 Deserialize(ref JT808MessagePackReader reader, IJT808Config config) | |||||
{ | |||||
JT808_JTActiveSafety_0x8900 jT808_JTActiveSafety_0X8900 = new JT808_JTActiveSafety_0x8900(); | |||||
jT808_JTActiveSafety_0X8900.USBCount=reader.ReadByte(); | |||||
if (jT808_JTActiveSafety_0X8900.USBCount > 0) | |||||
{ | |||||
jT808_JTActiveSafety_0X8900.MultipleUSB = new List<byte>(); | |||||
for(int i=0;i < jT808_JTActiveSafety_0X8900.USBCount; i++) | |||||
{ | |||||
jT808_JTActiveSafety_0X8900.MultipleUSB.Add(reader.ReadByte()); | |||||
} | |||||
} | |||||
return jT808_JTActiveSafety_0X8900; | |||||
} | |||||
public void Serialize(ref JT808MessagePackWriter writer, JT808_JTActiveSafety_0x8900 value, IJT808Config config) | |||||
{ | |||||
if(value.MultipleUSB!=null && value.MultipleUSB.Count > 0) | |||||
{ | |||||
writer.WriteByte((byte)value.MultipleUSB.Count); | |||||
foreach(var item in value.MultipleUSB) | |||||
{ | |||||
writer.WriteByte(item); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -1,7 +1,15 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<Project Sdk="Microsoft.NET.Sdk"> | |||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFramework>netstandard2.0</TargetFramework> | <TargetFramework>netstandard2.0</TargetFramework> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | |||||
<PackageReference Include="JT808" Version="2.1.6" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<Folder Include="Metadata\" /> | |||||
</ItemGroup> | |||||
</Project> | </Project> |
@@ -0,0 +1,42 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety | |||||
{ | |||||
public static class JT808_JTActiveSafety_Constants | |||||
{ | |||||
/// <summary> | |||||
/// 附加信息ID 高级驾驶辅助系统报警信息 | |||||
/// </summary> | |||||
public const byte JT808_0X0200_0x64 = 0x64; | |||||
/// <summary> | |||||
/// 附加信息ID 驾驶员状态监测系统报警信息 | |||||
/// </summary> | |||||
public const byte JT808_0X0200_0x65 = 0x65; | |||||
/// <summary> | |||||
/// 附加信息ID 胎压监测系统报警信息 | |||||
/// </summary> | |||||
public const byte JT808_0X0200_0x66 = 0x66; | |||||
/// <summary> | |||||
/// 附加信息ID 盲区监测系统报警信息 | |||||
/// </summary> | |||||
public const byte JT808_0X0200_0x67 = 0x67; | |||||
/// <summary> | |||||
/// 高级驾驶辅助系统参数设置 | |||||
/// </summary> | |||||
public const uint JT808_0X8103_0xF364 = 0xF364; | |||||
/// <summary> | |||||
/// 驾驶员状态监测系统参数设置 | |||||
/// </summary> | |||||
public const uint JT808_0X8103_0xF365 = 0xF365; | |||||
/// <summary> | |||||
/// 胎压监测系统参数设置 | |||||
/// </summary> | |||||
public const uint JT808_0X8103_0xF366 = 0xF366; | |||||
/// <summary> | |||||
/// 盲区监测系统参数设置 | |||||
/// </summary> | |||||
public const uint JT808_0X8103_0xF367 = 0xF367; | |||||
} | |||||
} |
@@ -0,0 +1,200 @@ | |||||
using JT808.Protocol.Attributes; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using JT808.Protocol.MessageBody; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 高级驾驶辅助系统参数 | |||||
/// </summary> | |||||
[JT808Formatter(typeof(JT808_0x8103_0xF364_Formatter))] | |||||
public class JT808_0x8103_0xF364 : JT808_0x8103_BodyBase | |||||
{ | |||||
public override uint ParamId { get; set; } = 0xF364; | |||||
public override byte ParamLength { get; set; } | |||||
/// <summary> | |||||
/// 报警判断速度阈值 | |||||
/// </summary> | |||||
public byte AlarmJudgeSpeedThreshold { get; set; } | |||||
/// <summary> | |||||
/// 报警提示音量 | |||||
/// </summary> | |||||
public byte WarningVolume { get; set; } | |||||
/// <summary> | |||||
/// 主动拍照策略 | |||||
/// </summary> | |||||
public byte ActivePhotographyStrategy { get; set; } | |||||
/// <summary> | |||||
/// 主动定时拍照时间间隔 | |||||
/// </summary> | |||||
public ushort ActivelyTimePhotoInterval { get; set; } | |||||
/// <summary> | |||||
/// 主动定距拍照距离间隔 | |||||
/// </summary> | |||||
public ushort ActiveDistancePhotographyDistanceInterval { get; set; } | |||||
/// <summary> | |||||
/// 单次主动拍照张数 | |||||
/// </summary> | |||||
public byte SingleInitiativePhotos { get; set; } | |||||
/// <summary> | |||||
/// 单次主动拍照时间间隔 | |||||
/// </summary> | |||||
public byte SingleInitiativePhotosInterval { get; set; } | |||||
/// <summary> | |||||
/// 拍照分辨率 | |||||
/// </summary> | |||||
public byte PhotoResolution { get; set; } | |||||
/// <summary> | |||||
/// 视频录制分辨率 | |||||
/// </summary> | |||||
public byte VideoRecordingResolution { get; set; } | |||||
/// <summary> | |||||
/// 报警使能 | |||||
/// </summary> | |||||
public uint AlarmEnable { get; set; } | |||||
/// <summary> | |||||
/// 事件使能 | |||||
/// </summary> | |||||
public uint EventEnable { get; set; } | |||||
/// <summary> | |||||
/// 预留字段 | |||||
/// </summary> | |||||
public byte Placeholder1 { get; set; } | |||||
/// <summary> | |||||
/// 障碍物报警距离阈值 | |||||
/// </summary> | |||||
public byte DistanceThresholdObstacleAlarm { get; set; } | |||||
/// <summary> | |||||
/// 障碍物报警分级速度阈值 | |||||
/// </summary> | |||||
public byte HierarchicalSpeedThresholdObstacleAlarm { get; set; } | |||||
/// <summary> | |||||
/// 障碍物报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterObstacleAlarm { get; set; } | |||||
/// <summary> | |||||
/// 障碍物报警拍照张数 | |||||
/// </summary> | |||||
public byte BarrierAlarmPhotographs { get; set; } | |||||
/// <summary> | |||||
/// 障碍物报警拍照间隔 | |||||
/// </summary> | |||||
public byte ObstacleAlarmInterval { get; set; } | |||||
/// <summary> | |||||
/// 频繁变道报警判断时间段 | |||||
/// </summary> | |||||
public byte FrequentChannelChangeAlarmJudgmentTimePeriod { get; set; } | |||||
/// <summary> | |||||
/// 频繁变道报警判断次数 | |||||
/// </summary> | |||||
public byte FrequentAlarmJudgmentNumberChannelChange { get; set; } | |||||
/// <summary> | |||||
/// 频繁变道报警分级速度阈值 | |||||
/// </summary> | |||||
public byte HierarchicalSpeedThresholdFrequentChannelChangeAlarm { get; set; } | |||||
/// <summary> | |||||
/// 频繁变道报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterFrequentLaneChangeAlarm { get; set; } | |||||
/// <summary> | |||||
/// 频繁变道报警拍照张数 | |||||
/// </summary> | |||||
public byte FrequentChannelChangeAlarmPhotos { get; set; } | |||||
/// <summary> | |||||
/// 频繁变道报警拍照间隔 | |||||
/// </summary> | |||||
public byte FrequentLaneChangeAlarmInterval { get; set; } | |||||
/// <summary> | |||||
/// 车道偏离报警分级速度阈值 | |||||
/// </summary> | |||||
public byte GradedSpeedThresholdLaneDeviationAlarm { get; set; } | |||||
/// <summary> | |||||
/// 车道偏离报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterLaneDepartureAlarm { get; set; } | |||||
/// <summary> | |||||
/// 车道偏离报警拍照张数 | |||||
/// </summary> | |||||
public byte LaneDepartureAlarmPhoto { get; set; } | |||||
/// <summary> | |||||
/// 车道偏离报警拍照间隔 | |||||
/// </summary> | |||||
public byte LaneDepartureAlarmPhotoInterval { get; set; } | |||||
/// <summary> | |||||
/// 前向碰撞报警时间阈值 | |||||
/// </summary> | |||||
public byte ForwardCollisionWarningTimeThreshold { get; set; } | |||||
/// <summary> | |||||
/// 前向碰撞报警分级速度阈值 | |||||
/// </summary> | |||||
public byte HierarchicalSpeedThresholdForwardCollisionWarning { get; set; } | |||||
/// <summary> | |||||
/// 前向碰撞报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterForwardCollisionAlarm { get; set; } | |||||
/// <summary> | |||||
/// 前向碰撞报警拍照张数 | |||||
/// </summary> | |||||
public byte ForwardCollisionAlarmPhotographs { get; set; } | |||||
/// <summary> | |||||
/// 前向碰撞报警拍照间隔 | |||||
/// </summary> | |||||
public byte ForwardCollisionAlarmInterval { get; set; } | |||||
/// <summary> | |||||
/// 行人碰撞报警时间阈值 | |||||
/// </summary> | |||||
public byte PedestrianCollisionAlarmTimeThreshold { get; set; } | |||||
/// <summary> | |||||
/// 行人碰撞报警使能速度阈值 | |||||
/// </summary> | |||||
public byte PedestrianCollisionAlarmEnablingSpeedThreshold { get; set; } | |||||
/// <summary> | |||||
/// 行人碰撞报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterPedestrianCollisionAlarm { get; set; } | |||||
/// <summary> | |||||
/// 行人碰撞报警拍照张数 | |||||
/// </summary> | |||||
public byte PedestrianCollisionAlarmPhotos { get; set; } | |||||
/// <summary> | |||||
/// 行人碰撞报警拍照间隔 | |||||
/// </summary> | |||||
public byte PedestrianCollisionAlarmInterval { get; set; } | |||||
/// <summary> | |||||
/// 车距监控报警距离阈值 | |||||
/// </summary> | |||||
public byte VehicleDistanceMonitoringAlarmDistanceThreshold { get; set; } | |||||
/// <summary> | |||||
/// 车距监控报警分级速度阈值 | |||||
/// </summary> | |||||
public byte VehicleDistanceMonitoringAndAlarmClassificationSpeedThreshold { get; set; } | |||||
/// <summary> | |||||
/// 车距过近报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterAlarmVehicleProximity { get; set; } | |||||
/// <summary> | |||||
/// 车距过近报警拍照张数 | |||||
/// </summary> | |||||
public byte AlarmPhotoVehicleCloseDistance { get; set; } | |||||
/// <summary> | |||||
/// 车距过近报警拍照间隔 | |||||
/// </summary> | |||||
public byte AlarmPhotoVehicleCloseDistanceInterval { get; set; } | |||||
/// <summary> | |||||
/// 道路标志识别拍照张数 | |||||
/// </summary> | |||||
public byte RoadSignRecognitionPhotographs { get; set; } | |||||
/// <summary> | |||||
/// 道路标志识别拍照间隔 | |||||
/// </summary> | |||||
public byte RoadSignRecognitionPhotographsInterval { get; set; } | |||||
/// <summary> | |||||
/// 保留字段 | |||||
/// </summary> | |||||
public byte[] Placeholder2 { get; set; } = new byte[4]; | |||||
} | |||||
} |
@@ -0,0 +1,155 @@ | |||||
using JT808.Protocol.Attributes; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using JT808.Protocol.MessageBody; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 驾驶员状态监测系统参数 | |||||
/// </summary> | |||||
[JT808Formatter(typeof(JT808_0x8103_0xF365_Formatter))] | |||||
public class JT808_0x8103_0xF365 : JT808_0x8103_BodyBase | |||||
{ | |||||
public override uint ParamId { get; set; } = 0xF365; | |||||
public override byte ParamLength { get; set; } | |||||
/// <summary> | |||||
/// 报警判断速度阈值 | |||||
/// </summary> | |||||
public byte AlarmJudgeSpeedThreshold { get; set; } | |||||
/// <summary> | |||||
/// 报警提示音量 | |||||
/// </summary> | |||||
public byte WarningVolume { get; set; } | |||||
/// <summary> | |||||
/// 主动拍照策略 | |||||
/// </summary> | |||||
public byte ActivePhotographyStrategy { get; set; } | |||||
/// <summary> | |||||
/// 主动定时拍照时间间隔 | |||||
/// </summary> | |||||
public ushort ActivelyTimePhotoInterval { get; set; } | |||||
/// <summary> | |||||
/// 主动定距拍照距离间隔 | |||||
/// </summary> | |||||
public ushort ActiveDistancePhotographyDistanceInterval { get; set; } | |||||
/// <summary> | |||||
/// 单次主动拍照张数 | |||||
/// </summary> | |||||
public byte SingleInitiativePhotos { get; set; } | |||||
/// <summary> | |||||
/// 单次主动拍照时间间隔 | |||||
/// </summary> | |||||
public byte SingleInitiativePhotosInterval { get; set; } | |||||
/// <summary> | |||||
/// 拍照分辨率 | |||||
/// </summary> | |||||
public byte PhotoResolution { get; set; } | |||||
/// <summary> | |||||
/// 视频录制分辨率 | |||||
/// </summary> | |||||
public byte VideoRecordingResolution { get; set; } | |||||
/// <summary> | |||||
/// 报警使能 | |||||
/// </summary> | |||||
public uint AlarmEnable { get; set; } | |||||
/// <summary> | |||||
/// 事件使能 | |||||
/// </summary> | |||||
public uint EventEnable { get; set; } | |||||
/// <summary> | |||||
/// 吸烟报警判断时间间隔 | |||||
/// </summary> | |||||
public ushort TimeIntervalSmokingAlarmJudgment { get; set; } | |||||
/// <summary> | |||||
/// 接打电话报警判断时间间隔 | |||||
/// </summary> | |||||
public ushort CallAlarmDetermineTimeInterval{ get; set; } | |||||
/// <summary> | |||||
/// 预留字段 | |||||
/// </summary> | |||||
public byte[] Reserve { get; set; } = new byte[3]; | |||||
/// <summary> | |||||
/// 疲劳驾驶报警分级速度阈值 | |||||
/// </summary> | |||||
public byte GradedSpeedThresholdFatigueDrivingAlarm { get; set; } | |||||
/// <summary> | |||||
/// 疲劳驾驶报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterFatigueDrivingAlarm { get; set; } | |||||
/// <summary> | |||||
/// 疲劳驾驶报警拍照张数 | |||||
/// </summary> | |||||
public byte FatigueDrivingAlarmPhotograph { get; set; } | |||||
/// <summary> | |||||
/// 疲劳驾驶报警拍照间隔时间 | |||||
/// </summary> | |||||
public byte FatigueDrivingAlarmPhotographInterval { get; set; } | |||||
/// <summary> | |||||
/// 接打电话报警分级速度阈值 | |||||
/// </summary> | |||||
public byte ClassifiedSpeedThresholdCallAlarm{ get; set; } | |||||
/// <summary> | |||||
/// 接打电话报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterCallAlarm{ get; set; } | |||||
/// <summary> | |||||
/// 接打电话报警拍驾驶员面部特征照片张数 | |||||
/// </summary> | |||||
public byte CallAlarmTakePicturesDriverFacialFeatures{ get; set; } | |||||
/// <summary> | |||||
/// 接打电话报警拍驾驶员面部特征照片间隔时间 | |||||
/// </summary> | |||||
public byte CallAlarmTakePicturesDriverFacialFeaturesInterval { get; set; } | |||||
/// <summary> | |||||
/// 抽烟报警分级车速阈值 | |||||
/// </summary> | |||||
public byte ClassifiedSpeedThresholdSmokingAlarm{ get; set; } | |||||
/// <summary> | |||||
/// 抽烟报警前后视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeBeforeAndAfterSmokingAlarm{ get; set; } | |||||
/// <summary> | |||||
/// 抽烟报警拍驾驶员面部特征照片张数 | |||||
/// </summary> | |||||
public byte SmokingAlarmPhotographsDriverFaceCharacteristics { get; set; } | |||||
/// <summary> | |||||
/// 抽烟报警拍驾驶员面部特征照片间隔时间 | |||||
/// </summary> | |||||
public byte SmokingAlarmPhotographsDriverFaceCharacteristicsInterval { get; set; } | |||||
/// <summary> | |||||
/// 分神驾驶报警分级车速阈值 | |||||
/// </summary> | |||||
public byte ClassifiedSpeedThresholdDistractedDrivingAlarm { get; set; } | |||||
/// <summary> | |||||
/// 分神驾驶报警拍照张数 | |||||
/// </summary> | |||||
public byte DistractedDrivingAlarmPhotography{ get; set; } | |||||
/// <summary> | |||||
/// 分神驾驶报警拍照间隔时间 | |||||
/// </summary> | |||||
public byte DistractedDrivingAlarmPhotographyInterval { get; set; } | |||||
/// <summary> | |||||
/// 驾驶行为异常视频录制时间 | |||||
/// </summary> | |||||
public byte VideoRecordingTimeAbnormalDrivingBehavior{ get; set; } | |||||
/// <summary> | |||||
/// 驾驶行为异常抓拍照片张数 | |||||
/// </summary> | |||||
public byte PhotographsAbnormalDrivingBehavior{ get; set; } | |||||
/// <summary> | |||||
/// 驾驶行为异常拍照间隔 | |||||
/// </summary> | |||||
public byte PictureIntervalAbnormalDrivingBehavior{ get; set; } | |||||
/// <summary> | |||||
/// 驾驶员身份识别触发 | |||||
/// </summary> | |||||
public byte DriverIdentificationTrigger { get; set; } | |||||
/// <summary> | |||||
/// 保留字段 | |||||
/// </summary> | |||||
public byte[] Retain { get; set; } = new byte[2]; | |||||
} | |||||
} |
@@ -0,0 +1,63 @@ | |||||
using JT808.Protocol.Attributes; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using JT808.Protocol.MessageBody; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 胎压监测系统参数 | |||||
/// </summary> | |||||
[JT808Formatter(typeof(JT808_0x8103_0xF366_Formatter))] | |||||
public class JT808_0x8103_0xF366 : JT808_0x8103_BodyBase | |||||
{ | |||||
public override uint ParamId { get; set; } = 0xF366; | |||||
public override byte ParamLength { get; set; } = 46; | |||||
/// <summary> | |||||
/// 轮胎规格型号 | |||||
/// </summary> | |||||
public string TyreSpecificationType { get; set; } | |||||
/// <summary> | |||||
/// 胎压单位 | |||||
/// </summary> | |||||
public ushort TyrePressureUnit { get; set; } | |||||
/// <summary> | |||||
/// 正常胎压值 | |||||
/// </summary> | |||||
public ushort NormalFetalPressure { get; set; } | |||||
/// <summary> | |||||
/// 胎压不平衡门限 | |||||
/// </summary> | |||||
public ushort ThresholdUnbalancedTirePressure { get; set; } | |||||
/// <summary> | |||||
/// 慢漏气门限 | |||||
/// </summary> | |||||
public ushort SlowLeakageThreshold { get; set; } | |||||
/// <summary> | |||||
/// 低压阈值 | |||||
/// </summary> | |||||
public ushort LowVoltageThreshold { get; set; } | |||||
/// <summary> | |||||
/// 高压阈值 | |||||
/// </summary> | |||||
public ushort HighVoltageThreshold { get; set; } | |||||
/// <summary> | |||||
/// 高温阈值 | |||||
/// </summary> | |||||
public ushort HighTemperatureThreshold { get; set; } | |||||
/// <summary> | |||||
/// 电压阈值 | |||||
/// </summary> | |||||
public ushort VoltageThreshold { get; set; } | |||||
/// <summary> | |||||
/// 定时上报时间间隔 | |||||
/// </summary> | |||||
public ushort TimedReportingInterval { get; set; } | |||||
/// <summary> | |||||
/// 保留项 | |||||
/// </summary> | |||||
public byte[] Retain { get; set; } = new byte[6]; | |||||
} | |||||
} |
@@ -0,0 +1,27 @@ | |||||
using JT808.Protocol.Attributes; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using JT808.Protocol.MessageBody; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 盲区监测系统参数 | |||||
/// </summary> | |||||
[JT808Formatter(typeof(JT808_0x8103_0xF367_Formatter))] | |||||
public class JT808_0x8103_0xF367 : JT808_0x8103_BodyBase | |||||
{ | |||||
public override uint ParamId { get; set; } = 0xF367; | |||||
public override byte ParamLength { get; set; } = 2; | |||||
/// <summary> | |||||
/// 后方接近报警时间阈值 | |||||
/// </summary> | |||||
public byte RearApproachAlarmTimeThreshold { get; set; } | |||||
/// <summary> | |||||
/// 侧后方接近报警时间阈值 | |||||
/// </summary> | |||||
public byte LateralRearApproachAlarmTimeThreshold { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,23 @@ | |||||
using JT808.Protocol.Attributes; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using JT808.Protocol.MessageBody; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 上传基本信息 | |||||
/// </summary> | |||||
[JT808Formatter(typeof(JT808_JTActiveSafety_0x0900_Formatter))] | |||||
public class JT808_JTActiveSafety_0x0900 : JT808_0x0900_BodyBase | |||||
{ | |||||
/// <summary> | |||||
/// 消息列表总数 | |||||
/// </summary> | |||||
public byte USBMessageCount { get; set; } | |||||
public List<JT808_JTActiveSafety_0x0900_USBMessage> USBMessages { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,29 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 外设消息结构 | |||||
/// </summary> | |||||
public class JT808_JTActiveSafety_0x0900_USBMessage | |||||
{ | |||||
/// <summary> | |||||
/// 外设ID | |||||
/// </summary> | |||||
public byte USBID { get; set; } | |||||
/// <summary> | |||||
/// 消息长度 | |||||
/// </summary> | |||||
public byte MessageLength { get; set; } | |||||
/// <summary> | |||||
/// 消息内容 | |||||
/// </summary> | |||||
public byte[] MessageContent { get; set; } | |||||
/// <summary> | |||||
/// 消息内容对象 | |||||
/// </summary> | |||||
public JT808_JTActiveSafety_0x0900_USB_Base MessageContentObejct { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,21 @@ | |||||
using JT808.Protocol.Attributes; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
[JT808Formatter(typeof(JT808_JTActiveSafety_0x0900_USB_0xF7_Formatter))] | |||||
public class JT808_JTActiveSafety_0x0900_USB_0xF7 : JT808_JTActiveSafety_0x0900_USB_Base | |||||
{ | |||||
/// <summary> | |||||
/// 工作状态 | |||||
/// </summary> | |||||
public byte WorkingCondition { get; set; } | |||||
/// <summary> | |||||
/// 报警状态 | |||||
/// </summary> | |||||
public uint AlarmStatus { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,63 @@ | |||||
using JT808.Protocol.Attributes; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
[JT808Formatter(typeof(JT808_JTActiveSafety_0x0900_USB_0xF8_Formatter))] | |||||
public class JT808_JTActiveSafety_0x0900_USB_0xF8 : JT808_JTActiveSafety_0x0900_USB_Base | |||||
{ | |||||
/// <summary> | |||||
/// 公司名称长度 | |||||
/// </summary> | |||||
public byte CompantNameLength { get; set; } | |||||
/// <summary> | |||||
/// 公司名称 | |||||
/// </summary> | |||||
public string CompantName { get; set; } | |||||
/// <summary> | |||||
/// 产品型号长度 | |||||
/// </summary> | |||||
public byte ProductModelLength { get; set; } | |||||
/// <summary> | |||||
/// 产品型号 | |||||
/// </summary> | |||||
public string ProductModel { get; set; } | |||||
/// <summary> | |||||
/// 硬件版本号长度 | |||||
/// </summary> | |||||
public byte HardwareVersionNumberLength { get; set; } | |||||
/// <summary> | |||||
/// 硬件版本号 | |||||
/// ASCII | |||||
/// </summary> | |||||
public string HardwareVersionNumber { get; set; } | |||||
/// <summary> | |||||
/// 软件版本号长度 | |||||
/// </summary> | |||||
public byte SoftwareVersionNumberLength { get; set; } | |||||
/// <summary> | |||||
/// 软件版本号 | |||||
/// ASCII | |||||
/// </summary> | |||||
public string SoftwareVersionNumber { get; set; } | |||||
/// <summary> | |||||
/// 设备ID长度 | |||||
/// </summary> | |||||
public byte DevicesIDLength { get; set; } | |||||
/// <summary> | |||||
/// 设备ID | |||||
/// </summary> | |||||
public string DevicesID { get; set; } | |||||
/// <summary> | |||||
/// 客户代码长度 | |||||
/// </summary> | |||||
public byte CustomerCodeLength { get; set; } | |||||
/// <summary> | |||||
/// 客户代码 | |||||
/// </summary> | |||||
public string CustomerCode { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,10 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
public abstract class JT808_JTActiveSafety_0x0900_USB_Base | |||||
{ | |||||
} | |||||
} |
@@ -0,0 +1,25 @@ | |||||
using JT808.Protocol.Attributes; | |||||
using JT808.Protocol.Extensions.JTActiveSafety.Formatters; | |||||
using JT808.Protocol.MessageBody; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.Protocol.Extensions.JTActiveSafety.MessageBody | |||||
{ | |||||
/// <summary> | |||||
/// 查询基本信息 | |||||
/// </summary> | |||||
[JT808Formatter(typeof(JT808_JTActiveSafety_0x8900_Formatter))] | |||||
public class JT808_JTActiveSafety_0x8900: JT808_0x8900_BodyBase | |||||
{ | |||||
/// <summary> | |||||
/// 外设ID列表总数 | |||||
/// </summary> | |||||
public byte USBCount { get; set; } | |||||
/// <summary> | |||||
/// 外设ID | |||||
/// </summary> | |||||
public List<byte> MultipleUSB { get; set; } | |||||
} | |||||
} |