DUECA/DUSIME
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dueca::StreamReaderLatest< T > Class Template Reference

This is a "light weight object" that enables you to read the latest set of data on a StreamChannelEnd. More...

#include <StreamReaderLatest.hxx>

Inheritance diagram for dueca::StreamReaderLatest< T >:
Inheritance graph
[legend]
Collaboration diagram for dueca::StreamReaderLatest< T >:
Collaboration graph
[legend]

Public Member Functions

 StreamReaderLatest (StreamChannelReadToken< T > &token)
 Constructor.
 
 StreamReaderLatest (StreamChannelReadToken< T > &token, const TimeSpec &dum)
 Second Constructor.
 
 ~StreamReaderLatest ()
 Destructor.
 
bool ok ()
 Check whether access can be successful.
 
- Public Member Functions inherited from dueca::DataReader< T, MatchIntervalStartOrEarlier >
 DataReader (ChannelReadToken &token, const DataTimeSpec &ts)
 Constructor.
 
 DataReader (ChannelReadToken &token, const TimeSpec &ts)
 Constructor with TimeSpec.
 
 DataReader (ChannelReadToken &token, TimeTickType ts=MAX_TIMETICK)
 Constructor with time tick.
 
const Tdata ()
 Access to the data.
 
const DataTimeSpectimeSpec ()
 Return the time specification of the data.
 
const GlobalIdorigin ()
 Return the origin.
 
 ~DataReader ()
 Destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from dueca::DataReaderBase
 DataReaderBase (ChannelReadToken &token, const DataTimeSpec &t_request)
 Constructor.
 
- Protected Attributes inherited from dueca::DataReaderBase
ChannelReadTokentoken
 Reference to the channel access token.
 
DataTimeSpec t_request
 Time span or point requested.
 
DataTimeSpec ts_data
 Time specification as realised.
 
GlobalId data_origin
 Data origin.
 
bool firstaccess
 First access flag.
 

Detailed Description

template<class T>
class dueca::StreamReaderLatest< T >

This is a "light weight object" that enables you to read the latest set of data on a StreamChannelEnd.

The idea is that this object is created "on the stack" (so new StreamReaderLatest<YourType>(token); will not work!). The access token, which you must have made and validated earlier, is used to gain access to the data. If successfull, you can call the data() method to get access to the data, and the timeSpec() method to find out about the time stamp of this data.

Note that it is seldom necessary to use StreamReaderLatest, normally you should use StreamReader.

Constructor & Destructor Documentation

◆ StreamReaderLatest() [1/2]

template<class T >
dueca::StreamReaderLatest< T >::StreamReaderLatest ( StreamChannelReadToken< T > & token)
inline

Constructor.

Gains access to the channel for which the token was made.

Parameters
tokenRead access token.

◆ StreamReaderLatest() [2/2]

template<class T >
dueca::StreamReaderLatest< T >::StreamReaderLatest ( StreamChannelReadToken< T > & token,
const TimeSpec & dum )
inline

Second Constructor.

Gains access to the channel for which the token was made. The TimeSpec argument is ignored. This constructor is only added for compatibility.

Parameters
tokenRead access token.
dumTimeSpec, ignored.

◆ ~StreamReaderLatest()

Destructor.

Releases the access again with a token.


The documentation for this class was generated from the following file: