Class: NavDataBarFieldConsumerNumberUnitModel<F, U>
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.
Type parameters
Name | Type |
---|---|
F | extends string |
U | extends Unit <F > = Unit <F > |
Hierarchy
NavDataBarFieldConsumerModel
<NumberUnitSubject
<F
,U
>, [number
]>↳
NavDataBarFieldConsumerNumberUnitModel
Constructors
constructor
• new NavDataBarFieldConsumerNumberUnitModel<F
, U
>(gpsValidity
, consumer
, initialVal
, consumerUnit
): NavDataBarFieldConsumerNumberUnitModel
<F
, U
>
Constructor.
Type parameters
Name | Type |
---|---|
F | extends string |
U | extends Unit <F > = Unit <F > |
Parameters
Name | Type | Description |
---|---|---|
gpsValidity | Subscribable <NavDataFieldGpsValidity > | The current validity state of the GPS data for this model. |
consumer | Consumer <number > | The event bus consumer used to derive this model's value. |
initialVal | number | The 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. |
consumerUnit | U | The unit type of the values consumed from the event bus. |
Returns
NavDataBarFieldConsumerNumberUnitModel
<F
, U
>
Overrides
NavDataBarFieldConsumerModel.constructor
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:179
Properties
consumerSubs
• Protected
Readonly
consumerSubs: ConsumerSubjectTypeMap
<[number
]>
Inherited from
NavDataBarFieldConsumerModel.consumerSubs
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:130
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
Inherited from
NavDataBarFieldConsumerModel.destroyFunc
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.
Inherited from
NavDataBarFieldConsumerModel.gpsValidity
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:73
updateFunc
• Protected
Readonly
updateFunc: (sub
: NumberUnitSubject
<F
, U
>, gpsValidity
: Subscribable
<NavDataFieldGpsValidity
>, consumerSubs
: SubscribableTypeMap
<[number
]>) => void
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.
Type declaration
▸ (sub
, gpsValidity
, consumerSubs
): void
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
Name | Type |
---|---|
sub | NumberUnitSubject <F , U > |
gpsValidity | Subscribable <NavDataFieldGpsValidity > |
consumerSubs | SubscribableTypeMap <[number ]> |
Returns
void
Inherited from
NavDataBarFieldConsumerModel.updateFunc
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:73
value
• Readonly
value: Subscribable
<NumberUnitInterface
<F
, U
>>
A subscribable which provides this model's value.
Inherited from
NavDataBarFieldConsumerModel.value
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:63
Methods
destroy
▸ destroy(): void
Destroys this model.
Returns
void
Inherited from
NavDataBarFieldConsumerModel.destroy
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:83
update
▸ update(): void
Updates this model.
Returns
void
Inherited from
NavDataBarFieldConsumerModel.update
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:160