Sensor.ISensorObserver
A specialized IMapObserver which maps an ISource to its current SensorReading.
Methods
Methods
onAdded
onAdded(source: Sensor.ISource, reading: SensorReading, collection: Map<Sensor.ISource, SensorReading>): void
Called when a the first reading is added from source.
| Parameter | Type |
|---|---|
| source | Sensor.ISource |
| reading | SensorReading |
| collection | Map<Sensor.ISource, SensorReading> |
onCollectionUpdated
onCollectionUpdated(collection: Map<Sensor.ISource, SensorReading>): void
Called when a set of changes happens within the collection.
| Parameter | Type |
|---|---|
| collection | Map<Sensor.ISource, SensorReading> |
onRemoved
onRemoved(source: Sensor.ISource, reading: SensorReading, collection: Map<Sensor.ISource, SensorReading>): void
Called when source and its reading is removed.
| Parameter | Type |
|---|---|
| source | Sensor.ISource |
| reading | SensorReading |
| collection | Map<Sensor.ISource, SensorReading> |
onUpdated
onUpdated(source: Sensor.ISource, reading: SensorReading, collection: Map<Sensor.ISource, SensorReading>): void
Called when an existing reading is altered from source.
| Parameter | Type |
|---|---|
| source | Sensor.ISource |
| reading | SensorReading |
| collection | Map<Sensor.ISource, SensorReading> |