Exemple #1
0
        public JTNE_0x80Reply_0x81 Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int offset = 0;
            JTNE_0x80Reply_0x81 jTNE_0x80Reply_0x80Reply = new JTNE_0x80Reply_0x81();

            jTNE_0x80Reply_0x80Reply.ParamValue  = JTNEBinaryExtensions.ReadBytesLittle(bytes, ref offset);
            jTNE_0x80Reply_0x80Reply.ParamLength = (byte)bytes.Length;
            readSize = offset;
            return(jTNE_0x80Reply_0x80Reply);
        }
Exemple #2
0
        public JTNE_0x81_0x0E_Device Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int offset = 0;
            JTNE_0x81_0x0E_Device jTNE_0x81_0x0E_Device = new JTNE_0x81_0x0E_Device();

            jTNE_0x81_0x0E_Device.ParamValue  = JTNEBinaryExtensions.ReadBytesLittle(bytes, ref offset);
            jTNE_0x81_0x0E_Device.ParamLength = (byte)bytes.Length;
            readSize = offset;
            return(jTNE_0x81_0x0E_Device);
        }
Exemple #3
0
        public JTNE_0x80 Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int       offset    = 0;
            JTNE_0x80 jTNE_0X80 = new JTNE_0x80();

            jTNE_0X80.QueryTime = JTNEBinaryExtensions.ReadDateTime6Little(bytes, ref offset);
            jTNE_0X80.ParamNum  = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X80.ParamList = JTNEBinaryExtensions.ReadBytesLittle(bytes, ref offset, jTNE_0X80.ParamNum);
            readSize            = offset;
            return(jTNE_0X80);
        }
Exemple #4
0
        public JTNE_0x02_0x09_Device Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int offset = 0;
            JTNE_0x02_0x09_Device jTNE_0X02_0X09 = new JTNE_0x02_0x09_Device();

            jTNE_0X02_0X09.TypeCode = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X09.BatteryTemperatureCount = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X09.BatteryTemperatures     = new List <Metadata.BatteryTemperature>();
            for (int i = 0; i < jTNE_0X02_0X09.BatteryTemperatureCount; i++)
            {
                Metadata.BatteryTemperature batteryTemperature = new Metadata.BatteryTemperature();
                batteryTemperature.BatteryAssemblyNo     = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
                batteryTemperature.TemperatureProbeCount = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
                batteryTemperature.Temperatures          = JTNEBinaryExtensions.ReadBytesLittle(bytes, ref offset, batteryTemperature.TemperatureProbeCount);
                jTNE_0X02_0X09.BatteryTemperatures.Add(batteryTemperature);
            }
            readSize = offset;
            return(jTNE_0X02_0X09);
        }
        public JTNE_0x02_0x03 Deserialize(ReadOnlySpan <byte> bytes, out int readSize)
        {
            int            offset         = 0;
            JTNE_0x02_0x03 jTNE_0X02_0X03 = new JTNE_0x02_0x03();

            jTNE_0X02_0X03.TypeCode                          = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X03.FuelBatteryVoltage                = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X03.FuelBatteryCurrent                = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X03.FuelConsumptionRate               = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X03.TemperatureProbeCount             = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X03.Temperatures                      = JTNEBinaryExtensions.ReadBytesLittle(bytes, ref offset, jTNE_0X02_0X03.TemperatureProbeCount);
            jTNE_0X02_0X03.HydrogenSystemMaxTemp             = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X03.HydrogenSystemMaxTempNo           = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X03.HydrogenSystemMaxConcentrations   = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X03.HydrogenSystemMaxConcentrationsNo = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X03.HydrogenSystemMaxPressure         = JTNEBinaryExtensions.ReadUInt16Little(bytes, ref offset);
            jTNE_0X02_0X03.HydrogenSystemMaxPressureNo       = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            jTNE_0X02_0X03.DCStatus                          = JTNEBinaryExtensions.ReadByteLittle(bytes, ref offset);
            readSize = offset;
            return(jTNE_0X02_0X03);
        }