Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="config"></param>
        /// <returns></returns>
        public JT808_0x0200_0x04 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0200_0x04 value = new JT808_0x0200_0x04();

            value.AttachInfoId     = reader.ReadByte();
            value.AttachInfoLength = reader.ReadByte();
            value.EventId          = reader.ReadUInt16();
            return(value);
        }
Example #2
0
        public JT808_0x0805 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0805 jT808_0X0805 = new JT808_0x0805();

            jT808_0X0805.ReplyMsgNum = reader.ReadUInt16();
            jT808_0X0805.Result      = reader.ReadByte();
            if (jT808_0X0805.Result == 0)
            {
                jT808_0X0805.MultimediaIdCount = reader.ReadUInt16();
                jT808_0X0805.MultimediaIds     = new List <uint>();
                for (var i = 0; i < jT808_0X0805.MultimediaIdCount; i++)
                {
                    uint id = reader.ReadUInt32();
                    jT808_0X0805.MultimediaIds.Add(id);
                }
            }
            return(jT808_0X0805);
        }
Example #3
0
        public JT808_0x0700 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0700 value = new JT808_0x0700();

            value.ReplyMsgNum          = reader.ReadUInt16();
            value.CommandId            = reader.ReadByte();
            value.JT808CarDVRUpPackage = JT808CarDVRSerializer.JT808CarDVRUpPackage.Deserialize(ref reader, config);
            return(value);
        }
Example #4
0
        public JT808_CarDVR_Down_0x13 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_CarDVR_Down_0x13 value = new JT808_CarDVR_Down_0x13();

            value.StartTime = reader.ReadDateTime6();
            value.EndTime   = reader.ReadDateTime6();
            value.Count     = reader.ReadUInt16();
            return(value);
        }
Example #5
0
        public JT808LocationAttachImpl0xDE Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808LocationAttachImpl0xDE jT808LocationAttachImpl0XDE = new JT808LocationAttachImpl0xDE();

            jT808LocationAttachImpl0XDE.AttachInfoId     = reader.ReadUInt16();
            jT808LocationAttachImpl0XDE.AttachInfoLength = reader.ReadByte();
            jT808LocationAttachImpl0XDE.TestValue        = reader.ReadArray(jT808LocationAttachImpl0XDE.AttachInfoLength).ToArray();
            return(jT808LocationAttachImpl0XDE);
        }
Example #6
0
        public JT808_0x0200_0x2A Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0200_0x2A jT808LocationAttachImpl0X2A = new JT808_0x0200_0x2A();

            jT808LocationAttachImpl0X2A.AttachInfoId     = reader.ReadByte();
            jT808LocationAttachImpl0X2A.AttachInfoLength = reader.ReadByte();
            jT808LocationAttachImpl0X2A.IOStatus         = reader.ReadUInt16();
            return(jT808LocationAttachImpl0X2A);
        }
        public JT808_0x8103_0x005E Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x8103_0x005E jT808_0x8103_0x005E = new JT808_0x8103_0x005E();

            jT808_0x8103_0x005E.ParamId     = reader.ReadUInt32();
            jT808_0x8103_0x005E.ParamLength = reader.ReadByte();
            jT808_0x8103_0x005E.ParamValue  = reader.ReadUInt16();
            return(jT808_0x8103_0x005E);
        }
Example #8
0
        public JT808_0x0200_0x03 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0200_0x03 jT808LocationAttachImpl0x03 = new JT808_0x0200_0x03();

            jT808LocationAttachImpl0x03.AttachInfoId     = reader.ReadByte();
            jT808LocationAttachImpl0x03.AttachInfoLength = reader.ReadByte();
            jT808LocationAttachImpl0x03.Speed            = reader.ReadUInt16();
            return(jT808LocationAttachImpl0x03);
        }
Example #9
0
        public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
        {
            JT808_0x8203 value = new JT808_0x8203();

            value.AlarmMsgNum = reader.ReadUInt16();
            writer.WriteNumber($"[{ value.AlarmMsgNum.ReadNumber()}]报警消息流水号", value.AlarmMsgNum);
            value.ManualConfirmAlarmType = reader.ReadUInt32();
            writer.WriteNumber($"[{ value.ManualConfirmAlarmType.ReadNumber()}]人工确认报警类型", value.ManualConfirmAlarmType);
        }
Example #10
0
        public JT808_0x0200_0x04 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0200_0x04 jT808LocationAttachImpl0x04 = new JT808_0x0200_0x04();

            jT808LocationAttachImpl0x04.AttachInfoId     = reader.ReadByte();
            jT808LocationAttachImpl0x04.AttachInfoLength = reader.ReadByte();
            jT808LocationAttachImpl0x04.EventId          = reader.ReadUInt16();
            return(jT808LocationAttachImpl0x04);
        }
