#include <WOscTimeTag.h>
Inherited by WOscBundle, and WOscQueueItem.
Public Types | |
| enum | Constants { TIME_TAG_SIZE = 8 } |
Public Member Functions | |
| WOscTimeTag () | |
| WOscTimeTag (const char *rawTimeTag) | |
| WOscTimeTag (const WOscTimeTag &rhs) | |
| void | SetToCurrentTime (const WOscSystemTime *systemTime=NULL) |
| void | SetToImmediateTime () |
| void | SetToLargestTimeTag () |
| void | SetToSmallestTimeTag () |
| WOscTimeTag | operator+ (const WOscTimeTag &rhs) const |
| WOscTimeTag | operator+= (const WOscTimeTag &rhs) |
| WOscTimeTag | operator= (const WOscTimeTag &rhs) |
| WOscTimeTag | operator- (const WOscTimeTag &rhs) const |
| WOscTimeTag | operator-= (const WOscTimeTag &rhs) |
| bool | operator< (const WOscTimeTag &rhs) const |
| bool | operator<= (const WOscTimeTag &rhs) const |
| bool | operator== (const WOscTimeTag &rhs) const |
| bool | operator!= (const WOscTimeTag &rhs) const |
| bool | operator> (const WOscTimeTag &rhs) const |
| bool | operator>= (const WOscTimeTag &rhs) const |
| const char * | ToCharArray () const |
| void | WriteToCharArray (char *buffer) const |
| void | InitFromCharArray (const char *buffer) |
| uint64_t | GetRawTimeTag () const |
Static Public Member Functions | |
| static WOscTimeTag | GetCurrentTime (const WOscSystemTime *systemTime=NULL) |
| static WOscTimeTag | GetImmediateTime () |
| static WOscTimeTag | GetLargestTimeTag () |
| static WOscTimeTag | GetSmallestTimeTag () |
Friends | |
| class | WOscSystemTime |
WOscClient.cpp, and WOscServer.cpp.
Definition at line 87 of file WOscTimeTag.h.
|
|
Time-tag related constants.
Reimplemented in WOscBundle. Definition at line 126 of file WOscTimeTag.h. 00127 {
00128 TIME_TAG_SIZE = 8, /**< buffer size for char-arrayed timetags.*/
00129 };
|
|
|
Constructor Initializes the time-tag to immediate time. Definition at line 96 of file WOscTimeTag.cpp. 00097 {
00098 m_timeTag = 1;
00099 }
|
|
|
Construct an OSC-time tag from a raw OSC (network) byte- stream (buffer). The OSC (network) buffer has to be big-endian
Definition at line 113 of file WOscTimeTag.cpp. References InitFromCharArray(). 00114 {
00115 InitFromCharArray(rawTimeTag);
00116 }
|
|
|
Copy constructor. Initializes the current time-tag with the data from the referenced.
Definition at line 124 of file WOscTimeTag.cpp. References m_timeTag. 00125 {
00126 m_timeTag = rhs.m_timeTag;
00127 }
|
|
|
Returns the current system time. A optional system-time object can be passed, which implements the system specific system-time-query.
Definition at line 141 of file WOscTimeTag.cpp. References WOscSystemTime::GetSystemTime(). 00141 {
00142 if ( systemTime == NULL ){
00143 /* get library default */
00144 WOscSystemTime time;
00145 return time.GetSystemTime();
00146 }else
00147 return systemTime->GetSystemTime();
00148 }
|
|
|
Returns the "immediate" time-tag. Immediate implies the LSB set to one.
Definition at line 157 of file WOscTimeTag.cpp. References m_timeTag. Referenced by GetSmallestTimeTag(), WOscBundleParser::GetTimeTag(), and SetToImmediateTime(). 00158 {
00159 WOscTimeTag retTag;
00160 retTag.m_timeTag = 1;
00161 return retTag;
00162 }
|
|
|
Returns the largest possible time-tag. I.e. all bits set to one.
Definition at line 171 of file WOscTimeTag.cpp. References m_timeTag. Referenced by WOscPriorityQueue::GetEarliestTimeTag(), WOscSystemTime::GetSystemTime(), and SetToLargestTimeTag(). 00172 {
00173 WOscTimeTag retTag;
00174 retTag.m_timeTag = ULONG_LONG_MAX;
00175 return retTag;
00176 }
|
|
|
Returns the "immediate" time-tag. Immediate implies the LSB set to one.
Definition at line 185 of file WOscTimeTag.cpp. References GetImmediateTime(). Referenced by SetToSmallestTimeTag(). 00186 {
00187 return GetImmediateTime();
00188 }
|
|
|
Initializes an OSC time tag from a byte stream (big endian ordered). The byte stream buffer has to have a minimum length of TIME_TAG_SIZE.
Definition at line 479 of file WOscTimeTag.cpp. Referenced by WOscTimeTag(). 00480 {
00481 m_timeTag = WOscUtil::BufferTo<uint64_t>(buffer);
00482 }
|
|
|
Is not equal operator. Returns true if the right time-tag is different from the left.
Definition at line 391 of file WOscTimeTag.cpp. 00392 {
00393 return (m_timeTag != rhs.m_timeTag);
00394 }
|
|
|
Add operator. Adds the right-hand time-tag to the left-hand time-tag and returns the result without modifying the left-hand time-tag.
Definition at line 252 of file WOscTimeTag.cpp. References m_timeTag. 00253 {
00254 WOscTimeTag retTag;
00255 retTag.m_timeTag = m_timeTag + rhs.m_timeTag;
00256 return retTag;
00257 }
|
|
|
Add and assign operator. Adds the right-hand time-tag to the left-hand time-tag, stores the result in the left-hand time-tag and returns the result.
Definition at line 288 of file WOscTimeTag.cpp. References m_timeTag. 00289 {
00290 m_timeTag =+ rhs.m_timeTag;
00291 return *this;
00292 }
|
|
|
Subtract operator. Subtracts the right-hand time-tag from the left-hand time-tag and returns the result without modifying the left-hand time-tag.
Definition at line 305 of file WOscTimeTag.cpp. References m_timeTag. 00306 {
00307 WOscTimeTag retTag;
00308 retTag.m_timeTag = m_timeTag - rhs.m_timeTag;
00309 return retTag;
00310 }
|
|
|
Subtract and assign operator. Subtracts the right-hand time-tag from the left-hand time-tag, stores the result in the left-hand time-tag and returns the result.
Definition at line 324 of file WOscTimeTag.cpp. References m_timeTag. 00325 {
00326 m_timeTag -= rhs.m_timeTag;
00327 return *this;
00328 }
|
|
|
Smaller or equal comparison operator. Returns true if the left time-tag is smaller (older) than the right.
Definition at line 342 of file WOscTimeTag.cpp. 00343 {
00344 return (m_timeTag < rhs.m_timeTag);
00345 }
|
|
|
Smaller or equal comparison operator. Returns true if the left time-tag is smaller (older) or equal (same time) than the right.
Definition at line 359 of file WOscTimeTag.cpp. 00360 {
00361 return (m_timeTag <= rhs.m_timeTag);
00362 }
|
|
|
Assignment operator. Assigns the right-hand time-tag to the left-hand time-tag and returns it.
Definition at line 270 of file WOscTimeTag.cpp. References m_timeTag. 00271 {
00272 m_timeTag = rhs.m_timeTag;
00273 return *this;
00274 }
|
|
|
Is equal operator. Returns true if the right time-tag is equal to the left.
Definition at line 375 of file WOscTimeTag.cpp. 00376 {
00377 return (m_timeTag == rhs.m_timeTag);
00378 }
|
|
|
Bigger comparison operator. Returns true if the right time-tag is smaller (older) than the left.
Definition at line 408 of file WOscTimeTag.cpp. 00409 {
00410 return (m_timeTag > rhs.m_timeTag);
00411 }
|
|
|
Bigger or equal comparison operator. Returns true if the right time-tag is smaller (older) or equal (same time) than the left.
Definition at line 425 of file WOscTimeTag.cpp. 00426 {
00427 return (m_timeTag >= rhs.m_timeTag);
00428 }
|
|
|
Sets this time-tag to the current system time. A optional system-time object can be passed, which implements the system specific system-time-query.
Definition at line 203 of file WOscTimeTag.cpp. 00204 {
00205 *this = systemTime->GetSystemTime();
00206 }
|
|
|
Sets this time tag to immediate time.
Definition at line 214 of file WOscTimeTag.cpp. References GetImmediateTime(). 00215 {
00216 *this = GetImmediateTime();
00217 }
|
|
|
Sets this time tag to the biggest time-tag possible.
Definition at line 225 of file WOscTimeTag.cpp. References GetLargestTimeTag(). 00226 {
00227 *this = GetLargestTimeTag();
00228 }
|
|
|
Sets this time tag to the smallest time-tag possible.
Definition at line 236 of file WOscTimeTag.cpp. References GetSmallestTimeTag(). 00237 {
00238 *this = GetSmallestTimeTag();
00239 }
|
|
|
Returns a new char array of size TIME_TAG_SIZE filled with the network aligned (big endian) timetag. The caller has to free the allocated memory.
Definition at line 444 of file WOscTimeTag.cpp. 00445 {
00446 char* buffer = new char[sizeof(uint64_t)];
00447 WOscUtil::FillBufferWith(buffer, m_timeTag);
00448 return buffer;
00449 }
|
|
|
Fill the given buffer with the network char array representation of an OSC time tag.
Definition at line 461 of file WOscTimeTag.cpp. 00462 {
00463 WOscUtil::FillBufferWith(buffer, m_timeTag);
00464 }
|
1.4.1