ihuRetrieveCalculatedDataEx

Use the ihuRetrieveCalculatedDataEx function to return calculated data based on the raw samples stored in the archive. Average, Minimum, and Count are example CalculationMode values.

Prototype

ihuRetrieveCalculatedDataEx {
long serverhandle, // [in] which server to fetch from
IHU_TIMESTAMP StartTime, //[in] Start time of query
IHU_TIMESTAMP EndTime, //[in] End time of query
ihuCalculationMode CalculationMode, //[in] Calculation Mode
unsigned long NumberOfSamples, //[in] Number of samples to be returned
IHU_DATA_INTERVAL Interval, // [in] Interval in Milliseconds
IHU_RETRIEVED_DATA_RECORDS_EX *DataRecords //[in/out] - you fill in tagnames of the structures and API will fil
};

Remarks

To request data, you can specify a number of samples or a time interval. Set one parameter to a non-zero value and the other to 0. To split the duration, divide the time from start to finish into evenly spaced time intervals.

Returns

The ihuReadRawDataByTimeEx2 function returns ihuSTATUS_OK when values are successfully retrieved, and returns errors on:

  • Read timeouts
  • User is not a member of the ih Readers security group
  • Tag not found