#include <yocto_api.h>
Public Member Functions | |
virtual vector< int > | _get_calibration (void) |
int | _parse (const string &json) |
virtual s64 | get_endTimeUTC (void) |
virtual string | get_functionId (void) |
virtual string | get_hardwareId (void) |
virtual vector< YMeasure > | get_measures (void) |
virtual vector< YMeasure > | get_measuresAt (YMeasure measure) |
virtual vector< YMeasure > | get_preview (void) |
virtual vector< YDataStream * > | get_privateDataStreams (void) |
virtual int | get_progress (void) |
virtual s64 | get_startTimeUTC (void) |
virtual YMeasure | get_summary (void) |
virtual string | get_unit (void) |
virtual int | loadMore (void) |
virtual int | processMore (int progress, string data) |
YDataSet (YFunction *parent, const string &functionId, const string &unit, s64 startTime, s64 endTime) | |
YDataSet (YFunction *parent) | |
Protected Attributes | |
vector< int > | _calib |
s64 | _endTime |
string | _functionId |
string | _hardwareId |
vector< YMeasure > | _measures |
YFunction * | _parent |
vector< YMeasure > | _preview |
int | _progress |
s64 | _startTime |
vector< YDataStream * > | _streams |
YMeasure | _summary |
string | _unit |
YDataSet Class: Recorded data sequence
YDataSet objects make it possible to retrieve a set of recorded measures for a given sensor and a specified time interval. They can be used to load data points with a progress report. When the YDataSet object is instantiated by the get_recordedData() function, no data is yet loaded from the module. It is only when the loadMore() method is called over and over than data will be effectively loaded from the dataLogger.
A preview of available measures is available using the function get_preview() as soon as loadMore() has been called once. Measures themselves are available using function get_measures() when loaded by subsequent calls to loadMore().
This class can only be used on devices that use a recent firmware, as YDataSet objects are not supported by firmwares older than version 13000.
Definition at line 1290 of file yocto_api.h.
YDataSet::YDataSet | ( | YFunction * | parent, |
const string & | functionId, | ||
const string & | unit, | ||
s64 | startTime, | ||
s64 | endTime | ||
) |
Definition at line 969 of file yocto_api.cpp.
YDataSet::YDataSet | ( | YFunction * | parent | ) |
Definition at line 987 of file yocto_api.cpp.
|
virtual |
Definition at line 1966 of file yocto_api.cpp.
int YDataSet::_parse | ( | const string & | json | ) |
Definition at line 1002 of file yocto_api.cpp.
|
virtual |
Returns the end time of the dataset, relative to the Jan 1, 1970. When the YDataSet is created, the end time is the value passed in parameter to the get_dataSet() function. After the very first call to loadMore(), the end time is updated to reflect the timestamp of the last measure actually found in the dataLogger within the specified range.
Definition at line 2109 of file yocto_api.cpp.
|
virtual |
Returns the hardware identifier of the function that performed the measure, without reference to the module. For example temperature1.
Definition at line 2063 of file yocto_api.cpp.
|
virtual |
Returns the unique hardware identifier of the function who performed the measures, in the form SERIAL.FUNCTIONID. The unique hardware identifier is composed of the device serial number and of the hardware identifier of the function (for example THRMCPL1-123456.temperature1)
On failure, throws an exception or returns Y_HARDWAREID_INVALID.
Definition at line 2046 of file yocto_api.cpp.
|
virtual |
Returns all measured values currently available for this DataSet, as a list of YMeasure objects. Each item includes:
Before calling this method, you should call loadMore() to load data from the device. You may have to call loadMore() several time until all rows are loaded, but you can start looking at available data rows before the load is complete.
The oldest measures are always loaded first, and the most recent measures will be loaded last. As a result, timestamps are normally sorted in ascending order within the measure table, unless there was an unexpected adjustment of the datalogger UTC clock.
On failure, throws an exception or returns an empty array.
Definition at line 2302 of file yocto_api.cpp.
Returns the detailed set of measures for the time interval corresponding to a given condensed measures previously returned by get_preview(). The result is provided as a list of YMeasure objects.
measure | : condensed measure from the list previously returned by get_preview(). |
On failure, throws an exception or returns an empty array.
Definition at line 2221 of file yocto_api.cpp.
|
virtual |
Returns a condensed version of the measures that can retrieved in this YDataSet, as a list of YMeasure objects. Each item includes:
This preview is available as soon as loadMore() has been called for the first time.
On failure, throws an exception or returns an empty array.
Definition at line 2203 of file yocto_api.cpp.
|
virtual |
Definition at line 2031 of file yocto_api.cpp.
|
virtual |
Returns the progress of the downloads of the measures from the data logger, on a scale from 0 to 100. When the object is instantiated by get_dataSet, the progress is zero. Each time loadMore() is invoked, the progress is updated, to reach the value 100 only once all measures have been loaded.
Definition at line 2122 of file yocto_api.cpp.
|
virtual |
Returns the start time of the dataset, relative to the Jan 1, 1970. When the YDataSet is created, the start time is the value passed in parameter to the get_dataSet() function. After the very first call to loadMore(), the start time is updated to reflect the timestamp of the first measure actually found in the dataLogger within the specified range.
Definition at line 2092 of file yocto_api.cpp.
|
virtual |
Returns an YMeasure object which summarizes the whole DataSet. In includes the following information:
This summary is available as soon as loadMore() has been called for the first time.
Definition at line 2180 of file yocto_api.cpp.
|
virtual |
Returns the measuring unit for the measured value.
On failure, throws an exception or returns Y_UNIT_INVALID.
Definition at line 2075 of file yocto_api.cpp.
|
virtual |
Loads the the next block of measures from the dataLogger, and updates the progress indicator.
On failure, throws an exception or returns a negative error code.
Definition at line 2143 of file yocto_api.cpp.
|
virtual |
Definition at line 1971 of file yocto_api.cpp.
|
protected |
Definition at line 1305 of file yocto_api.h.
|
protected |
Definition at line 1303 of file yocto_api.h.
|
protected |
Definition at line 1300 of file yocto_api.h.
|
protected |
Definition at line 1299 of file yocto_api.h.
|
protected |
Definition at line 1309 of file yocto_api.h.
|
protected |
Definition at line 1298 of file yocto_api.h.
|
protected |
Definition at line 1308 of file yocto_api.h.
|
protected |
Definition at line 1304 of file yocto_api.h.
|
protected |
Definition at line 1302 of file yocto_api.h.
|
protected |
Definition at line 1306 of file yocto_api.h.
|
protected |
Definition at line 1307 of file yocto_api.h.
|
protected |
Definition at line 1301 of file yocto_api.h.