ihuRetrieveCalculatedDataEx2

Use the ihuRetrieveCalculatedDataEx2 function with the ihuStateCount and ihuStateTime calculation modes to return calculated data based on the raw samples stored in the archive.

You can request data by specifying a number of samples or an interval. Set one to a nonzero value and the other to 0. To split the duration, divide the time from start to finish into evenly spaced time intervals.

Prototype

ihuRetrieveCalculatedDataEx2
(long serverhandle,
IHU_TIMESTAMP StartTime,
IHU_TIMESTAMP EndTime,
ihuCalculationMode CalculationMode,
ihuDataType StateDataType,
ihuValue StateValue,
unsigned long NumberOfSamples,
IHU_DATA_INTERVAL Interval,
IHU_RETRIEVED_DATA_RECORDS_EX *DataRecords)

Returns

This function returns ihuSTATUS_OK when values are retrieved successfully, and returns the following errors:

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