Skip to main content

Class: NavDataBarFieldConsumerNumberUnitModel<F, U>

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

A navigation data bar field data model which provides a NumberUnitInterface value that is derived directly from an event bus consumer.

Deprecated​

Please use NavDataBarFieldConsumerValueNumberUnitModel instead.

Extends​

Type Parameters​

Type ParameterDefault type
F extends string-
U extends Unit<F>Unit<F>

Constructors​

Constructor​

new NavDataBarFieldConsumerNumberUnitModel<F, U>(gpsValidity, consumer, initialVal, consumerUnit): NavDataBarFieldConsumerNumberUnitModel<F, U>

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

Constructor.

Parameters​

ParameterTypeDescription
gpsValiditySubscribable<NavDataFieldGpsValidity>The current validity state of the GPS data for this model.
consumerConsumer<number>The event bus consumer used to derive this model's value.
initialValnumberThe initial consumer value with which to initialize this model. This value will be used until it is replaced by a consumed value from the event bus.
consumerUnitUThe unit type of the values consumed from the event bus.

Returns​

NavDataBarFieldConsumerNumberUnitModel<F, U>

Overrides​

NavDataBarFieldConsumerModel.constructor

Properties​

consumerSubs​

protected readonly consumerSubs: ConsumerSubjectTypeMap<[number]>

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

Inherited from​

NavDataBarFieldConsumerModel.consumerSubs


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

Inherited from​

NavDataBarFieldConsumerModel.destroyFunc


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.

Inherited from​

NavDataBarFieldConsumerModel.gpsValidity


updateFunc()​

protected readonly updateFunc: (sub, gpsValidity, consumerSubs) => void

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.

Parameters​

ParameterType
subNumberUnitSubject
gpsValiditySubscribable<NavDataFieldGpsValidity>
consumerSubsSubscribableTypeMap<[number]>

Returns​

void

Inherited from​

NavDataBarFieldConsumerModel.updateFunc


value​

readonly value: Subscribable<NumberUnitInterface<F, U>>

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

A subscribable which provides this model's value.

Inherited from​

NavDataBarFieldConsumerModel.value

Methods​

destroy()​

destroy(): void

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

Destroys this model.

Returns​

void

Inherited from​

NavDataBarFieldConsumerModel.destroy


update()​

update(): void

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

Updates this model.

Returns​

void

Inherited from​

NavDataBarFieldConsumerModel.update