Example #11
0
        public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
        {
            JT808_0x8202 value = new JT808_0x8202();

            value.Interval = reader.ReadUInt16();
            writer.WriteNumber($"[{ value.Interval.ReadNumber()}]时间间隔", value.Interval);
            value.LocationTrackingValidity = reader.ReadInt32();
            writer.WriteNumber($"[{ value.LocationTrackingValidity.ReadNumber()}]位置跟踪有效期", value.LocationTrackingValidity);
        }
        public JT808_0x8103_0x0077_SignalChannel Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x8103_0x0077_SignalChannel jT808_0X8103_0X0077_SignalChannel = new JT808_0x8103_0x0077_SignalChannel();

            jT808_0X8103_0X0077_SignalChannel.LogicChannelNo              = reader.ReadByte();
            jT808_0X8103_0X0077_SignalChannel.RTS_EncodeMode              = reader.ReadByte();
            jT808_0X8103_0X0077_SignalChannel.RTS_Resolution              = reader.ReadByte();
            jT808_0X8103_0X0077_SignalChannel.RTS_KF_Interval             = reader.ReadUInt16();
            jT808_0X8103_0X0077_SignalChannel.RTS_Target_FPS              = reader.ReadByte();
            jT808_0X8103_0X0077_SignalChannel.RTS_Target_CodeRate         = reader.ReadUInt32();
            jT808_0X8103_0X0077_SignalChannel.StreamStore_EncodeMode      = reader.ReadByte();
            jT808_0X8103_0X0077_SignalChannel.StreamStore_Resolution      = reader.ReadByte();
            jT808_0X8103_0X0077_SignalChannel.StreamStore_KF_Interval     = reader.ReadUInt16();
            jT808_0X8103_0X0077_SignalChannel.StreamStore_Target_FPS      = reader.ReadByte();
            jT808_0X8103_0X0077_SignalChannel.StreamStore_Target_CodeRate = reader.ReadUInt32();
            jT808_0X8103_0X0077_SignalChannel.OSD = reader.ReadUInt16();
            return(jT808_0X8103_0X0077_SignalChannel);
        }
        public JT808_0x0701TestBodiesImpl Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0701TestBodiesImpl jT808_0X0701TestBodiesImpl = new JT808_0x0701TestBodiesImpl();

            jT808_0X0701TestBodiesImpl.Id             = reader.ReadUInt32();
            jT808_0X0701TestBodiesImpl.UserNameLength = reader.ReadUInt16();
            jT808_0X0701TestBodiesImpl.UserName       = reader.ReadString(jT808_0X0701TestBodiesImpl.UserNameLength);
            return(jT808_0X0701TestBodiesImpl);
        }
Example #14
0
            public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
            {
                DT1Demo8 dT1Demo6 = new DT1Demo8();

                dT1Demo6.Sex1 = reader.ReadByte();
                writer.WriteNumber($"[{dT1Demo6.Sex1.ReadNumber()}]性别", dT1Demo6.Sex1);
                dT1Demo6.Age1 = reader.ReadUInt16();
                writer.WriteNumber($"[{dT1Demo6.Age1.ReadNumber()}]年龄", dT1Demo6.Age1);
            }
        public JT808_0x0200_0x17 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0200_0x17 jT808_0x0200_0x17 = new JT808_0x0200_0x17();

            jT808_0x0200_0x17.AttachInfoId            = reader.ReadByte();
            jT808_0x0200_0x17.AttachInfoLength        = reader.ReadByte();
            jT808_0x0200_0x17.StorageFaultAlarmStatus = reader.ReadUInt16();
            return(jT808_0x0200_0x17);
        }
Example #16
0
        public JT808_0x8003 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x8003 jT808_0X8003 = new JT808_0x8003();

            jT808_0X8003.OriginalMsgNum    = reader.ReadUInt16();
            jT808_0X8003.AgainPackageCount = reader.ReadByte();
            jT808_0X8003.AgainPackageData  = reader.ReadArray(jT808_0X8003.AgainPackageCount * 2).ToArray();
            return(jT808_0X8003);
        }
Example #17
0
        public JT808_0x8304 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x8304 jT808_0X8304 = new JT808_0x8304();

            jT808_0X8304.InformationType    = reader.ReadByte();
            jT808_0X8304.InformationLength  = reader.ReadUInt16();
            jT808_0X8304.InformationContent = reader.ReadString(jT808_0X8304.InformationLength);
            return(jT808_0X8304);
        }
