ihuReadMultiTagRawDataByCountEx

Use the ihuReadMultiTagRawDataByCountEx function to return up to a requested number of multiple raw samples for multiple tags with filters and query modifiers by using pszFilterExpression and CriteriaString.

Prototype

ihuErrorCode IHUAPI ihuReadMultiTagRawDataByCountEx (
long serverhandle, // [in] the serverhandle 
int number_of_tags, // [in] the number of tags to retrieve
IHU_TIMESTAMP * StartTime, // [in] Start time of query
IHU_TIMESTAMP * EndTime, // [in] End time of query
MSO_Char *pszFilterExpression, // [in] Filter Expression e.g. Tag > 20
MSO_Char *CriteriaString, // [in] QueryModifiers to use with data reads
IHU_FILTER_MODE FilterMode,   // [in] Filter Modes
int * number_of_samples, // [in/out] the number of samples to return and actually returned
BOOL TimeForward, // [in] TRUE if search should be in forward time order ihuErrorCode ** error_returns, // [out] populated with per tag error
IHU_RETRIEVED_RAW_VALUES *pSamples // [in/out] the returned data samples, unlimited number memory is allocated
);

Remarks

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

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

The ihuReadMultiTagRawDataByCount function returns per-tag and overall errors.

Returns

The ihuReadRawDataByCountEx 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
  • Filter criteria or query modifiers cannot be set