DUECA/DUSIME
|
DataTimeSpec is a special bare-bones version of TimeSpec. More...
Public Types | |
typedef DataTimeSpec | __ThisDCOType__ |
typedef for internal reference | |
Public Member Functions | |
DataTimeSpec () | |
default constructor. More... | |
DataTimeSpec (const TimeTickType &validity_start, const TimeTickType &validity_end) | |
Constructor with arguments. | |
DataTimeSpec (const DataTimeSpec &o) | |
copy constructor. More... | |
DataTimeSpec (::dueca::AmorphReStore &r) | |
constructor to restore an DataTimeSpec from amorphous storage. More... | |
~DataTimeSpec () | |
destructor. More... | |
void | packData (::dueca::AmorphStore &s) const |
packs the DataTimeSpec into amorphous storage. More... | |
void | packDataDiff (::dueca::AmorphStore &s, const DataTimeSpec &ref) const |
packs the DataTimeSpec into amorphous storage. More... | |
void | unPackData (::dueca::AmorphReStore &s) |
unpacks the DataTimeSpec from an amorphous storage. More... | |
void | unPackDataDiff (::dueca::AmorphReStore &s) |
unpacks the differences for DataTimeSpec from an amorphous storage. More... | |
bool | operator== (const DataTimeSpec &o) const |
Test for equality. More... | |
bool | operator!= (const DataTimeSpec &o) const |
Test for inequality. More... | |
DataTimeSpec & | operator= (const DataTimeSpec &o) |
Assignment operator. More... | |
std::ostream & | print (std::ostream &s) const |
prints the DataTimeSpec to a stream. More... | |
DataTimeSpec (const TimeSpec &time_spec) | |
Copy constructor, DataTimeSpec objects are often created from a PeriodicTimeSpec or TimeSpec object. More... | |
DataTimeSpec (TimeTickType validity_start) | |
Constructor for a TimeSpec that starts and ends at the same time. More... | |
TimeTickType | getValidityStart () const |
Returns the time at which the interval starts. | |
TimeTickType | getValidityEnd () const |
Returns the time at which the interval has ended. | |
TimeTickType | getValiditySpan () const |
Returns the size of the interval. | |
DataTimeSpec & | operator= (const TimeSpec &other) |
Set the DataTimeSpec to the value of a normal TimeSpec. | |
double | getDtInSeconds () const |
Get the value of the interval in seconds. | |
int | getUsecsElapsed () const |
Find out how many microseconds elapsed since the formal start of this time. More... | |
bool | extendsOrIsAfter (const TimeTickType ts) const |
Test whether this time spec is "after" the given time. More... | |
DataTimeSpec | modifyToAfter (const TimeTickType ts) const |
Modify a time spec to not start earlier than ts. | |
DataTimeSpec | operator+ (const int &delta) const |
Add a certain value to the time. | |
DataTimeSpec | operator+ (const double delta) const |
Move an interval up with a time in seconds. | |
DataTimeSpec | operator+ (const float delta) const |
Move an interval up with a time in seconds. | |
DataTimeSpec | operator- (const int &delta) const |
Subtract a certain value from the time. | |
DataTimeSpec | operator- (const double delta) const |
Move an interval up with a time in seconds. | |
DataTimeSpec | operator- (const float delta) const |
Move an interval up with a time in seconds. | |
DataTimeSpec & | operator+= (const unsigned delta) |
Add a certain tick value to the time. | |
DataTimeSpec & | operator-= (const unsigned delta) |
Subtract a certain tick value from the time. | |
DataTimeSpec & | operator+= (const int delta) |
Add a certain value to the time. | |
DataTimeSpec & | operator-= (const int delta) |
Subtract a certain value from the time. | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
new operator "new", which places objects not on a heap, but in one of the memory arenas. More... | |
static void | operator delete (void *p) |
new operator "delete", to go with the new version of operator new. More... | |
static void * | operator new (size_t size, DataTimeSpec *&o) |
placement "new", needed for stl. More... | |
static DataTimeSpec | now () |
Static function returning a DataTimeSpec with the current time. | |
Public Attributes | |
TimeTickType | validity_start |
The time interval starts here. | |
TimeTickType | validity_end |
The time interval ends before this. | |
Static Public Attributes | |
static const char *const | classname |
The name of this class. More... | |
static const uint32_t | magic_check_number |
a "magic" number, hashed out of the class definition, that will be used to check consistency of the sent objects across the dueca nodes. More... | |
Friends | |
class | TimeSpec |
Allow my colleagues TimeSpec and PeriodicTimeSpec some leeway? | |
class | PeriodicTimeSpec |
DataTimeSpec is a special bare-bones version of TimeSpec.
It is used for storage of the time specification with the data in channels. The advantage is that DataTimeSpec has no virtual functions and thus no virtual table pointer. This does not only make it smaller, but it also make the DataTimeSpec usable across a reflective/shared memory device where a virtual table pointer would be erroneous in all but one process.
dueca::DataTimeSpec::DataTimeSpec | ( | ) |
default constructor.
dueca::DataTimeSpec::DataTimeSpec | ( | const DataTimeSpec & | o | ) |
copy constructor.
dueca::DataTimeSpec::DataTimeSpec | ( | ::dueca::AmorphReStore & | r | ) |
constructor to restore an DataTimeSpec from amorphous storage.
dueca::DataTimeSpec::~DataTimeSpec | ( | ) |
destructor.
dueca::DataTimeSpec::DataTimeSpec | ( | const TimeSpec & | time_spec | ) |
Copy constructor, DataTimeSpec objects are often created from a PeriodicTimeSpec or TimeSpec object.
dueca::DataTimeSpec::DataTimeSpec | ( | TimeTickType | validity_start | ) |
Constructor for a TimeSpec that starts and ends at the same time.
For example events are like this.
|
static |
new operator "new", which places objects not on a heap, but in one of the memory arenas.
This to speed up memory management.
|
static |
new operator "delete", to go with the new version of operator new.
|
inlinestatic |
placement "new", needed for stl.
void dueca::DataTimeSpec::packData | ( | ::dueca::AmorphStore & | s | ) | const |
packs the DataTimeSpec into amorphous storage.
void dueca::DataTimeSpec::packDataDiff | ( | ::dueca::AmorphStore & | s, |
const DataTimeSpec & | ref | ||
) | const |
packs the DataTimeSpec into amorphous storage.
only differences with a previous object are packed.
void dueca::DataTimeSpec::unPackData | ( | ::dueca::AmorphReStore & | s | ) |
unpacks the DataTimeSpec from an amorphous storage.
void dueca::DataTimeSpec::unPackDataDiff | ( | ::dueca::AmorphReStore & | s | ) |
unpacks the differences for DataTimeSpec from an amorphous storage.
bool dueca::DataTimeSpec::operator== | ( | const DataTimeSpec & | o | ) | const |
Test for equality.
|
inline |
Test for inequality.
DataTimeSpec& dueca::DataTimeSpec::operator= | ( | const DataTimeSpec & | o | ) |
Assignment operator.
std::ostream& dueca::DataTimeSpec::print | ( | std::ostream & | s | ) | const |
prints the DataTimeSpec to a stream.
int dueca::DataTimeSpec::getUsecsElapsed | ( | ) | const |
Find out how many microseconds elapsed since the formal start of this time.
|
inline |
Test whether this time spec is "after" the given time.
|
static |
The name of this class.
|
static |
a "magic" number, hashed out of the class definition, that will be used to check consistency of the sent objects across the dueca nodes.