This example demonstrates how a single format can be defined using a virtual format method, which can be used for both serialization and deserialization.
#include "../include/serdes.h"
#include <stdio.h>
{
int32_t x = -9, y = 10, z = -11;
{
serdes_process_object + x + y + z;
}
};
int main()
{
uint16_t serial_data[6] = {0x0000, 0x0001, 0x0000, 0x0002, 0xFFFF, 0xFFFB};
coordinates obj;
auto load_result = obj.load(serial_data);
auto store_result = obj.store(serial_data);
printf("Loaded x = %i, y = %i, z = %i (%zu bits total) with %s\n",
printf("Stored x = %i, y = %i, z = %i (%zu bits total) with %s\n",
}