Skip to main content

Class: NavDataBarFieldGenericModel<S, U>

A navigation data bar field data model which uses an arbitrary subscribable to provide its value and function to update the value.

Type parameters

NameType
Sextends Subscribable<any>
Uextends (sub: S, gpsValidity: Subscribable<NavDataFieldGpsValidity>, ...args: any[]) => void = (sub: S) => void

Hierarchy

Implements

Constructors

constructor

new NavDataBarFieldGenericModel<S, U>(sub, gpsValidity, updateFunc, destroyFunc?): NavDataBarFieldGenericModel<S, U>

Constructor.

Type parameters

NameType
Sextends Subscribable<any>
Uextends (sub: S, gpsValidity: Subscribable<NavDataFieldGpsValidity>, ...args: any[]) => void = (sub: S) => void

Parameters

NameTypeDescription
subSThe subscribable used to provide this model's value.
gpsValiditySubscribable<NavDataFieldGpsValidity>The current validity state of the GPS data for this model.
updateFuncUThe function used to update this model's value. Can take an arbitrary number of arguments, but the first must be the subscribable used to provide this model's value, and the second the model's GPS validity.
destroyFunc?() => voidA function which is executed when this model is destroyed.

Returns

NavDataBarFieldGenericModel<S, U>

Defined in

src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:73

Properties

destroyFunc

Protected Optional Readonly destroyFunc: () => void

A function which is executed when this model is destroyed.

Type declaration

▸ (): void

A function which is executed when this model is destroyed.

Returns

void

Defined in

src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:73


gpsValidity

Readonly gpsValidity: Subscribable<NavDataFieldGpsValidity>

The current validity state of the GPS data for this model.

Defined in

src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:73


updateFunc

Protected Readonly updateFunc: U

The function used to update this model's value. Can take an arbitrary number of arguments, but the first must be the subscribable used to provide this model's value, and the second the model's GPS validity.

Defined in

src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:73


value

Readonly value: Subscribable<SubscribableType<S>>

A subscribable which provides this model's value.

Implementation of

NavDataBarFieldModel.value

Defined in

src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:63

Methods

destroy

destroy(): void

Destroys this model.

Returns

void

Implementation of

NavDataBarFieldModel.destroy

Defined in

src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:83


update

update(): void

Updates this model.

Returns

void

Implementation of

NavDataBarFieldModel.update

Defined in

src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:78