Skip to main content

Class: NavDataBarFieldGenericModel<S, U>

Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:57

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

Extended by

Type Parameters

Type ParameterDefault type
S extends Subscribable<any>-
U extends (sub, gpsValidity, ...args) => void(sub) => void

Implements

Constructors

Constructor

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

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

Constructor.

Parameters

ParameterTypeDescription
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>

Properties

destroyFunc()?

protected readonly optional destroyFunc: () => void

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

A function which is executed when this model is destroyed.

Returns

void


gpsValidity

readonly gpsValidity: Subscribable<NavDataFieldGpsValidity>

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

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


updateFunc

protected readonly updateFunc: U

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

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.


value

readonly value: Subscribable<SubscribableType<S>>

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

A subscribable which provides this model's value.

Implementation of

NavDataBarFieldModel.value

Methods

destroy()

destroy(): void

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

Destroys this model.

Returns

void

Implementation of

NavDataBarFieldModel.destroy


update()

update(): void

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

Updates this model.

Returns

void

Implementation of

NavDataBarFieldModel.update