Open source solution
eProsima Fast Buffers is an open source serialization engine optimized for performance, beating alternatives such as Apache Thrift and Google Protocol Buffers in both Simple and Complex Structures.
eProsima Fast Buffers generates serialization code for your structured data from its definition in an Interface Description Language (IDL). If you need Dynamic Type definition at runtime, please check eProsima Dynamic Fast Buffers.
Main Advantages:
|
Available Documentation:
Videos | Performance Benchmarks | Manuals |
Thrift vs Protocol Buffers vs Fast Buffers
|
A quick example:
You write an .IDL file like this:
struct VehiclePosition { long vehicleId; float x; float y; };
Then you compile the file with the fastbuffers compiler to generate C++ code. Afterwards, you use that code to serialize your data:
FastBuffer fastbuffer; VehiclePositionSer VehiclePosition_ser(fastbuffer); // Structure to serialize. VehiclePosition ser_var; // Here the structure has to be initialized. ser_var.vehicleId(1); ser_var.x(10.5); ser_var.y(20.1); // Serialization. VehiclePosition_ser << ser_var;
or to deserialize:
// Reset the reading position in the serializer object to start deserialization. VehiclePosition_ser.reset(); // The buffer will be deserialized in the next structure. VehiclePosition des_var; // Deserialization. VehiclePosition_ser >> des_var; // print your data cout << des_var.vehicleId() << endl; cout << des_var.x() << endl; cout << des_var.y() << endl;
More Information about eProsima Fast Buffers:
For any questions please contact