Expand description
The C ABI for wire formats and metered-link packing.
These functions wrap [pamoja_codec] for callers that reach the SDK through
the flat C boundary. The Codec trait is generic over
the value being carried and so cannot cross a C ABI; what crosses instead is
the concrete work a caller with an untyped payload actually needs. Converting
a document between JSON and CBOR, and packing a batch of readings small enough
for a metered link.
Encoded output is bytes and comes back as a PamojaBuffer. Decoded output is
a typed series, so it comes back as PamojaSamples (int64) or
PamojaReadings (float) rather than bytes the caller would have to
reinterpret.
Structs§
- Pamoja
Readings - An opaque handle to a decoded series of float readings.
- Pamoja
Samples - An opaque handle to a decoded series of integer samples.
Functions§
- pamoja_
codec_ ⚠cbor_ to_ json - Converts a CBOR document into its JSON encoding.
- pamoja_
codec_ ⚠decode_ deltas - Decodes a delta-encoded buffer back into its integer samples.
- pamoja_
codec_ ⚠encode_ deltas - Delta-encodes a series of integer samples into a compact buffer.
- pamoja_
codec_ ⚠json_ to_ cbor - Converts a JSON document into its CBOR encoding.
- pamoja_
codec_ ⚠quantizer_ decode - Decodes a quantized batch back into float readings.
- pamoja_
codec_ ⚠quantizer_ encode - Quantizes and delta-encodes a batch of float readings.
- pamoja_
readings_ ⚠data - Returns a pointer to a decoded series of float readings.
- pamoja_
readings_ ⚠free - Releases a decoded reading series.
- pamoja_
readings_ ⚠len - Returns the number of float readings in a decoded series.
- pamoja_
samples_ ⚠data - Returns a pointer to a decoded series of integer samples.
- pamoja_
samples_ ⚠free - Releases a decoded sample series.
- pamoja_
samples_ ⚠len - Returns the number of integer samples in a decoded series.