openDAQ
Open data acquisition platform
StreamReaderPtr Class Reference

A signal data reader that abstracts away reading of signal packets by keeping an internal read-position and automatically advances it on subsequent reads. More...

+ Inheritance diagram for StreamReaderPtr:
+ Collaboration diagram for StreamReaderPtr:

Detailed Description

A signal data reader that abstracts away reading of signal packets by keeping an internal read-position and automatically advances it on subsequent reads.

Remarks
Currently only supports scalar sample-types and RangeInt64

Public Member Functions

daq::ReaderStatusPtr read (void *samples, daq::SizeT *count, daq::SizeT timeoutMs=0) const
 Copies at maximum the next count unread samples to the values buffer. The amount actually read is returned through the count parameter. More...
 
daq::ReaderStatusPtr readWithDomain (void *samples, void *domain, daq::SizeT *count, daq::SizeT timeoutMs=0) const
 Copies at maximum the next count unread samples and clock-stamps to the samples and domain buffers. The amount actually read is returned through the count parameter. More...
 
daq::ReaderStatusPtr skipSamples (daq::SizeT *count) const
 Skips the specified amount of samples. More...
 
- Public Member Functions inherited from GenericSampleReaderPtr< IStreamReader >
daq::SampleType getValueReadType () const
 Gets the sample-type the signal value samples will be converted to when read or SampleType::Invalid if read-type has not been determined yet. More...
 
daq::SampleType getDomainReadType () const
 Gets the sample-type the signal domain samples will be converted to when read or SampleType::Invalid if read-type has not been determined yet. More...
 
void setValueTransformFunction (const daq::FunctionPtr &transform) const
 Sets the transform function that will be called with the read value-data and currently valid Signal-Descriptor giving the user the chance add a custom post-processing step. The function should have a signature compatible with: More...
 
void setDomainTransformFunction (const daq::FunctionPtr &transform) const
 Sets the transform function that will be called with the read domain-data and currently valid Signal-Descriptor giving the user the chance add a custom post-processing step. The function should have a signature compatible with: More...
 
daq::ReadMode getReadMode () const
 Gets the reader's read mode which determines if the reader will also scale the read data or not. More...