serialize

open override fun serialize(item: StorageStatus.Data): ByteArray

Serializes the given item into a ByteArray to be transmitted over the air.

The serialization can be arbitrarily chosen by the implementation of the topic. However, be sensitive about data transmission and data size.

Furthermore, the deserialize method needs to be able to de-serialize the given item into the specific class T again.

Return

A ByteArray which contains the serialized content of the given item, to be sent over the air.

Parameters

item

The item to serialize.