ImFusion SDK 4.3
StreamData Class Referenceabstract

#include <ImFusion/Stream/StreamData.h>

Base class for all data streamed from a streaming device. More...

+ Inheritance diagram for StreamData:

Detailed Description

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.

Examples
ExampleStreams.cpp.

Public Member Functions

virtual std::unique_ptr< StreamDataclone () const =0
 
virtual Streamstream () 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 DataComponentListcomponents () const
 Returns the list of DataComponents for this data.
 
DataComponentListcomponents ()
 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

Streamm_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.
 

The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close