![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Stream/StreamData.h>
Base class for all data streamed from a streaming device. More...
Inheritance diagram for StreamData:Base class for all data streamed from a streaming device.
Contains timestamps and a list of DataComponents to transfer all associated metadata.
It is designed to be extended by specific data types, such as ImageStreamData or PolyDataStreamData, which provide additional functionality and storage of specific data.
Derived classes need to implement the clone() method to allow for copying of the derived StreamData objects from the base class pointer.
Public Member Functions | |
| virtual std::unique_ptr< StreamData > | clone () const =0 |
| virtual Stream * | stream () const |
| Returns the stream object which updates this data. | |
| virtual unsigned long long | timestampDevice () const |
| Timestamp in milliseconds. Set by the streaming device. | |
| virtual void | setTimestampDevice (unsigned long long time) |
| Set timestamp provided by the streaming device, in milliseconds. | |
| virtual unsigned long long | timestampArrival () const |
| Timestamp in milliseconds. Based on message's arrival time. | |
| virtual void | setTimestampArrival (std::chrono::system_clock::time_point time) |
| Set the system time when this streamData was arrived. It will be stored in milliseconds relative to epoch time. | |
| virtual void | setTimestampArrival (unsigned long long time) |
| Set arrival timestamp manually, in milliseconds. | |
| const DataComponentList & | components () const |
| Returns the list of DataComponents for this data. | |
| DataComponentList & | components () |
| Returns the list of DataComponents for this data. | |
| template<typename StreamDataClass> | |
| const StreamDataClass * | typed () const |
Protected Member Functions | |
| StreamData (const StreamData &other)=default | |
| StreamData (Stream *stream) | |
| StreamData (Stream *stream, DataComponentList &&components) | |
Protected Attributes | |
| Stream * | m_stream |
| The stream object which updates this data. | |
| unsigned long long | m_timestampDevice |
| Timestamp of the streaming device, in milliseconds. | |
| unsigned long long | m_timestampArrival |
| Timestamp when the data is received in ImFusion framework, in milliseconds. | |
| DataComponentList | m_dataComponentList |
| The list of DataComponents for this StreamData. | |