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

#include <ExperimentStore.h>

Public Member Functions

bool copyFrom (const PhyphoxBleExperiment &exp)
 Measures, allocates and deep-copies the builder into the block; assigns characteristics; validates channels.
 
void buildDefault ()
 The experiment served when a sketch calls start() without addExperiment(): one view with a graph of channel 1 over time and a value of channel 1 — the same on every board (§3.7).
 
void clear ()
 
const ExperimentData & data () const
 
ExperimentData & data ()
 
const InputChannelInfo & input (uint8_t channel) const
 1 … inputChannelsUsed()
 
bool hasErrors () const
 
uint8_t inputChannelsUsed () const
 Highest input channel in use (so the serializer emits only what exists).
 
size_t blockSize () const
 bytes allocated
 
void * channelStorage () const
 Storage inside the block for the ChannelStore (ChannelStore::bytesNeeded(inputChannelsUsed())).
 
uint16_t * partTable () const
 Storage inside the block for the serializer's part table (viewCount + 3 entries).
 
 ~ExperimentStore ()
 

Static Public Member Functions

static size_t bytesNeeded (const PhyphoxBleExperiment &exp)
 Bytes the copy of exp needs (what copyFrom() would allocate) — for the size report.
 

Constructor & Destructor Documentation

◆ ~ExperimentStore()

phyphox::ExperimentStore::~ExperimentStore ( )
inline

Member Function Documentation

◆ blockSize()

size_t phyphox::ExperimentStore::blockSize ( ) const
inline

bytes allocated

◆ buildDefault()

void phyphox::ExperimentStore::buildDefault ( )

The experiment served when a sketch calls start() without addExperiment(): one view with a graph of channel 1 over time and a value of channel 1 — the same on every board (§3.7).

◆ bytesNeeded()

static size_t phyphox::ExperimentStore::bytesNeeded ( const PhyphoxBleExperiment &  exp)
static

Bytes the copy of exp needs (what copyFrom() would allocate) — for the size report.

◆ channelStorage()

void * phyphox::ExperimentStore::channelStorage ( ) const
inline

Storage inside the block for the ChannelStore (ChannelStore::bytesNeeded(inputChannelsUsed())).

◆ clear()

void phyphox::ExperimentStore::clear ( )

◆ copyFrom()

bool phyphox::ExperimentStore::copyFrom ( const PhyphoxBleExperiment &  exp)

Measures, allocates and deep-copies the builder into the block; assigns characteristics; validates channels.

Returns false if the allocation failed (ERR_06) or a channel conflict was recorded (ERR_07) — the experiment is still served with the error shown.

◆ data() [1/2]

ExperimentData & phyphox::ExperimentStore::data ( )
inline

◆ data() [2/2]

const ExperimentData & phyphox::ExperimentStore::data ( ) const
inline

◆ hasErrors()

bool phyphox::ExperimentStore::hasErrors ( ) const

◆ input()

const InputChannelInfo & phyphox::ExperimentStore::input ( uint8_t  channel) const

◆ inputChannelsUsed()

uint8_t phyphox::ExperimentStore::inputChannelsUsed ( ) const
inline

Highest input channel in use (so the serializer emits only what exists).

◆ partTable()

uint16_t * phyphox::ExperimentStore::partTable ( ) const
inline

Storage inside the block for the serializer's part table (viewCount + 3 entries).


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