Skip to main content

Class: SharedDataBusClient

Defined in: src/sdk/data/SharedDataBus.ts:173

Experimental

A host of data that is stored in a global object shared between instruments, which allows for the host to update the data to multiple subscriber instruments. This API is still under development and should not be used for production code.

Extended by

Constructors

Constructor

new SharedDataBusClient(sharedGlobalName): SharedDataBusClient

Defined in: src/sdk/data/SharedDataBus.ts:190

Experimental

Creates an instance of SharedDataBushost.

Parameters

ParameterTypeDescription
sharedGlobalNamestringThe name of the shared global object that will hold the data. This API is still under development and should not be used for production code.

Returns

SharedDataBusClient

Properties

_isAlive

protected readonly _isAlive: Subject<boolean>

Defined in: src/sdk/data/SharedDataBus.ts:178

Experimental


data

protected data: Map<string, Map<number, DataItem<any>>>

Defined in: src/sdk/data/SharedDataBus.ts:175

Experimental


isAlive

readonly isAlive: Subscribable<boolean>

Defined in: src/sdk/data/SharedDataBus.ts:183

Experimental

Signals if the data bus host is alive and available for writing and reading. This API is still under development and should not be used for production code.


localSubjects

protected localSubjects: Map<string, Map<number, DistributedSubject<any>>>

Defined in: src/sdk/data/SharedDataBus.ts:176

Experimental


sharedGlobalName

protected sharedGlobalName: string

Defined in: src/sdk/data/SharedDataBus.ts:190

Experimental

The name of the shared global object that will hold the data. This API is still under development and should not be used for production code.

Methods

getDataItem()

protected getDataItem<T, K>(key, sourceId): DataItem<T[K]>

Defined in: src/sdk/data/SharedDataBus.ts:278

Experimental

Gets the data item from the shared storage.

Type Parameters

Type ParameterDefault type
T-
K extends stringkeyof T & string

Parameters

ParameterTypeDescription
keyKThe key to the data item.
sourceIdnumberThe ID of the data item source.

Returns

DataItem<T[K]>

The requested data item. This API is still under development and should not be used for production code.


getSubscribable()

getSubscribable<T, K>(key, sourceId): Subscribable<Readonly<DataItemValue<T[K]>>>

Defined in: src/sdk/data/SharedDataBus.ts:253

Experimental

Gets a subscribable for a data item.

Type Parameters

Type ParameterDefault type
T-
K extends stringkeyof T & string

Parameters

ParameterTypeDescription
keyKThe key of the data item.
sourceIdnumberThe ID of the source to get the data item from.

Returns

Subscribable<Readonly<DataItemValue<T[K]>>>

The requested subscribable. This API is still under development and should not be used for production code.


initSharedGlobal()

protected initSharedGlobal(): Promise<void>

Defined in: src/sdk/data/SharedDataBus.ts:217

Experimental

Creates the shared global to store data in.

Returns

Promise<void>


of()

of<T>(): TypedDataBusClient<T>

Defined in: src/sdk/data/SharedDataBus.ts:242

Experimental

Applies an data items type to the data bus.

Type Parameters

Type Parameter
T

Returns

TypedDataBusClient<T>

The data bus with the data items type applied. This API is still under development and should not be used for production code.


update()

update(): void

Defined in: src/sdk/data/SharedDataBus.ts:304

Experimental

Updates the data bus to notify subscribers of updated data items. This API is still under development and should not be used for production code.

Returns

void