Constructor
new SensorsList(sensors)
Create a sensor.
Parameters:
Name | Type | Description |
---|---|---|
sensors |
Array.<Sensor~Object> |
The array of sensor objects. |
Properties:
Name | Type | Description |
---|---|---|
sensors |
Object.<string, Sensor> |
The sensors list. |
- Source:
Methods
getList() → {Object.<string, Sensor>}
Returns the sensors list.
- Source:
getSensor(code) → {Sensor}
Returns the sensor by code.
Parameters:
Name | Type | Description |
---|---|---|
code |
string |
The sensor code. |
- Source:
Example
const sensorsList = new SensorsList(sensorObjects);
const sensor = sensorsList.getSensor("PM10");
getCodes() → {Array.<string>}
Returns the codes array.
- Source:
(async) prefetchData()
Prefetch data for all sensors.
- Source: