Accessing The Raw Data Using The Api - Safran WR-ZEN Series User Manual

Hide thumbs Also See for WR-ZEN Series:
Table of Contents

Advertisement

7.6  Service Persistent Raw Data and Runtime Statistics
Dumping the Database Manually
SQLite allows dumping the database in several formats such as CSV, SQL inserts,
or JSON. For example, to export the database as a CSV file called metrics.csv fol-
low these steps:
1.
2.
3.
4.
5.
6.
The resulting metrics.csv file will be stored in the current working directory.
For further information about database management please refer to the SQLite3
help and documentation.
Database Rotation
Raw data is kept in the database for seven days. Older data is removed auto-
matically in a circular buffer fashion.
7.6.1.2

Accessing the RAW Data using the API

The endpoints to perform queries to the database are listed under the RAW
DATA category in the Swagger API interface. The particular endpoints for per-
forming queries are the following:
rawdata/wr/{wr_interface}
rawdata/wr/servo/active
rawdata/gm/
Along with the data values for a specific time frame, raw data endpoints can
return statistics (min, max, mean, stdev) if requested.
160
Open the SQLite command line by running sqlite3
b/metrics.db
Enable headers by entering .headers on
Set the output mode to CSV by entering .mode csv.
Specify the output file by entering .output metrics.csv
Select the desired data from the table ppsi_raw by performing the query
select TIMESTAMP,M0000,M0001,M0002,M0003 from ppsi_raw;
Exit the SQLite command line by entering .quit
ENDPOINT
Tip:
Please keep in mind that raw data retrieving and statistics cal-
culations are computationally expensive operations.
DESCRIPTION
Retrieve raw data of a single WR interface
Retrieve raw data of the active servo
Retrieve raw data of GrandMaster Clock
CHAPTER
7
WR-ZEN Series User Manual Rev. v5.1
/root/.d-

Advertisement

Table of Contents
loading

Table of Contents