deserialize method

  1. @override
Log deserialize(
  1. ByteDataReader reader
)

Implementation

@override
Log deserialize(ByteDataReader reader) {
  //deserializes a message object of type Log
  final data = Log();
  // Deserialize message field [header]
  data.header = Header.$prototype.deserialize(reader);
  // Deserialize message field [level]
  data.level = reader.readUint8();
  // Deserialize message field [name]
  data.name = reader.readString();
  // Deserialize message field [msg]
  data.msg = reader.readString();
  // Deserialize message field [file]
  data.file = reader.readString();
  // Deserialize message field [function]
  data.function = reader.readString();
  // Deserialize message field [line]
  data.line = reader.readUint32();
  // Deserialize message field [topics]
  data.topics = reader.readArray<String>(() => reader.readString(), arrayLen: null);
  return data;
}