Skip to content

Home > resol-vbus-core > Packet

Packet class ​

A VBus version 1.x packet.

Signature:

typescript
export declare class Packet extends Header

Extends: Header

Constructors ​

Constructor

Modifiers

Description

(constructor)(options)

Construct a packet.

Properties ​

Property

Modifiers

Type

Description

command

number

The command.

frameCount

number

The frame count.

frameData

Uint8Array

The frame data.

Methods ​

Method

Modifiers

Description

compareTo(otherHeader)

Compare this packet to another Header.

getFrameData()

Get used part of the frame data (capped at length of frameCount * 4).

getId()

Get the ID.

getMajorVersion()

Get the major VBus version.