public JTNE_0x02_0x05 Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int            offset         = 0;
            JTNE_0x02_0x05 jTNE_0X02_0X05 = new JTNE_0x02_0x05();

            jTNE_0X02_0X05.TypeCode      = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X05.PositioStatus = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X05.Lng           = JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset);
            jTNE_0X02_0X05.Lat           = JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset);
            readSize = offset;
            return(jTNE_0X02_0X05);
        }
        public JTNE_0x02_0x01_Platform Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int offset = 0;
            JTNE_0x02_0x01_Platform jTNE_0X02_0X01_Platform = new JTNE_0x02_0x01_Platform();

            jTNE_0X02_0X01_Platform.TypeCode      = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01_Platform.CarStatus     = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01_Platform.ChargeStatus  = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01_Platform.OperationMode = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01_Platform.Speed         = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X01_Platform.TotalDis      = JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset);
            jTNE_0X02_0X01_Platform.TotalVoltage  = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X01_Platform.TotalTemp     = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X01_Platform.SOC           = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01_Platform.DCStatus      = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01_Platform.Stall         = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01_Platform.Resistance    = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            readSize = offset;
            return(jTNE_0X02_0X01_Platform);
        }
Ejemplo n.º 3
0
        public JTNE_0x02_0x07 Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int            offset         = 0;
            JTNE_0x02_0x07 jTNE_0X02_0X07 = new JTNE_0x02_0x07();

            jTNE_0X02_0X07.TypeCode         = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X07.AlarmLevel       = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X07.AlarmBatteryFlag = JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset);

            jTNE_0X02_0X07.AlarmBatteryOtherCount = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X07.AlarmBatteryOthers     = new List <uint>();
            for (int i = 0; i < jTNE_0X02_0X07.AlarmBatteryOtherCount; i++)
            {
                jTNE_0X02_0X07.AlarmBatteryOthers.Add(JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset));
            }

            jTNE_0X02_0X07.AlarmElCount = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X07.AlarmEls     = new List <uint>();
            for (int i = 0; i < jTNE_0X02_0X07.AlarmElCount; i++)
            {
                jTNE_0X02_0X07.AlarmEls.Add(JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset));
            }

            jTNE_0X02_0X07.AlarmEngineCount = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X07.AlarmEngines     = new List <uint>();
            for (int i = 0; i < jTNE_0X02_0X07.AlarmEngineCount; i++)
            {
                jTNE_0X02_0X07.AlarmEngines.Add(JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset));
            }

            jTNE_0X02_0X07.AlarmOtherCount = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X07.AlarmOthers     = new List <uint>();
            for (int i = 0; i < jTNE_0X02_0X07.AlarmOtherCount; i++)
            {
                jTNE_0X02_0X07.AlarmOthers.Add(JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset));
            }

            readSize = offset;
            return(jTNE_0X02_0X07);
        }
        public JTNE_0x02_0x01 Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int            offset         = 0;
            JTNE_0x02_0x01 jTNE_0X02_0X01 = new JTNE_0x02_0x01();

            jTNE_0X02_0X01.TypeCode      = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01.CarStatus     = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01.ChargeStatus  = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01.OperationMode = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01.Speed         = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X01.TotalDis      = JTNEBinaryExtensions.ReadUInt32Little(bytes, ref offset);
            jTNE_0X02_0X01.TotalVoltage  = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X01.TotalTemp     = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X01.SOC           = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01.DCStatus      = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01.Stall         = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01.Resistance    = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X01.Accelerator   = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X01.Brakes        = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            readSize = offset;
            return(jTNE_0X02_0X01);
        }