コード例 #1
0
 public void Serialize(ref JT809MessagePackWriter writer, JT809_JT1078_0x1B00_0x1B02 value, IJT809Config config)
 {
     writer.WriteByte((byte)value.Result);
     writer.WriteUInt16(value.SessionId);
     writer.WriteStringPadLeft(value.ServerIp, 32);
     writer.WriteUInt16(value.TcpPort);
     writer.WriteStringPadLeft(value.UserName, 49);
     writer.WriteStringPadLeft(value.Password, 22);
     writer.WriteStringPadLeft(value.FilePath, 200);
 }
コード例 #2
0
 public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1200_0x1201 value, IJT809Config config)
 {
     if (config.Version == JT809Version.JTT2011)
     {
         writer.WriteStringPadRight(value.PlateformId, 11);
         writer.WriteStringPadRight(value.ProducerId, 11);
         writer.WriteStringPadRight(value.TerminalModelType, 20);
         writer.WriteStringPadRight(value.TerminalId.ToUpper(), 7);
         writer.WriteStringPadLeft(value.TerminalSimCode, 12);
     }
     else
     {
         writer.WriteStringPadRight(value.PlateformId, 11);
         writer.WriteStringPadRight(value.ProducerId, 11);
         writer.WriteStringPadRight(value.TerminalModelType, 30);
         writer.WriteStringPadRight(value.IMIEId, 15);
         writer.WriteStringPadRight(value.TerminalId.ToUpper(), 30);
         writer.WriteStringPadRight(value.TerminalSimCode, 13);
     }
 }
コード例 #3
0
ファイル: JT809_0x1003.cs プロジェクト: yezy-h/JT809
 public void Serialize(ref JT809MessagePackWriter writer, JT809_0x1003 value, IJT809Config config)
 {
     writer.WriteUInt32(value.UserId);
     writer.WriteStringPadLeft(value.Password, 8);
 }
コード例 #4
0
 public void Serialize(ref JT809MessagePackWriter writer, JT809_JT1078_0x1A00_0x1A01 value, IJT809Config config)
 {
     writer.WriteStringPadLeft(value.ServerIp, 32);
     writer.WriteUInt16(value.ServerPort);
     writer.WriteByte(value.Result);
 }