Skip to content

Class: Datagram ​

Represents a unified OBJECT_DATAGRAM message.

Type bit layout (form 0b00X0XXXX):

  • Bit 0 (0x01): PROPERTIES
  • Bit 1 (0x02): END_OF_GROUP
  • Bit 2 (0x04): ZERO_OBJECT_ID
  • Bit 3 (0x08): DEFAULT_PRIORITY
  • Bit 5 (0x20): STATUS

Properties ​

endOfGroup ​

readonly endOfGroup: boolean


location ​

readonly location: Location


objectStatus ​

readonly objectStatus: ObjectStatus | null


payload ​

readonly payload: Uint8Array<ArrayBufferLike> | null


properties ​

readonly properties: KeyValuePair[] | null


publisherPriority ​

readonly publisherPriority: number | null


trackAlias ​

readonly trackAlias: bigint


type ​

readonly type: ObjectDatagramType

Accessors ​

groupId ​

Get Signature ​

get groupId(): bigint

Returns ​

bigint


objectId ​

Get Signature ​

get objectId(): bigint

Returns ​

bigint

Methods ​

serialize() ​

serialize(): FrozenByteBuffer

Returns ​

FrozenByteBuffer


deserialize() ​

static deserialize(buf): Datagram

Parameters ​

buf ​

BaseByteBuffer

Returns ​

Datagram


newPayload() ​

static newPayload(trackAlias, groupId, objectId, publisherPriority, properties, payload, endOfGroup?): Datagram

Create a new Datagram with payload content. The type is automatically determined based on the properties.

Parameters ​

trackAlias ​

bigint

groupId ​

bigint

objectId ​

bigint

publisherPriority ​

number | null

properties ​

KeyValuePair[] | null

payload ​

Uint8Array

endOfGroup? ​

boolean = false

Returns ​

Datagram


newStatus() ​

static newStatus(trackAlias, groupId, objectId, publisherPriority, properties, objectStatus): Datagram

Create a new Datagram with Object Status (no payload). endOfGroup is always false since STATUS + END_OF_GROUP is invalid.

Parameters ​

trackAlias ​

bigint

groupId ​

bigint

objectId ​

bigint

publisherPriority ​

number | null

properties ​

KeyValuePair[] | null

objectStatus ​

ObjectStatus

Returns ​

Datagram