Dim Position As TPackPosition
Position.initialize
Position.Hour = DateTime.now
Position.Latitude = -16.46541
Position.Latitude = -70.487899
Dim ser As B4XSerializator ' RandomAccessFile library
ser.ConvertObjectToBytesAsync(Position,"PosType")
wait for PosType_ObjectToBytes (Success As Boolean, Bytes() As Byte)
Log($"PosType_ObjectToBytes(${Success},${Bytes.Length})"$)
Dim ser As B4XSerializator
ser.ConvertBytesToObject(Bytes)
wait for PosType_BytesToObject (Success As Boolean, NewObject As Object)
Log($"PosType_BytesToObject(${Success}, ${NewObject})"$)