Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

DataLog

Cai Biesinger edited this page Jun 13, 2018 · 1 revision

Another useful utility is DataLog. This allows you to get DataUnit objects, which all sensors and some other components provide, and save them to a CSV file.

We recommend you split your data into multiple CSVs if the data means different things, or will not be time-correlated. DataLog is instantiable for this reason.

Simply start the logger with the constructor, passing in a filename. Now, just call:
DataLog.Output(DataUnit1, DataUnit2, ...);
With all of your DataUnits. If this is the first line, it will auto-generate headers.

Please make sure that your DataUnits are consistent (in number and order) between every call to Output(), as there is no internal checking. Data will simply be output in the order given, and as such, if the format changes, the data will be in the wrong column.

Because of the dynamic nature of the DataLog structure, doing this check on every datapoint would become very time-expensive, so we decided to skip the checks.

Logo

Quick Links:
NuGet
Pin Diagrams: RPi | BBB
Developers: CaiB, Baldstrom

General Info:
Home
Common Issues
Getting Started
Supported Devices

Sections:
Logging
DataLog
Filters
Hardware I/O:
- BeagleBone Black
- Raspberry Pi
- Pin Diagrams: RPi | BBB
- GPIO: Using | For Beginners
- PWM: Using | For Beginners
- ADC: Using | For Beginners
- I2C: Using | For Beginners
- SPI: Using | For Beginners
- UART: Using | For Beginners
- CAN: Using | For Beginners
Networking
Sensors
StateStore

Other: Interesting Case Studies

Clone this wiki locally