openDAQ
Open data acquisition platform
Stream reader
+ Collaboration diagram for Stream reader:

Detailed Description

Classes

struct  IStreamReader
 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...
 
struct  IStreamReaderBuilder
 Builder component of Stream reader objects. Contains setter methods to configure the Stream reader parameters and a build method that builds the Unit object. More...
 
class  StreamReaderBuilderPtr
 Builder component of Stream reader objects. Contains setter methods to configure the Stream reader parameters and a build method that builds the Unit object. More...
 
class  StreamReaderPtr
 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...
 

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

Function Documentation

◆ read()

daq::ReaderStatusPtr read ( void *  samples,
daq::SizeT *  count,
daq::SizeT  timeoutMs = 0 
) const
inline

Copies at maximum the next count unread samples to the values buffer. The amount actually read is returned through the count parameter.

Parameters
[in]samplesThe buffer that the samples will be copied to. The buffer must be a contiguous memory big enough to receive count amount of samples.
[in,out]countThe maximum amount of samples to be read. If the count is less than available the parameter value is set to the actual amount and only the available samples are returned. The rest of the buffer is not modified or cleared.
timeoutMsThe maximum amount of time in milliseconds to wait for the requested amount of samples before returning.
[out]statusRepresents the status of the reader.

◆ readWithDomain()

daq::ReaderStatusPtr readWithDomain ( void *  samples,
void *  domain,
daq::SizeT *  count,
daq::SizeT  timeoutMs = 0 
) const
inline

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.

Parameters
[in]samplesThe buffer that the samples will be copied to. The buffer must be a contiguous memory big enough to receive count amount of samples.
[in]domainThe buffer that the domain values will be copied to. The buffer must be a contiguous memory big enough to receive count amount of clock-stamps.
[in,out]countThe maximum amount of samples to be read. If the count is less than available the parameter value is set to the actual amount and only the available samples are returned. The rest of the buffer is not modified or cleared.
timeoutMsThe maximum amount of time in milliseconds to wait for the requested amount of samples before returning.
[out]statusRepresents the status of the reader.

◆ skipSamples()

daq::ReaderStatusPtr skipSamples ( daq::SizeT *  count) const
inline

Skips the specified amount of samples.

Parameters
[in,out]countThe maximum amount of samples to be skipped. If the count is less than available the parameter value is set to the actual amount and only the available samples are skipped. The rest of the buffer is not modified or cleared.