Skip to content

Home > resol-vbus-core > HeaderSet

HeaderSet class

A set of unique VBus Headers.

Signature:

typescript
export declare class HeaderSet<T extends Header = Header>

Constructors

Constructor

Modifiers

Description

(constructor)(options)

Construct a header set.

Properties

Property

Modifiers

Type

Description

headers

T[]

The list of headers.

timestamp

Date

The timestamp.

Methods

Method

Modifiers

Description

addHeader(header)

Add / replace a header to the set.

addHeaders(headers)

Add / replace a list of headers to the set.

findIndex(header)

Find the index of a header.

getHeaderCount()

Get count of headers.

getHeaders()

Get (unsorted) list of headers.

getId()

Get ID string.

getSortedHeaders()

Get sorted list of headers.

getSortedHeaderSet()

Get a new header set containing the sorted headers of this set.

removeAllHeaders()

Remove all headers from the set.

removeHeadersOlderThan(timestamp)

Remove all headers older than the provided timestamp.