phyphox BLE
Plot your Arduino's data in the phyphox app and control the board from the phone
Loading...
Searching...
No Matches
phyphox::Serializer Class Reference

#include <Serializer.h>

Public Member Functions

void build (const ExperimentStore &store, const char *deviceName, uint16_t mtu)
 Bind to a store and build the part table.
 
uint32_t size () const
 bytes of the whole document
 
uint32_t crc () const
 CRC-32 of the whole document.
 
uint16_t partCount () const
 
uint32_t read (uint32_t offset, uint8_t *out, uint32_t n) const
 Copy document bytes [offset, offset + n) into out; returns bytes produced (fewer at the end).
 
void writeAll (Sink &sink) const
 Stream the entire document (printXML, host tests).
 
void emitPart (uint16_t part, Sink &sink) const
 Serialize one part into a sink (public for the tests).
 

Member Function Documentation

◆ build()

void phyphox::Serializer::build ( const ExperimentStore &  store,
const char *  deviceName,
uint16_t  mtu 
)

Bind to a store and build the part table.

deviceName goes into the bluetooth name attributes; mtu > 20 emits the mtu attribute.

◆ crc()

uint32_t phyphox::Serializer::crc ( ) const
inline

CRC-32 of the whole document.

◆ emitPart()

void phyphox::Serializer::emitPart ( uint16_t  part,
Sink &  sink 
) const

Serialize one part into a sink (public for the tests).

◆ partCount()

uint16_t phyphox::Serializer::partCount ( ) const
inline

◆ read()

uint32_t phyphox::Serializer::read ( uint32_t  offset,
uint8_t *  out,
uint32_t  n 
) const

Copy document bytes [offset, offset + n) into out; returns bytes produced (fewer at the end).

Regenerates only the parts covering the range.

◆ size()

uint32_t phyphox::Serializer::size ( ) const
inline

bytes of the whole document

◆ writeAll()

void phyphox::Serializer::writeAll ( Sink &  sink) const

Stream the entire document (printXML, host tests).


The documentation for this class was generated from the following file: