DUECA/DUSIME
|
This is a "light weight object" that enables you to read the latest set of data on a StreamChannelEnd. More...
#include <StreamReaderLatest.hxx>
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 T & | data () |
Access to the data. | |
const DataTimeSpec & | timeSpec () |
Return the time specification of the data. | |
const GlobalId & | origin () |
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 | |
ChannelReadToken & | token |
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. | |
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.
|
inline |
Constructor.
Gains access to the channel for which the token was made.
token | Read access token. |
|
inline |
|
inline |
Destructor.
Releases the access again with a token.