#include <yocto_api.h>
Public Member Functions | |
virtual double | _decodeAvg (int dw, int count) |
virtual double | _decodeVal (int w) |
virtual string | _get_url (void) |
virtual int | _initFromDataSet (YDataSet *dataset, vector< int > encoded) |
virtual int | _parseStream (string sdata) |
virtual double | get_averageValue (void) |
virtual int | get_columnCount (void) |
virtual vector< string > | get_columnNames (void) |
virtual double | get_data (int row, int col) |
virtual vector< vector< double > > | get_dataRows (void) |
virtual double | get_dataSamplesInterval (void) |
virtual int | get_dataSamplesIntervalMs (void) |
virtual int | get_duration (void) |
virtual double | get_maxValue (void) |
virtual double | get_minValue (void) |
virtual int | get_rowCount (void) |
virtual int | get_runIndex (void) |
virtual int | get_startTime (void) |
virtual s64 | get_startTimeUTC (void) |
virtual bool | isClosed (void) |
virtual int | loadStream (void) |
YDataStream (YFunction *parent) | |
YDataStream (YFunction *parent, YDataSet &dataset, const vector< int > &encoded) | |
virtual | ~YDataStream () |
Static Public Attributes | |
static const double | DATA_INVALID = Y_DATA_INVALID |
static const int | DURATION_INVALID = -1 |
Protected Attributes | |
double | _avgVal |
yCalibrationHandler | _calhdl |
vector< int > | _calpar |
vector< double > | _calraw |
vector< double > | _calref |
int | _caltyp |
vector< string > | _columnNames |
double | _decexp |
int | _decimals |
int | _duration |
string | _functionId |
bool | _isAvg |
bool | _isClosed |
bool | _isScal |
bool | _isScal32 |
double | _maxVal |
double | _minVal |
int | _nCols |
int | _nRows |
double | _offset |
YFunction * | _parent |
int | _runNo |
int | _samplesPerHour |
double | _scale |
s64 | _utcStamp |
vector< vector< double > > | _values |
YDataStream Class: Unformatted data sequence
YDataStream objects represent bare recorded measure sequences, exactly as found within the data logger present on Yoctopuce sensors.
In most cases, it is not necessary to use YDataStream objects directly, as the YDataSet objects (returned by the get_recordedData() method from sensors and the get_dataSets() method from the data logger) provide a more convenient interface.
Definition at line 940 of file yocto_api.h.
YDataStream::YDataStream | ( | YFunction * | parent | ) |
Definition at line 902 of file yocto_api.cpp.
Definition at line 931 of file yocto_api.cpp.
|
virtual |
Definition at line 959 of file yocto_api.cpp.
|
virtual |
Definition at line 1576 of file yocto_api.cpp.
|
virtual |
Definition at line 1555 of file yocto_api.cpp.
|
virtual |
Definition at line 1542 of file yocto_api.cpp.
|
virtual |
Definition at line 1367 of file yocto_api.cpp.
|
virtual |
Definition at line 1491 of file yocto_api.cpp.
|
virtual |
Returns the average of all measures observed within this stream. If the device uses a firmware older than version 13000, this method will always return Y_DATA_INVALID.
On failure, throws an exception or returns Y_DATA_INVALID.
Definition at line 1756 of file yocto_api.cpp.
|
virtual |
Returns the number of data columns present in this stream. The meaning of the values present in each column can be obtained using the method get_columnNames().
If the device uses a firmware older than version 13000, this method fetches the whole data stream from the device if not yet done, which can cause a little delay.
On failure, throws an exception or returns zero.
Definition at line 1696 of file yocto_api.cpp.
|
virtual |
Returns the title (or meaning) of each data column present in this stream. In most case, the title of the data column is the hardware identifier of the sensor that produced the data. For streams recorded at a lower recording rate, the dataLogger stores the min, average and max value during each measure interval into three columns with suffixes _min, _avg and _max respectively.
If the device uses a firmware older than version 13000, this method fetches the whole data stream from the device if not yet done, which can cause a little delay.
On failure, throws an exception or returns an empty array.
Definition at line 1722 of file yocto_api.cpp.
|
virtual |
Returns a single measure from the data stream, specified by its row and column index. The meaning of the values present in each column can be obtained using the method get_columnNames().
This method fetches the whole data stream from the device, if not yet done.
row | : row index |
col | : column index |
On failure, throws an exception or returns Y_DATA_INVALID.
Definition at line 1830 of file yocto_api.cpp.
|
virtual |
Returns the whole data set contained in the stream, as a bidimensional table of numbers. The meaning of the values present in each column can be obtained using the method get_columnNames().
This method fetches the whole data stream from the device, if not yet done.
On failure, throws an exception or returns an empty array.
Definition at line 1806 of file yocto_api.cpp.
|
virtual |
Reimplemented in YOldDataStream.
Definition at line 1658 of file yocto_api.cpp.
|
virtual |
Returns the number of milliseconds between two consecutive rows of this data stream. By default, the data logger records one row per second, but the recording frequency can be changed for each device function
Definition at line 1653 of file yocto_api.cpp.
|
virtual |
Returns the approximate duration of this stream, in seconds.
On failure, throws an exception or returns Y_DURATION_INVALID.
Definition at line 1783 of file yocto_api.cpp.
|
virtual |
Returns the largest measure observed within this stream. If the device uses a firmware older than version 13000, this method will always return Y_DATA_INVALID.
On failure, throws an exception or returns Y_DATA_INVALID.
Definition at line 1771 of file yocto_api.cpp.
|
virtual |
Returns the smallest measure observed within this stream. If the device uses a firmware older than version 13000, this method will always return Y_DATA_INVALID.
On failure, throws an exception or returns Y_DATA_INVALID.
Definition at line 1741 of file yocto_api.cpp.
|
virtual |
Returns the number of data rows present in this stream.
If the device uses a firmware older than version 13000, this method fetches the whole data stream from the device if not yet done, which can cause a little delay.
On failure, throws an exception or returns zero.
Definition at line 1674 of file yocto_api.cpp.
|
virtual |
Returns the run index of the data stream. A run can be made of multiple datastreams, for different time intervals.
Definition at line 1608 of file yocto_api.cpp.
|
virtual |
Returns the relative start time of the data stream, measured in seconds. For recent firmwares, the value is relative to the present time, which means the value is always negative. If the device uses a firmware older than version 13000, value is relative to the start of the time the device was powered on, and is always positive. If you need an absolute UTC timestamp, use get_startTimeUTC().
Reimplemented in YOldDataStream.
Definition at line 1626 of file yocto_api.cpp.
|
virtual |
Returns the start time of the data stream, relative to the Jan 1, 1970. If the UTC time was not set in the datalogger at the time of the recording of this data stream, this method returns 0.
Definition at line 1640 of file yocto_api.cpp.
|
virtual |
Definition at line 1597 of file yocto_api.cpp.
|
virtual |
Reimplemented in YOldDataStream.
Definition at line 1550 of file yocto_api.cpp.
|
protected |
Definition at line 965 of file yocto_api.h.
|
protected |
Definition at line 975 of file yocto_api.h.
|
protected |
Definition at line 969 of file yocto_api.h.
|
protected |
Definition at line 970 of file yocto_api.h.
|
protected |
Definition at line 971 of file yocto_api.h.
|
protected |
Definition at line 968 of file yocto_api.h.
|
protected |
Definition at line 954 of file yocto_api.h.
|
protected |
Definition at line 967 of file yocto_api.h.
|
protected |
Definition at line 960 of file yocto_api.h.
|
protected |
Definition at line 953 of file yocto_api.h.
|
protected |
Definition at line 955 of file yocto_api.h.
|
protected |
Definition at line 957 of file yocto_api.h.
|
protected |
Definition at line 956 of file yocto_api.h.
|
protected |
Definition at line 958 of file yocto_api.h.
|
protected |
Definition at line 959 of file yocto_api.h.
|
protected |
Definition at line 966 of file yocto_api.h.
|
protected |
Definition at line 964 of file yocto_api.h.
|
protected |
Definition at line 951 of file yocto_api.h.
|
protected |
Definition at line 952 of file yocto_api.h.
|
protected |
Definition at line 961 of file yocto_api.h.
|
protected |
Definition at line 948 of file yocto_api.h.
|
protected |
Definition at line 949 of file yocto_api.h.
|
protected |
Definition at line 963 of file yocto_api.h.
|
protected |
Definition at line 962 of file yocto_api.h.
|
protected |
Definition at line 950 of file yocto_api.h.
|
protected |
Definition at line 972 of file yocto_api.h.
|
static |
Definition at line 983 of file yocto_api.h.
|
static |
Definition at line 984 of file yocto_api.h.