#include <ImFusion/Base/VitalsDataComponent.h>
A scalar time series.
More...
|
|
std::optional< Sample > | closest (TimePoint queryTimestamp, Duration maxDifference=std::chrono::milliseconds{100}) const |
| | Find the sample closest in time to the given timestamp.
|
| |
|
void | trimBefore (TimePoint earliestTimeToKeep) |
| | Remove all samples older than a set threshold.
|
| |
|
bool | operator== (const TimeSeries &other) const |
| |
|
bool | operator!= (const TimeSeries &other) const |
| |
|
std::string | saveToString () const |
| | Saves the state of this object into a string. Internally uses saveToBuffer.
|
| |
|
void | loadFromString (const std::string &str) |
| | Restores the state of this object from a string, internally using loadFromBuffer.
|
| |
|
|
std::deque< double > | m_signal |
| |
|
std::deque< TimePoint > | m_timestamps |
| | Maintained to be sorted with increasing time.
|
| |
|
std::pair< double, double > | m_signalRange |
| |
|
std::pair< TimePoint, TimePoint > | m_timestampRange |
| |
|
|
void | add (TimePoint timestamp, double signalSample) |
| | Add a sample with corresponding timestamp.
|
| |
|
void | updateRanges () |
| | Update the cached signal and timestamp ranges. To be used after bulk operations.
|
| |
|
void | validateSeries () const |
| | Checks that the containers have the same length and time is sorted.
|
| |
| size_t | saveBufferSize () const override |
| | Returns the total amount of bytes required for serialization.
|
| |
|
size_t | saveBufferSize (size_t seriesLength) const |
| |
| void | loadFromBuffer (const char *buffer, size_t len) override |
| | Restores the state of this object from a memory buffer, using maximum len bytes.
|
| |
| void | saveToBuffer (char *buffer) const override |
| | Saves the state of this object into a memory buffer, using maximum saveBufferSize() bytes.
|
| |
|
template<typename T> |
| size_t | serializeMember (char *&buffer, const T *data, size_t n=1) const |
| | Convenience method to memcpy n*sizeof(T) bytes of data to buffer, followed by an increment of buffer by n*sizeof(T).
|
| |
|
template<typename T> |
| size_t | deserializeMember (const char *&buffer, T *data, size_t n=1) |
| | Convenience method to memcpy n*sizeof(T) bytes of buffer to data, followed by an increment of buffer by n*sizeof(T).
|
| |
|
|
friend | VitalsDataComponent |
| |
◆ saveBufferSize()
| size_t saveBufferSize |
( |
| ) |
const |
|
overrideprotectedvirtual |
Returns the total amount of bytes required for serialization.
Implements BinarySerializable.
◆ loadFromBuffer()
| void loadFromBuffer |
( |
const char * | buffer, |
|
|
size_t | len ) |
|
overrideprotectedvirtual |
Restores the state of this object from a memory buffer, using maximum len bytes.
Implements BinarySerializable.
◆ saveToBuffer()
| void saveToBuffer |
( |
char * | buffer | ) |
const |
|
overrideprotectedvirtual |
The documentation for this class was generated from the following file:
- ImFusion/Base/VitalsDataComponent.h