Results#

group Results

Functions

cuestStatus_t cuestResultsCreate(
cuestResultsType_t resultsType,
void **outResults
)#

Create a new cuEST results object of the specified type.

Allocates and initializes an opaque results object of the type specified by resultsType. The created object is returned via outResults and must be destroyed with cuestResultsDestroy.

Note

On error, *outResults is set to NULL.

Parameters:
  • resultsType[in] Type of results object to create (see cuestResultsType_t).

  • outResults[out] Pointer to receive allocated opaque results handle.

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_NULL_POINTER if outResults is NULL;

  • CUEST_STATUS_INVALID_TYPE if resultsType is invalid;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR for internal errors.

cuestStatus_t cuestResultsDestroy(
cuestResultsType_t resultsType,
void *results
)#

Destroy and free a cuEST results object of the specified type.

Properly deallocates and cleans up resources for a results handle created by cuestResultsCreate.

Parameters:
  • resultsType[in] Type of results object (must match creation).

  • results[in] Opaque results handle to destroy; must not be NULL.

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_NULL_POINTER if results is NULL;

  • CUEST_STATUS_INVALID_TYPE if resultsType does not match the actual type of results;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR for internal errors.

cuestStatus_t cuestResultsQuery(
cuestResultsType_t resultsType,
const void *results,
int attribute,
void *resultValue,
size_t resultValueSize
)#

Query the value of a given attribute from a cuEST results object.

Retrieves the value associated with an attribute for the given results object. The type and meaning of results and resultValue depend on resultsType. The result is placed in attributeValue, whose size must match the expected value size.

Parameters:
  • resultsType[in] Type of results object being queried.

  • results[in] Opaque handle of the results object (must not be NULL).

  • attribute[in] Integer attribute identifier (cast to appropriate attribute enum internally).

  • resultValue[out] Destination for the queried value (must not be NULL).

  • resultValueSize[in] Size in bytes of resultValue buffer (must match queried type).

Returns:

  • CUEST_STATUS_SUCCESS on success;

  • CUEST_STATUS_NULL_POINTER if results or resultValue is NULL;

  • CUEST_STATUS_INVALID_TYPE if results is not of the specified resultsType;

  • CUEST_STATUS_INVALID_SIZE if resultValueSize does not match attribute type size;

  • CUEST_STATUS_INVALID_PARAMETER if attribute is not recognized;

  • CUEST_STATUS_EXCEPTION or CUEST_STATUS_UNKNOWN_ERROR for internal errors.