Functions for getting glasses parameters. More...
Functions | |
T5_EXPORT T5_Result | t5GetGlassesIntegerParam (T5_Glasses glasses, T5_WandHandle wand, T5_ParamGlasses param, int64_t *value) |
Get a glasses integer parameter. More... | |
T5_EXPORT T5_Result | t5GetGlassesFloatParam (T5_Glasses glasses, T5_WandHandle wand, T5_ParamGlasses param, double *value) |
Get a glasses floating point parameter. More... | |
T5_EXPORT T5_Result | t5GetGlassesUtf8Param (T5_Glasses glasses, T5_WandHandle wand, T5_ParamGlasses param, char *buffer, size_t *bufferSize) |
Get a glasses UTF-8 encoded string parameter. More... | |
T5_EXPORT T5_Result | t5GetChangedGlassesParams (T5_Glasses glasses, T5_ParamGlasses *buffer, uint16_t *count) |
Get a glasses-specific list of changed parameters. More... | |
Functions for getting glasses parameters.
T5_EXPORT T5_Result t5GetChangedGlassesParams | ( | T5_Glasses | glasses, |
T5_ParamGlasses * | buffer, | ||
uint16_t * | count | ||
) |
Get a glasses-specific list of changed parameters.
This function doesn't return the values of the changed parameters, but an unordered list of the parameters that have changed since this function was last called. Note that as a result, the first call to this function will always result in a count of 0.
[in] | glasses | - T5_Glasses returned by t5CreateGlasses(). |
[out] | buffer | - T5_ParamGlasses buffer to receive list of parameters. |
[in,out] | count | - On Call: Size of buffer in elements. On Return: Number of changed parameters in butter. |
T5_SUCCESS | Changed parameter list written to buffer. |
T5_ERROR_INVALID_ARGS | Nullptr was supplied for buffer . or Nullptr was supplied for count . |
T5_ERROR_OVERFLOW | Buffer too small to contain parameter list. |
T5_ERROR_NO_CONTEXT | glasses is invalid. |
Referenced by tiltfive::Glasses::getChangedParams().
T5_EXPORT T5_Result t5GetGlassesFloatParam | ( | T5_Glasses | glasses, |
T5_WandHandle | wand, | ||
T5_ParamGlasses | param, | ||
double * | value | ||
) |
Get a glasses floating point parameter.
See T5_ParamGlasses for a list of possible parameters to retrieve.
[in] | glasses | - T5_Glasses returned by t5CreateGlasses(). |
[in] | wand | - T5_WandHandle to get value for. Use 0 for non-wand queries. |
[in] | param | - T5_ParamGlasses to get value for. |
[out] | value | - Pointer to a double to be set to the current value. |
T5_SUCCESS | Got the parameter |
T5_ERROR_INVALID_ARGS | param was not a valid enumerant or NULL was supplied for value |
T5_TIMEOUT | Timeout waiting to read value. |
T5_ERROR_IO_FAILURE | Failed to communicate with the service. |
T5_ERROR_NO_SERVICE | Service is unavailable. |
T5_ERROR_NO_CONTEXT | context is invalid. |
T5_ERROR_SETTING_WRONG_TYPE | The requested parameter is not a floating point value. |
The following are internal errors that should be discarded and/or logged:
T5_ERROR_SETTING_UNKNOWN | Internal (Not correctable): Setting is unknown. |
T5_ERROR_INTERNAL | Internal (Not correctable): Generic error. |
T5_ERROR_MISC_REMOTE | Internal (Not correctable): Generic service error. |
T5_ERROR_OVERFLOW | Internal (Not correctable): Buffer overflow. |
Referenced by tiltfive::Glasses::getIpd().
T5_EXPORT T5_Result t5GetGlassesIntegerParam | ( | T5_Glasses | glasses, |
T5_WandHandle | wand, | ||
T5_ParamGlasses | param, | ||
int64_t * | value | ||
) |
Get a glasses integer parameter.
See T5_ParamGlasses for a list of possible parameters to retrieve.
[in] | glasses | - T5_Glasses returned by t5CreateGlasses(). |
[in] | wand | - T5_WandHandle to get value for. Use 0 for non-wand queries. |
[in] | param | - T5_ParamGlasses to get value for. |
[out] | value | - Pointer to a int64_t to be set to the current value. |
T5_SUCCESS | Got the parameter |
T5_ERROR_INVALID_ARGS | param was not a valid enumerant or NULL was supplied for value |
T5_TIMEOUT | Timeout waiting to read value. |
T5_ERROR_IO_FAILURE | Failed to communicate with the service. |
T5_ERROR_NO_SERVICE | Service is unavailable. |
T5_ERROR_NO_CONTEXT | context is invalid. |
T5_ERROR_SETTING_WRONG_TYPE | The requested parameter is not an integer value. |
The following are internal errors that should be discarded and/or logged:
T5_ERROR_SETTING_UNKNOWN | Internal (Not correctable): Setting is unknown. |
T5_ERROR_INTERNAL | Internal (Not correctable): Generic error. |
T5_ERROR_MISC_REMOTE | Internal (Not correctable): Generic service error. |
T5_ERROR_OVERFLOW | Internal (Not correctable): Buffer overflow. |
T5_EXPORT T5_Result t5GetGlassesUtf8Param | ( | T5_Glasses | glasses, |
T5_WandHandle | wand, | ||
T5_ParamGlasses | param, | ||
char * | buffer, | ||
size_t * | bufferSize | ||
) |
Get a glasses UTF-8 encoded string parameter.
See T5_ParamGlasses for a list of possible parameters to retrieve.
[in] | glasses | - T5_Glasses returned by t5CreateGlasses(). |
[in] | wand | - T5_WandHandle to get value for. Use 0 for non-wand queries. |
[in] | param | - T5_ParamGlasses to get value for. |
[out] | buffer | - Pointer to a buffer into which the current value is to be written as a null-terminated string of UTF-8 code points. |
[in,out] | bufferSize | - On Call: Size of the buffer pointed to by buffer . On Return: Size of the parameter value. Note that this may be larger than the buffer, in which case T5_ERROR_OVERFLOW is returned, and this value represents the size of the buffer needed to avoid overflow. |
T5_SUCCESS | Got the parameter |
T5_ERROR_INVALID_ARGS | param was not a valid enumerant or NULL was supplied for value and bufferSize was not 0 or NULL was supplied for bufferSize |
T5_TIMEOUT | Timeout waiting to read value. |
T5_ERROR_IO_FAILURE | Failed to communicate with the service. |
T5_ERROR_NO_SERVICE | Service is unavailable. |
T5_ERROR_NO_CONTEXT | context is invalid. |
T5_ERROR_SETTING_WRONG_TYPE | The requested parameter is not a UTF-8 string value. |
The following are internal errors that should be discarded and/or logged:
T5_ERROR_SETTING_UNKNOWN | Internal (Not correctable): Setting is unknown. |
T5_ERROR_INTERNAL | Internal (Not correctable): Generic error. |
T5_ERROR_MISC_REMOTE | Internal (Not correctable): Generic service error. |
T5_ERROR_OVERFLOW | Internal (Not correctable): Buffer overflow. |
Referenced by tiltfive::Glasses::getFriendlyName().