Avionics
Core avionics package for CURE flight computers
Loading...
Searching...
No Matches
DataSaverMock Class Reference

#include <DataSaver_mock.h>

Inheritance diagram for DataSaverMock:
Inheritance graph
Collaboration diagram for DataSaverMock:
Collaboration graph

Public Member Functions

int saveDataPoint (const DataPoint &dp, uint8_t name) override
 Persist a data point with a source identifier.
void clear ()
void assertSaveDataPointCalledWith (const DataPoint &expectedDp, uint8_t expectedName)
Public Member Functions inherited from IDataSaver
virtual int saveDataPoint (float data, uint32_t timestamp_ms, uint8_t name) final
 Convenience overload to construct and save a data point.
virtual bool begin ()
 Optional hook for initialization.
virtual void launchDetected (uint32_t launchTimestamp_ms)
 Notification that launch has been detected.

Public Attributes

std::vector< std::pair< DataPoint, uint8_t > > saveDataPointCalls

Detailed Description

Definition at line 10 of file DataSaver_mock.h.

Member Function Documentation

◆ assertSaveDataPointCalledWith()

void DataSaverMock::assertSaveDataPointCalledWith ( const DataPoint & expectedDp,
uint8_t expectedName )
inline

Definition at line 28 of file DataSaver_mock.h.

◆ clear()

void DataSaverMock::clear ( )
inline

Definition at line 23 of file DataSaver_mock.h.

◆ saveDataPoint()

int DataSaverMock::saveDataPoint ( const DataPoint & dp,
uint8_t name )
inlineoverridevirtual

Persist a data point with a source identifier.

Parameters
dpData point to store.
name8-bit identifier (sensor/channel) saved alongside the value.
Note
When to use: primary write path for subclasses; implement in each concrete saver.

Implements IDataSaver.

Definition at line 17 of file DataSaver_mock.h.

Member Data Documentation

◆ saveDataPointCalls

std::vector<std::pair<DataPoint, uint8_t> > DataSaverMock::saveDataPointCalls

Definition at line 14 of file DataSaver_mock.h.


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