Example #18
0
        public JT808_0x0200_0x02 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0200_0x02 jT808LocationAttachImpl0X02 = new JT808_0x0200_0x02();

            jT808LocationAttachImpl0X02.AttachInfoId     = reader.ReadByte();
            jT808LocationAttachImpl0X02.AttachInfoLength = reader.ReadByte();
            jT808LocationAttachImpl0X02.Oil = reader.ReadUInt16();
            return(jT808LocationAttachImpl0X02);
        }
Example #19
0
        public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
        {
            JT808_0x0302 jT808_0X0302 = new JT808_0x0302();

            jT808_0X0302.ReplySNo = reader.ReadUInt16();
            jT808_0X0302.AnswerId = reader.ReadByte();
            writer.WriteNumber($"[{jT808_0X0302.ReplySNo.ReadNumber()}]应答流水号", jT808_0X0302.ReplySNo);
            writer.WriteNumber($"[{jT808_0X0302.AnswerId.ReadNumber()}]答案ID", jT808_0X0302.AnswerId);
        }
Example #20
0
        public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
        {
            JT808_CarDVR_Down_0xC3 value = new JT808_CarDVR_Down_0xC3();

            value.RealTime = reader.ReadDateTime6();
            writer.WriteString($"[{value.RealTime.ToString("yyMMddHHmmss")}]当前时间", value.RealTime.ToString("yyyy-MM-dd HH:mm:ss"));
            value.PulseCoefficient = reader.ReadUInt16();
            writer.WriteNumber($"[{value.PulseCoefficient.ReadNumber()}]脉冲系数", value.PulseCoefficient);
        }
Example #21
0
        public JT808_0x0200_0x18 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0200_0x18 jT808_0x0200_0x18 = new JT808_0x0200_0x18();

            jT808_0x0200_0x18.AttachInfoId     = reader.ReadByte();
            jT808_0x0200_0x18.AttachInfoLength = reader.ReadByte();
            jT808_0x0200_0x18.AbnormalDrivingBehaviorAlarmInfo = reader.ReadUInt16();
            return(jT808_0x0200_0x18);
        }
Example #22
0
        public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
        {
            JT808_0x8500_0xF001 value = new JT808_0x8500_0xF001();

            value.ControlTypeId = reader.ReadUInt16();
            writer.WriteNumber($"[{ value.ControlTypeId.ReadNumber()}]控制类型Id", value.ControlTypeId);
            value.ControlTypeParameter = reader.ReadByte();
            writer.WriteNumber($"[{ value.ControlTypeParameter.ReadNumber()}]控制类型参数", value.ControlTypeParameter);
        }
Example #23
0
        public JT808_0x0005 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0005 value = new JT808_0x0005();

            value.OriginalMsgNum    = reader.ReadUInt16();
            value.AgainPackageCount = reader.ReadByte();
            value.AgainPackageData  = reader.ReadArray(value.AgainPackageCount * 2).ToArray();
            return(value);
        }
Example #24
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="writer"></param>
        /// <param name="config"></param>
        public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
        {
            JT808_0x0704 jT808_0X0704 = new JT808_0x0704();

            jT808_0X0704.Count = reader.ReadUInt16();
            writer.WriteNumber($"[{jT808_0X0704.Count.ReadNumber()}]数据项个数", jT808_0X0704.Count);
            jT808_0X0704.LocationType = (JT808_0x0704.BatchLocationType)reader.ReadByte();
            writer.WriteNumber($"[{((byte)jT808_0X0704.LocationType).ReadNumber()}]位置数据类型-{jT808_0X0704.LocationType}", (byte)jT808_0X0704.LocationType);
            writer.WriteStartArray("位置汇报数据集合");
            for (int i = 0; i < jT808_0X0704.Count; i++)
            {
                int remainContent = reader.ReadCurrentRemainContentLength();
                if (remainContent <= 0)
                {
                    continue;
                }
                writer.WriteStartObject();
                int buflen = reader.ReadUInt16();
                writer.WriteNumber($"[{buflen.ReadNumber()}]位置汇报数据长度", buflen);
                if ((remainContent - buflen) >= 0)
                {
                    writer.WriteString($"位置汇报数据{{{i}}}", reader.ReadVirtualArray(buflen).ToArray().ToHexString());
                    JT808MessagePackReader tmpReader = new JT808MessagePackReader(reader.ReadArray(buflen), reader.Version);
                    writer.WriteStartObject("位置信息汇报");
                    try
                    {
                        config.GetAnalyze <JT808_0x0200>().Analyze(ref tmpReader, writer, config);
                    }
                    catch (Exception ex)
                    {
                        writer.WriteString($"分析异常", ex.StackTrace);
                    }
                    writer.WriteEndObject();
                }
                else
                {
                    int remainContent1 = reader.ReadCurrentRemainContentLength();
                    var buffer         = reader.ReadArray(remainContent1);
                    writer.WriteString($"位置汇报异常数据{{{i}}}", buffer.ToArray().ToHexString());
                }
                writer.WriteEndObject();
            }
            writer.WriteEndArray();
        }
