DUECA/DUSIME
|
Example data access class. More...
#include <DataReader.hxx>
Public Member Functions | |
MatchIntervalStartOrEarlier (DataReaderBase &r) | |
Constructor. | |
const T & | access (DataReaderBase &r) |
extrapolate the data object data, which became valid for a time data_time, to a time in the future or past wish_time. | |
const void | release (ChannelReadToken &token) |
Release a previous access. | |
Public Attributes | |
const T * | data_ptr |
Pointer to a data copy. | |
Example data access class.
A datareader is supplied with a time specification for the requested data interval. The data access class template parameter defines how that interval is interpreted in accessing the data.
Behaviour of this MatchIntervalStartOrEarlier class, explained for four cases:
Time access reading specified for the token (Channel::JumpToMatchTime):
The accessed channel entry contains stream data:
Given a Time Specification for the requested access time (req_s, req_e), and stream data in the channel with (data_s, data_e), the latest data is returned for which (data_s <= req_s). If such data is not present, a NoDataAvailable exception is thrown.
The accessed channel entry contains event data:
Given a Time Specification for the requested access time (req_s, req_e), and event data in the channel with timestamp (data_t), the latest event is returned for which (data_t <= req_s). If no such event is found, a NoDataAvailable exception is thrown.
serial reading specified for the token (Channel::ReadAllData or Channel::ReadReservation):
The accessed channel entry contains stream data:
Given a Time Specification for the requested access time (req_s, req_e), the next datapoint is tested and returned when (data_s <= req_s). If the next datapoint does not match this, a NoDataAvailable exception is thrown.
The accessed channel entry contains event data:
Given a Time Specification for the requested access time (req_s, req_e), and event data in the channel with timestamp (data_t), the next event is returned if for that event (data_t <= req_s). If there is no such event, a NoDataAvailable exception is thrown.
Note that for this access, the combinations time access reading with stream data and serial reading with event data make most sense.
|
inline |
Constructor.
Essential to initialize data pointer to NULL
|
inline |
extrapolate the data object data, which became valid for a time data_time, to a time in the future or past wish_time.
This one actually does nothing but return the unchanged data object.
r | Base class for the calling datareader object. |