Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
OSCTimeTag Class Reference

An OSC time tag. More...

#include <juce_OSCTimeTag.h>

Public Member Functions

 OSCTimeTag () noexcept
 Default constructor.
 
 OSCTimeTag (uint64 rawTimeTag) noexcept
 Constructs an OSCTimeTag object from a raw binary OSC time tag.
 
 OSCTimeTag (Time time) noexcept
 Constructs an OSCTimeTag object from a juce::Time object.
 
Time toTime () const noexcept
 Returns a juce::Time object representing the same time as the OSCTimeTag.
 
bool isImmediately () const noexcept
 Returns true if the OSCTimeTag object has the special value representing "immediately".
 
uint64 getRawTimeTag () const noexcept
 Returns the raw binary OSC time tag representation.
 

Static Public Attributes

static const OSCTimeTag immediately
 The special value representing "immediately".
 

Detailed Description

An OSC time tag.

OSC time tags are part of OSCBundle objects.

In accordance with the OSC 1.0 specification, the internal timestamp stored in OSCTimeTag uses the same binary format as NTP timestamps. The representation is by a 64 bit fixed point number. The first 32 bits specify the number of seconds since midnight on January 1, 1900, and the last 32 bits specify fractional parts of a second to a precision of about 200 picoseconds.

The time tag value consisting of 63 zero bits followed by a one in the least significant bit is a special case meaning "immediately".

For a more user-friendly time format, convert OSCTimeTag to a juce::Time object using toTime().

Constructor & Destructor Documentation

◆ OSCTimeTag() [1/3]

OSCTimeTag::OSCTimeTag ( )
noexcept

Default constructor.

Constructs an OSCTimeTag object with the special value representing "immediately".

◆ OSCTimeTag() [2/3]

OSCTimeTag::OSCTimeTag ( uint64 rawTimeTag)
noexcept

Constructs an OSCTimeTag object from a raw binary OSC time tag.

◆ OSCTimeTag() [3/3]

OSCTimeTag::OSCTimeTag ( Time time)
noexcept

Constructs an OSCTimeTag object from a juce::Time object.

Member Function Documentation

◆ toTime()

Time OSCTimeTag::toTime ( ) const
noexcept

Returns a juce::Time object representing the same time as the OSCTimeTag.

If the OSCTimeTag has the special value representing "immediately", the resulting juce::Time object will represent an arbitrary point of time (but guaranteed to be in the past), since juce::Time does not have such a special value.

◆ isImmediately()

bool OSCTimeTag::isImmediately ( ) const
noexcept

Returns true if the OSCTimeTag object has the special value representing "immediately".

◆ getRawTimeTag()

uint64 OSCTimeTag::getRawTimeTag ( ) const
noexcept

Returns the raw binary OSC time tag representation.

Member Data Documentation

◆ immediately

const OSCTimeTag OSCTimeTag::immediately
static

The special value representing "immediately".


The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram