|
SofaBuffers C/C++ 0.8.0
API Documentation
|

Structured Objects For Anyone
... so optimized, feels amazing.
| Target | Status |
|---|---|
| GCC x86_64 (little endian) | |
| Clang x86_64 (little endian) | |
| GCC MIPS (big endian) | |
| GCC PowerPC (big endian) | |
| GCC RISCV-V 64 (little endian) |
The C core library is very much aimed at small embedded devices, where C is simply essential. The focus here was therefore on minimal resource consumption.
The C++ core library is aimed more at IoT devices. Such devices do not necessarily run Linux directly, but they are powerful enough to deal with C++/Heap etc. However, the focus here was also on supporting IoT devices that do not support everything specified by C++ - for example, no exceptions are used, as these are often prohibited or not supported. Similarly, std::iostream is not used, as this is often not supported or simply too heavy.
Since the focus was on embedded devices, special attention was paid to the following features during implementation:
No. SofaBuffers focuses on generating as little protocol overhead as possible, which is why the words in the payload of a message are not always aligned. To be compatible with all architectures, the data from the message is copied to user-provided memory.
This table shows the memory requirements of the C corelib for different bare metal architectures.
The lib was always built with -Os (optimized for minimal size).
| Architecture | .text | .data | .bss |
|---|---|---|---|
| ARMv6-m | ~2.6KB | 0.0KB | 0.0KB |
| ARMv7-m+fp.dp | ~2.7KB | 0.0KB | 0.0KB |
| ARMv8-m.main+fp | ~2.7KB | 0.0KB | 0.0KB |
| ARMv8.1-m.main+mve | ~2.7KB | 0.0KB | 0.0KB |
| atmega8 | ~6.3KB | 0.0KB | 0.0KB |
| Architecture | .text | .data | .bss |
|---|---|---|---|
| ARMv6-m | ~1.0KB | 0.0KB | 0.0KB |
| ARMv7-m+fp.dp | ~1.1KB | 0.0KB | 0.0KB |
| ARMv8-m.main+fp | ~1.1KB | 0.0KB | 0.0KB |
| ARMv8.1-m.main+mve | ~1.1KB | 0.0KB | 0.0KB |
| atmega8 | ~2.6KB | 0.0KB | 0.0KB |
corelib API without object.c:
| Architecture | .text | .data | .bss |
|---|---|---|---|
| ARMv6-m | ~0.8KB | 0.0KB | 0.0KB |
| ARMv7-m+fp.dp | ~0.9KB | 0.0KB | 0.0KB |
| ARMv8-m.main+fp | ~0.9KB | 0.0KB | 0.0KB |
| ARMv8.1-m.main+mve | ~0.9KB | 0.0KB | 0.0KB |
| atmega8 | ~1.9KB | 0.0KB | 0.0KB |