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 Parameter | Default 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
| Parameter | 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>
Properties
destroyFunc()?
protectedreadonlyoptionaldestroyFunc: () =>void
Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:73
A function which is executed when this model is destroyed.
Returns
void
gpsValidity
readonlygpsValidity:Subscribable<NavDataFieldGpsValidity>
Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:73
The current validity state of the GPS data for this model.
updateFunc
protectedreadonlyupdateFunc: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
readonlyvalue:Subscribable<SubscribableType<S>>
Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:63
A subscribable which provides this model's value.
Implementation of
Methods
destroy()
destroy():
void
Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:83
Destroys this model.
Returns
void
Implementation of
update()
update():
void
Defined in: src/garminsdk/components/navdatabar/NavDataBarFieldModel.ts:78
Updates this model.
Returns
void