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
readonlyendOfGroup:boolean
location
readonlylocation:Location
objectStatus
readonlyobjectStatus:ObjectStatus|null
payload
readonlypayload:Uint8Array<ArrayBufferLike> |null
properties
readonlyproperties:KeyValuePair[] |null
publisherPriority
readonlypublisherPriority:number|null
trackAlias
readonlytrackAlias:bigint
type
readonlytype:ObjectDatagramType
Accessors
groupId
Get Signature
get groupId():
bigint
Returns
bigint
objectId
Get Signature
get objectId():
bigint
Returns
bigint
Methods
serialize()
serialize():
FrozenByteBuffer
Returns
deserialize()
staticdeserialize(buf):Datagram
Parameters
buf
Returns
Datagram
newPayload()
staticnewPayload(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()
staticnewStatus(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
Returns
Datagram