This repository was archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
The SolarMap Object
Meloni edited this page Dec 18, 2020
·
1 revision
This is basically a Object containing a Map<Date, List<Integer>> and all necessary functions to easily use this map.
##How to use You can use it by instantiating it simply. For more options refer to this spreadsheet:
| Constructor | Explanation |
|---|---|
| SolarMap() | Blank instance |
| SolarMap(FileObject fileObject) | Import from FileObject |
| SolarMap(Map<Date, List> Map) | import from Map |
| SolarMap(File dataFile) | import from existing datafile |
Now you can add data according to these functions:
| Function | Explanation |
|---|---|
| setFromMap(Map<Date, List> map) | set from a map |
| setOnDate(Date date, List values) | set on timestamp |
| addFromMap(Map<Date, List> map) | add from a map |
| addFromSolarMap(SolarMap map) | add from a SolarMap |
| addImportFromFile(File file) | add from a .dat file |
| addImportFromFiles(List files) | add from .dat files |
| addFromTar(File file) | add from an .tar archive |
| addFromTars(List files) | add from .tar archives |
| addFromFileObject(FileObject fileObject) | add from a FileObject |
| addFromDataFile(File file) | add from a .solarlog file |
| addFromDataFiles(List files) | add from .solarlog files |
| addFromInfluxDB(InfluxDB influxDB) | add from an InfluxDB |
| addFromEMLFile(File emlFile) | add from an EML file |
| addFromEMLFiles(List emlFiles) | add from EML files |
You can use this map now to store the data somewhere you like through one of the following:
| Function | Explanation |
|---|---|
| writeToDataFile(File file) | write to a .solarlog file |
| writeToInfluxDBDataBase(InfluxDB influxDB, int batchPointLimit) | write to an InfluxDB |
This format is how all data is usually processed using this API. It basically stores A List with every datapoint stored on the Solarlog at this time.
For every Date (timestamp) a List is stored in which the wanted information is stored.
| Position | Information |
|---|---|
| 0 | consumption in W |
| 1 | consumtion in kWh |
| 2 | own consumtion in W |
| 3 | output in W |
| 4 | yield in kWh |