public JT808_0x8800 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8800 jT808_0X8800 = new JT808_0x8800 { MultimediaId = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset), RetransmitPackageCount = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset) }; jT808_0X8800.RetransmitPackageIds = JT808BinaryExtensions.ReadBytesLittle(bytes, ref offset, jT808_0X8800.RetransmitPackageCount * 2); readSize = offset; return(jT808_0X8800); }
public JT808_0x8900 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8900 jT808_0X8900 = new JT808_0x8900(); jT808_0X8900.PassthroughType = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); if (JT808_0x8900_BodyBase.JT808_0x8900Method.TryGetValue(jT808_0X8900.PassthroughType, out Type type)) { jT808_0X8900.JT808_0X8900_BodyBase = JT808FormatterResolverExtensions.JT808DynamicDeserialize(JT808FormatterExtensions.GetFormatter(type), bytes.Slice(offset), out readSize); } readSize = offset; return(jT808_0X8900); }
public JT808_0x0200_0x25 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x0200_0x25 jT808LocationAttachImpl0x13 = new JT808_0x0200_0x25 { AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), CarSignalStatus = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset) }; readSize = offset; return(jT808LocationAttachImpl0x13); }
public JT808_0x0200_0x02 Deserialize(ReadOnlySpan <byte> bytes, out int readSize, IJT808Config config) { int offset = 0; JT808_0x0200_0x02 jT808LocationAttachImpl0X02 = new JT808_0x0200_0x02 { AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), Oil = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset) }; readSize = offset; return(jT808LocationAttachImpl0X02); }
public JT808_0x8400 Deserialize(ReadOnlySpan <byte> bytes, out int readSize, IJT808Config config) { int offset = 0; JT808_0x8400 jT808_0X8400 = new JT808_0x8400 { CallBack = (JT808CallBackType)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), // 最长为 20 字节 PhoneNumber = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset) }; readSize = offset; return(jT808_0X8400); }
public JT808_0x0200_0x31 Deserialize(ReadOnlySpan <byte> bytes, out int readSize, IJT808Config config) { int offset = 0; JT808_0x0200_0x31 jT808LocationAttachImpl0x31 = new JT808_0x0200_0x31 { AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), GNSSCount = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset) }; readSize = offset; return(jT808LocationAttachImpl0x31); }
public JT808_0x0200_0x2B Deserialize(ReadOnlySpan <byte> bytes, out int readSize, IJT808Config config) { int offset = 0; JT808_0x0200_0x2B jT808LocationAttachImpl0x2B = new JT808_0x0200_0x2B { AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), Analog = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset) }; readSize = offset; return(jT808LocationAttachImpl0x2B); }
public JT808_0x8001 Deserialize(ReadOnlySpan <byte> bytes, out int readSize, IJT808Config config) { int offset = 0; JT808_0x8001 jT808_0X8001 = new JT808_0x8001 { MsgNum = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset), MsgId = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset), JT808PlatformResult = (JT808PlatformResult)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset) }; readSize = offset; return(jT808_0X8001); }
public JT808LocationAttachImpl0x01 Deserialize(ReadOnlySpan <byte> bytes, int offset, IJT808FormatterResolver formatterResolver, out int readSize) { offset = 0; JT808LocationAttachImpl0x01 jT808LocationAttachImpl0X01 = new JT808LocationAttachImpl0x01() { }; jT808LocationAttachImpl0X01.AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0X01.AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0X01.Mileage = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset); readSize = offset; return(jT808LocationAttachImpl0X01); }
public JT808_0x0800 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x0800 jT808_0X0800 = new JT808_0x0800(); jT808_0X0800.MultimediaId = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset); jT808_0X0800.MultimediaType = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0800.MultimediaCodingFormat = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0800.EventItemCoding = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0800.ChannelId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); readSize = offset; return(jT808_0X0800); }
public JT808_0x0200_DT2_0x81 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x0200_DT2_0x81 jT808_0X0200_DT2_0X81 = new JT808_0x0200_DT2_0x81(); jT808_0X0200_DT2_0X81.AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0200_DT2_0X81.AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0200_DT2_0X81.Age = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset); jT808_0X0200_DT2_0X81.Gender = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0200_DT2_0X81.MsgNum = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); readSize = offset; return(jT808_0X0200_DT2_0X81); }
public JT808_0x8304 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8304 jT808_0X8304 = new JT808_0x8304 { InformationType = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), InformationLength = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset) }; jT808_0X8304.InformationContent = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, jT808_0X8304.InformationLength); readSize = offset; return(jT808_0X8304); }
public JT808_0x0200_0x12 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x0200_0x12 jT808LocationAttachImpl0x12 = new JT808_0x0200_0x12(); jT808LocationAttachImpl0x12.AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0x12.AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0x12.JT808PositionType = (JT808PositionType)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0x12.AreaId = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset); jT808LocationAttachImpl0x12.Direction = (JT808DirectionType)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); readSize = offset; return(jT808LocationAttachImpl0x12); }
public JT808_0x8105 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8105 jT808_0x8105 = new JT808_0x8105(); jT808_0x8105.CommandWord = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); if (jT808_0x8105.CommandWord == 1 || jT808_0x8105.CommandWord == 2) { jT808_0x8105.CommandValue = new CommandParams(); jT808_0x8105.CommandValue.SetCommandParams(JT808BinaryExtensions.ReadStringLittle(bytes, ref offset)); } readSize = offset; return(jT808_0x8105); }
public JT808_0x8302 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8302 jT808_0X8302 = new JT808_0x8302(); jT808_0X8302.Flag = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8302.IssueContentLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8302.Issue = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, jT808_0X8302.IssueContentLength); jT808_0X8302.AnswerId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8302.AnswerContentLength = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808_0X8302.AnswerContent = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, jT808_0X8302.AnswerContentLength); readSize = offset; return(jT808_0X8302); }
public JT808_0x8804 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8804 jT808_0X8804 = new JT808_0x8804 { RecordCmd = (JT808RecordCmd)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), RecordTime = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset), RecordSave = (JT808RecordSave)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), AudioSampleRate = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset) }; readSize = offset; return(jT808_0X8804); }
public JT808_0x8803 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8803 jT808_0X8803 = new JT808_0x8803(); jT808_0X8803.MultimediaType = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8803.ChannelId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8803.EventItemCoding = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8803.StartTime = JT808BinaryExtensions.ReadDateTime6Little(bytes, ref offset); jT808_0X8803.EndTime = JT808BinaryExtensions.ReadDateTime6Little(bytes, ref offset); jT808_0X8803.MultimediaDeleted = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); readSize = offset; return(jT808_0X8803); }
public JT808_0x8108 Deserialize(ReadOnlySpan <byte> bytes, int offset, IJT808FormatterResolver formatterResolver, out int readSize) { offset = 0; JT808_0x8108 jT808_0X8108 = new JT808_0x8108(); jT808_0X8108.UpgradeType = (JT808UpgradeType)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8108.MakerId = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, 5); jT808_0X8108.VersionNumLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8108.VersionNum = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, jT808_0X8108.VersionNumLength); jT808_0X8108.UpgradePackageLength = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset); jT808_0X8108.UpgradePackage = JT808BinaryExtensions.ReadBytesLittle(bytes, ref offset, jT808_0X8108.UpgradePackageLength); readSize = offset; return(jT808_0X8108); }
public JT808_0x8106 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8106 jT808_0X8106 = new JT808_0x8106(); jT808_0X8106.ParameterCount = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8106.Parameters = new uint[jT808_0X8106.ParameterCount]; for (int i = 0; i < jT808_0X8106.ParameterCount; i++) { jT808_0X8106.Parameters.SetValue(JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset), i); } readSize = offset; return(jT808_0X8106); }
public JT808_0x0200_0x13 Deserialize(ReadOnlySpan <byte> bytes, out int readSize, IJT808Config config) { int offset = 0; JT808_0x0200_0x13 jT808LocationAttachImpl0x13 = new JT808_0x0200_0x13 { AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), DrivenRouteId = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset), Time = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset), DrivenRoute = (JT808DrivenRouteType)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset) }; readSize = offset; return(jT808LocationAttachImpl0x13); }
public JT808LocationAttachImpl0x06 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808LocationAttachImpl0x06 jT808LocationAttachImpl0x06 = new JT808LocationAttachImpl0x06() { }; jT808LocationAttachImpl0x06.AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0x06.AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0x06.Age = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset); jT808LocationAttachImpl0x06.Gender = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0x06.UserName = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset); readSize = offset; return(jT808LocationAttachImpl0x06); }
public JT808_0x8802 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8802 jT808_0X8802 = new JT808_0x8802 { MultimediaType = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), ChannelId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), EventItemCoding = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), StartTime = JT808BinaryExtensions.ReadDateTime6Little(bytes, ref offset), EndTime = JT808BinaryExtensions.ReadDateTime6Little(bytes, ref offset) }; readSize = offset; return(jT808_0X8802); }
public JT808_0x0100 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x0100 jT808_0X0100 = new JT808_0x0100(); jT808_0X0100.AreaID = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808_0X0100.CityOrCountyId = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808_0X0100.MakerId = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, 5); jT808_0X0100.TerminalModel = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, 20); jT808_0X0100.TerminalId = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, 7); jT808_0X0100.PlateColor = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0100.PlateNo = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset); readSize = offset; return(jT808_0X0100); }
public JT808LocationAttachImpl0x11 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808LocationAttachImpl0x11 jT808LocationAttachImpl0x11 = new JT808LocationAttachImpl0x11(); jT808LocationAttachImpl0x11.AttachInfoId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0x11.AttachInfoLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808LocationAttachImpl0x11.JT808PositionType = (JT808PositionType)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); if (jT808LocationAttachImpl0x11.JT808PositionType != JT808PositionType.无特定位置) { jT808LocationAttachImpl0x11.AreaId = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset); } readSize = offset; return(jT808LocationAttachImpl0x11); }
public JT808_0x8100 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8100 jT808_0X8100 = new JT808_0x8100(); jT808_0X8100.MsgNum = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808_0X8100.JT808TerminalRegisterResult = (JT808TerminalRegisterResult)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); // 只有在成功后才有该字段 if (jT808_0X8100.JT808TerminalRegisterResult == JT808TerminalRegisterResult.成功) { jT808_0X8100.Code = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset); } readSize = offset; return(jT808_0X8100); }
public JT808_0x8108 Deserialize(ReadOnlySpan <byte> bytes, out int readSize, IJT808Config config) { int offset = 0; JT808_0x8108 jT808_0X8108 = new JT808_0x8108 { UpgradeType = (JT808UpgradeType)JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), MakerId = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, 5), VersionNumLength = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset) }; jT808_0X8108.VersionNum = JT808BinaryExtensions.ReadStringLittle(bytes, ref offset, jT808_0X8108.VersionNumLength); jT808_0X8108.UpgradePackageLength = JT808BinaryExtensions.ReadInt32Little(bytes, ref offset); jT808_0X8108.UpgradePackage = JT808BinaryExtensions.ReadBytesLittle(bytes, ref offset, jT808_0X8108.UpgradePackageLength); readSize = offset; return(jT808_0X8108); }
public JT808_0x0801 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x0801 jT808_0X0801 = new JT808_0x0801(); jT808_0X0801.MultimediaId = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset); jT808_0X0801.MultimediaType = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0801.MultimediaCodingFormat = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0801.EventItemCoding = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0801.ChannelId = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0801.Position = JT808FormatterExtensions.GetFormatter <JT808_0x0200>().Deserialize(bytes.Slice(offset), out int bufReadSize); offset += 28; jT808_0X0801.MultimediaDataPackage = JT808BinaryExtensions.ReadBytesLittle(bytes, ref offset); readSize = offset; return(jT808_0X0801); }
public JT808_0x8606 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8606 jT808_0X8606 = new JT808_0x8606 { RouteId = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset), RouteProperty = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset) }; ReadOnlySpan <char> routeProperty16Bit = Convert.ToString(jT808_0X8606.RouteProperty, 2).PadLeft(16, '0').AsSpan(); bool bit0Flag = routeProperty16Bit.Slice(routeProperty16Bit.Length - 1).ToString().Equals("0"); if (!bit0Flag) { jT808_0X8606.StartTime = JT808BinaryExtensions.ReadDateTime6Little(bytes, ref offset); jT808_0X8606.EndTime = JT808BinaryExtensions.ReadDateTime6Little(bytes, ref offset); } jT808_0X8606.InflectionPointCount = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808_0X8606.InflectionPointItems = new List <JT808InflectionPointProperty>(); for (var i = 0; i < jT808_0X8606.InflectionPointCount; i++) { JT808InflectionPointProperty jT808InflectionPointProperty = new JT808InflectionPointProperty { InflectionPointId = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset), SectionId = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset), InflectionPointLat = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset), InflectionPointLng = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset), SectionWidth = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset), SectionProperty = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset) }; ReadOnlySpan <char> sectionProperty16Bit = Convert.ToString(jT808InflectionPointProperty.SectionProperty, 2).PadLeft(16, '0').AsSpan(); bool sectionBit0Flag = sectionProperty16Bit.Slice(sectionProperty16Bit.Length - 1).ToString().Equals("0"); if (!sectionBit0Flag) { jT808InflectionPointProperty.SectionLongDrivingThreshold = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808InflectionPointProperty.SectionDrivingUnderThreshold = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); } bool sectionBit1Flag = sectionProperty16Bit.Slice(sectionProperty16Bit.Length - 2, 1).ToString().Equals("0"); if (!sectionBit1Flag) { jT808InflectionPointProperty.SectionHighestSpeed = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808InflectionPointProperty.SectionOverspeedDuration = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); } jT808_0X8606.InflectionPointItems.Add(jT808InflectionPointProperty); } readSize = offset; return(jT808_0X8606); }
public JT808_0x8601 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x8601 jT808_0X8601 = new JT808_0x8601(); jT808_0X8601.AreaCount = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X8601.AreaIds = new List <uint>(); if (jT808_0X8601.AreaCount > 0) { for (var i = 0; i < jT808_0X8601.AreaCount; i++) { jT808_0X8601.AreaIds.Add(JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset)); } } readSize = offset; return(jT808_0X8601); }
public JT808_0x0805 Deserialize(ReadOnlySpan <byte> bytes, out int readSize) { int offset = 0; JT808_0x0805 jT808_0X0805 = new JT808_0x0805(); jT808_0X0805.MsgNum = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808_0X0805.Result = JT808BinaryExtensions.ReadByteLittle(bytes, ref offset); jT808_0X0805.MultimediaIdCount = JT808BinaryExtensions.ReadUInt16Little(bytes, ref offset); jT808_0X0805.MultimediaIds = new List <uint>(); for (var i = 0; i < jT808_0X0805.MultimediaIdCount; i++) { uint id = JT808BinaryExtensions.ReadUInt32Little(bytes, ref offset); jT808_0X0805.MultimediaIds.Add(id); } readSize = offset; return(jT808_0X0805); }