ihuReadRawDataByTimeEx

Use the ihuReadRawDataByTimeEx function to return multiple raw samples for a single tag in a specified time range with filters and query modifiers by using pszFilterExpression and CriteriaString.

Prototype

ihuReadRawDataByTimeEx {
long serverhandle, // [in] the serverhandle
MSO_Char *tagname, // [in] the single tagname to fetch data for
MSO_Char *pszFilterExpression, // [in] Filter Expression e.g. Tag > 20
IHU_FILTER_MODE FilterMode,   // [in] Filter Modes
MSO_Char *CriteriaString, // [in] QueryModifiers to use with data reads
IHU_TIMESTAMP * StartTime, // [in] Start time of query
IHU_TIMESTAMP * EndTime, // [in] End Time of query
int * number_of_samples, //[out] the number of samples returned
IHU_DATA_SAMPLE **data_values // [out] the returned data samples, unlimited number
};

Remarks

To skip filtering, you can pass NULL to pszFilterExpression and ihuExactTime to FilterMode, or you can use ihuReadRawDataByTime().

Pass NULL to CriteriaString if you do not use a QueryModifier.

The time stamp, value, and quality of each raw sample are returned.

Returns

The ihuReadRawDataByTimeEx function returns ihuSTATUS_OK on success, or returns errors on:

  • Read timeouts
  • User is not a member of the ih Readers security group
  • Tag not found
  • Filter criteria or query modifiers cannot be set