Provides methods to update and load station and sensor data stored locally in JSON format.
More...
#include <LocalDB.h>
|
| static void | UpdateIndex (std::string data) |
| | Updates the index file with new data.
|
| |
| static void | UpdateStation (std::string stationId, std::string data) |
| | Updates a specific station's data file.
|
| |
| static void | UpdateSensor (std::string sensorId, std::string data) |
| | Updates a specific sensor's data file.
|
| |
| static bool | LoadIndex (nlohmann::json &data) |
| | Loads the index data from the local JSON file.
|
| |
| static bool | LoadStation (nlohmann::json &data, std::string stationId) |
| | Loads a specific station's data from the local JSON file.
|
| |
| static bool | LoadSensor (nlohmann::json &data, std::string sensorId) |
| | Loads a specific sensor's data from the local JSON file.
|
| |
Provides methods to update and load station and sensor data stored locally in JSON format.
◆ LoadIndex()
| static bool LocalDB::LoadIndex |
( |
nlohmann::json & | data | ) |
|
|
static |
Loads the index data from the local JSON file.
- Parameters
-
| data | Reference to a JSON object where the index data will be stored. |
- Returns
- True if the data is successfully loaded, false otherwise.
◆ LoadSensor()
| static bool LocalDB::LoadSensor |
( |
nlohmann::json & | data, |
|
|
std::string | sensorId ) |
|
static |
Loads a specific sensor's data from the local JSON file.
- Parameters
-
| data | Reference to a JSON object where the sensor data will be stored. |
| sensorId | The unique identifier of the sensor. |
- Returns
- True if the data is successfully loaded, false otherwise.
◆ LoadStation()
| static bool LocalDB::LoadStation |
( |
nlohmann::json & | data, |
|
|
std::string | stationId ) |
|
static |
Loads a specific station's data from the local JSON file.
- Parameters
-
| data | Reference to a JSON object where the station data will be stored. |
| stationId | The unique identifier of the station. |
- Returns
- True if the data is successfully loaded, false otherwise.
◆ UpdateIndex()
| static void LocalDB::UpdateIndex |
( |
std::string | data | ) |
|
|
static |
Updates the index file with new data.
- Parameters
-
| data | The new index data in JSON string format. |
◆ UpdateSensor()
| static void LocalDB::UpdateSensor |
( |
std::string | sensorId, |
|
|
std::string | data ) |
|
static |
Updates a specific sensor's data file.
- Parameters
-
| sensorId | The unique identifier of the sensor. |
| data | The new sensor data in JSON string format. |
◆ UpdateStation()
| static void LocalDB::UpdateStation |
( |
std::string | stationId, |
|
|
std::string | data ) |
|
static |
Updates a specific station's data file.
- Parameters
-
| stationId | The unique identifier of the station. |
| data | The new station data in JSON string format. |
The documentation for this class was generated from the following file: