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
Name | Type |
---|---|
S | extends Subscribable <any > |
U | extends (sub : S , gpsValidity : Subscribable <NavDataFieldGpsValidity >, ...args : any []) => void = (sub : S ) => void |
Hierarchy
NavDataBarFieldGenericModel
Implements
NavDataBarFieldModel
<SubscribableType
<S
>>
Constructors
constructor
• new NavDataBarFieldGenericModel<S
, U
>(sub
, gpsValidity
, updateFunc
, destroyFunc?
): NavDataBarFieldGenericModel
<S
, U
>
Constructor.
Type parameters
Name | Type |
---|---|
S | extends Subscribable <any > |
U | extends (sub : S , gpsValidity : Subscribable <NavDataFieldGpsValidity >, ...args : any []) => void = (sub : S ) => void |
Parameters
Name | Type | Description |
---|---|---|
sub | S | The subscribable used to provide this model's value. |
gpsValidity | Subscribable <NavDataFieldGpsValidity > | The current validity state of the GPS data for this model. |
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. |
destroyFunc? | () => void | A 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
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:63
Methods
destroy
▸ destroy(): void
Destroys this model.
Returns
void
Implementation of
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:83
update
▸ update(): void
Updates this model.
Returns
void
Implementation of
Defined in
src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:78