public int Serialize(ref byte[] bytes, int offset, JTNE_0x02_0x05_Device value) { offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.TypeCode); offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.PositioStatus); offset += JTNEBinaryExtensions.WriteUInt32Little(bytes, offset, value.Lng); offset += JTNEBinaryExtensions.WriteUInt32Little(bytes, offset, value.Lat); return(offset); }
public int Serialize(ref byte[] bytes, int offset, JTNE_0x02_0x01_Platform value) { offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.TypeCode); offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.CarStatus); offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.ChargeStatus); offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.OperationMode); offset += JTNEBinaryExtensions.WriteUInt16Little(bytes, offset, value.Speed); offset += JTNEBinaryExtensions.WriteUInt32Little(bytes, offset, value.TotalDis); offset += JTNEBinaryExtensions.WriteUInt16Little(bytes, offset, value.TotalVoltage); offset += JTNEBinaryExtensions.WriteUInt16Little(bytes, offset, value.TotalTemp); offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.SOC); offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.DCStatus); offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.Stall); offset += JTNEBinaryExtensions.WriteUInt16Little(bytes, offset, value.Resistance); return(offset); }
public int Serialize(ref byte[] bytes, int offset, JTNE_0x02_0x07 value) { offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.TypeCode); offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, value.AlarmLevel); offset += JTNEBinaryExtensions.WriteUInt32Little(bytes, offset, value.AlarmBatteryFlag); if (value.AlarmBatteryOthers != null && value.AlarmBatteryOthers.Count > 0) { offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, (byte)value.AlarmBatteryOthers.Count); foreach (var item in value.AlarmBatteryOthers) { offset += JTNEBinaryExtensions.WriteUInt32Little(bytes, offset, item); } } if (value.AlarmEls != null && value.AlarmEls.Count > 0) { offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, (byte)value.AlarmEls.Count); foreach (var item in value.AlarmEls) { offset += JTNEBinaryExtensions.WriteUInt32Little(bytes, offset, item); } } if (value.AlarmEngines != null && value.AlarmEngines.Count > 0) { offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, (byte)value.AlarmEngines.Count); foreach (var item in value.AlarmEngines) { offset += JTNEBinaryExtensions.WriteUInt32Little(bytes, offset, item); } } if (value.AlarmEngines != null && value.AlarmEngines.Count > 0) { offset += JTNEBinaryExtensions.WriteByteLittle(bytes, offset, (byte)value.AlarmOthers.Count); foreach (var item in value.AlarmOthers) { offset += JTNEBinaryExtensions.WriteUInt32Little(bytes, offset, item); } } return(offset); }