Example #25
0
        public JT808_0x8804 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x8804 jT808_0X8804 = new JT808_0x8804();

            jT808_0X8804.RecordCmd       = (JT808RecordCmd)reader.ReadByte();
            jT808_0X8804.RecordTime      = reader.ReadUInt16();
            jT808_0X8804.RecordSave      = (JT808RecordSave)reader.ReadByte();
            jT808_0X8804.AudioSampleRate = reader.ReadByte();
            return(jT808_0X8804);
        }
Example #26
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="writer"></param>
        /// <param name="config"></param>
        public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
        {
            JT808_CarDVR_Up_0x04 value = new JT808_CarDVR_Up_0x04();
            var hex = reader.ReadVirtualArray(6);

            value.RealTime = reader.ReadDateTime6();
            writer.WriteString($"[{hex.ToArray().ToHexString()}]当前时间", value.RealTime);
            value.PulseCoefficient = reader.ReadUInt16();
            writer.WriteNumber($"[{value.PulseCoefficient.ReadNumber()}]脉冲系数", value.PulseCoefficient);
        }
Example #27
0
        public JT808_0x0200_0x67 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x0200_0x67 jT808_0X0200_0X67 = new JT808_0x0200_0x67();

            jT808_0X0200_0X67.AttachInfoId        = reader.ReadByte();
            jT808_0X0200_0X67.AttachInfoLength    = reader.ReadByte();
            jT808_0X0200_0X67.AlarmId             = reader.ReadUInt32();
            jT808_0X0200_0X67.FlagState           = reader.ReadByte();
            jT808_0X0200_0X67.AlarmOrEventType    = reader.ReadByte();
            jT808_0X0200_0X67.AlarmLevel          = reader.ReadByte();
            jT808_0X0200_0X67.Speed               = reader.ReadByte();
            jT808_0X0200_0X67.Altitude            = reader.ReadUInt16();
            jT808_0X0200_0X67.Latitude            = (int)reader.ReadUInt32();
            jT808_0X0200_0X67.Longitude           = (int)reader.ReadUInt32();
            jT808_0X0200_0X67.AlarmTime           = reader.ReadDateTime6();
            jT808_0X0200_0X67.VehicleState        = reader.ReadUInt16();
            jT808_0X0200_0X67.AlarmIdentification = JT808_AlarmIdentificationProperty_Formatter.Instance.Deserialize(ref reader, config);
            return(jT808_0X0200_0X67);
        }
Example #28
0
        public JT808_0x9201 Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x9201 jT808_0x9201 = new JT808_0x9201();

            jT808_0x9201.ServerIpLength = reader.ReadByte();
            jT808_0x9201.ServerIp       = reader.ReadString(jT808_0x9201.ServerIpLength);
            jT808_0x9201.TcpPort        = reader.ReadUInt16();
            jT808_0x9201.UdpPort        = reader.ReadUInt16();
            jT808_0x9201.LogicChannelNo = reader.ReadByte();
            jT808_0x9201.AVItemType     = reader.ReadByte();
            jT808_0x9201.StreamType     = reader.ReadByte();
            jT808_0x9201.MemType        = reader.ReadByte();
            jT808_0x9201.PlayBackWay    = reader.ReadByte();
            jT808_0x9201.FastForwardOrFastRewindMultiples1 = reader.ReadByte();
            jT808_0x9201.FastForwardOrFastRewindMultiples2 = reader.ReadByte();
            jT808_0x9201.BeginTime = reader.ReadDateTime6();
            jT808_0x9201.EndTime   = reader.ReadDateTime6();
            return(jT808_0x9201);
        }
Example #29
0
        public void Analyze(ref JT808MessagePackReader reader, Utf8JsonWriter writer, IJT808Config config)
        {
            JT808_0x0500 value = new JT808_0x0500();

            value.MsgNum = reader.ReadUInt16();
            writer.WriteNumber($"[{value.MsgNum.ReadNumber()}]应答流水号", value.MsgNum);
            writer.WriteStartObject("位置基本信息");
            config.GetAnalyze <JT808_0x0200>().Analyze(ref reader, writer, config);
            writer.WriteEndObject();
        }
        public JT808_0x8B0A Deserialize(ref JT808MessagePackReader reader, IJT808Config config)
        {
            JT808_0x8B0A value = new JT808_0x8B0A();

            value.IPAddress = reader.ReadStringEndChar0();
            value.Port      = reader.ReadUInt16();
            value.UserName  = reader.ReadStringEndChar0();
            value.Password  = reader.ReadStringEndChar0();
            return(value);
        }