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

AtomicString

Extends:

Atomic → AtomicString

A sequence of non-null ASCII characters OSC Atomic Data Type

Test:

Constructor Summary

Public Constructor
public

Create an AtomicString instance

Member Summary

Public Members
public
public

Method Summary

Public Methods
public

Interpret the given string as packed binary data

public

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

Unpack binary data from DataView and read a string

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: string) source

Create an AtomicString instance

Override:

Atomic#constructor

Params:

NameTypeAttributeDescription
value string
  • optional

Initial string value

Public Members

public offset: number source

Override:

Atomic#offset

public value: string source

Override:

Atomic#value

Public Methods

public pack(): Uint8Array source

Interpret the given string 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 string

Params:

NameTypeAttributeDescription
dataView DataView

The DataView holding the binary representation of the string

initialOffset number
  • optional
  • default: 0

Offset of DataView before unpacking

Return:

number

Offset after unpacking

Test: