Home Reference Source Test
import AtomicTimetag from 'osc-js/src/atomic/timetag.js'
public class | source

AtomicTimetag

Extends:

Atomic → AtomicTimetag

64-bit big-endian fixed-point time tag, semantics defined below OSC Atomic Data Type

Test:

Constructor Summary

Public Constructor
public

Create a AtomicTimetag instance

Member Summary

Public Members
public
public

Method Summary

Public Methods
public

Interpret the given timetag as packed binary data

public

unpack(dataView: DataView, initialOffset: number): number

Unpack binary data from DataView and read a timetag

Inherited Summary

From class Atomic
public
public

value: *

public

pack(method: string, byteLength: number): Uint8Array

Interpret the given value of this entity as packed binary data

public

unpackWithMethod(dataView: DataView, method: string, byteLength: number, initialOffset: number): number

Unpack binary data from DataView according to the given format

Public Constructors

public constructor(value: number | Timetag | Date) source

Create a AtomicTimetag instance

Override:

Atomic#constructor

Params:

NameTypeAttributeDescription
value number | Timetag | Date
  • optional

Initial date, leave empty if you want it to be the current date

Public Members

public offset: number source

Override:

Atomic#offset

public value: Timetag source

Override:

Atomic#value

Public Methods

public pack(): Uint8Array source

Interpret the given timetag as packed binary data

Override:

Atomic#pack

Return:

Uint8Array

Packed binary data

Test:

public unpack(dataView: DataView, initialOffset: number): number source

Unpack binary data from DataView and read a timetag

Params:

NameTypeAttributeDescription
dataView DataView

The DataView holding the binary representation of the timetag

initialOffset number
  • optional
  • default: 0

Offset of DataView before unpacking

Return:

number

Offset after unpacking

Test: