Tilt Five NDK  1.4.1

Functions for getting glasses parameters. More...

Collaboration diagram for Glasses parameters:

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...
 

Detailed Description

Functions for getting glasses parameters.

Function Documentation

◆ t5GetChangedGlassesParams()

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.

Threading
Exclusivity group 1 - Functions in this group must not be called concurrently from different threads.
Parameters
[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.
Return values
T5_SUCCESSChanged parameter list written to buffer.
T5_ERROR_INVALID_ARGSNullptr was supplied for buffer. or Nullptr was supplied for count.
T5_ERROR_OVERFLOWBuffer too small to contain parameter list.
T5_ERROR_NO_CONTEXTglasses is invalid.

Referenced by tiltfive::Glasses::getChangedParams().

◆ t5GetGlassesFloatParam()

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.

Threading
Exclusivity group 1 - Functions in this group must not be called concurrently from different threads.
Parameters
[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.
Return values
T5_SUCCESSGot the parameter
T5_ERROR_INVALID_ARGSparam was not a valid enumerant or NULL was supplied for value
T5_TIMEOUTTimeout waiting to read value.
T5_ERROR_IO_FAILUREFailed to communicate with the service.
T5_ERROR_NO_SERVICEService is unavailable.
T5_ERROR_NO_CONTEXTcontext is invalid.
T5_ERROR_SETTING_WRONG_TYPEThe requested parameter is not a floating point value.

The following are internal errors that should be discarded and/or logged:

Return values
T5_ERROR_SETTING_UNKNOWNInternal (Not correctable): Setting is unknown.
T5_ERROR_INTERNALInternal (Not correctable): Generic error.
T5_ERROR_MISC_REMOTEInternal (Not correctable): Generic service error.
T5_ERROR_OVERFLOWInternal (Not correctable): Buffer overflow.

Referenced by tiltfive::Glasses::getIpd().

◆ t5GetGlassesIntegerParam()

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.

Threading
Exclusivity group 1 - Functions in this group must not be called concurrently from different threads.
Parameters
[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.
Return values
T5_SUCCESSGot the parameter
T5_ERROR_INVALID_ARGSparam was not a valid enumerant or NULL was supplied for value
T5_TIMEOUTTimeout waiting to read value.
T5_ERROR_IO_FAILUREFailed to communicate with the service.
T5_ERROR_NO_SERVICEService is unavailable.
T5_ERROR_NO_CONTEXTcontext is invalid.
T5_ERROR_SETTING_WRONG_TYPEThe requested parameter is not an integer value.

The following are internal errors that should be discarded and/or logged:

Return values
T5_ERROR_SETTING_UNKNOWNInternal (Not correctable): Setting is unknown.
T5_ERROR_INTERNALInternal (Not correctable): Generic error.
T5_ERROR_MISC_REMOTEInternal (Not correctable): Generic service error.
T5_ERROR_OVERFLOWInternal (Not correctable): Buffer overflow.

◆ t5GetGlassesUtf8Param()

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.

Threading
Exclusivity group 1 - Functions in this group must not be called concurrently from different threads.
Parameters
[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.
Return values
T5_SUCCESSGot the parameter
T5_ERROR_INVALID_ARGSparam was not a valid enumerant or NULL was supplied for value and bufferSize was not 0 or NULL was supplied for bufferSize
T5_TIMEOUTTimeout waiting to read value.
T5_ERROR_IO_FAILUREFailed to communicate with the service.
T5_ERROR_NO_SERVICEService is unavailable.
T5_ERROR_NO_CONTEXTcontext is invalid.
T5_ERROR_SETTING_WRONG_TYPEThe requested parameter is not a UTF-8 string value.

The following are internal errors that should be discarded and/or logged:

Return values
T5_ERROR_SETTING_UNKNOWNInternal (Not correctable): Setting is unknown.
T5_ERROR_INTERNALInternal (Not correctable): Generic error.
T5_ERROR_MISC_REMOTEInternal (Not correctable): Generic service error.
T5_ERROR_OVERFLOWInternal (Not correctable): Buffer overflow.

Referenced by tiltfive::Glasses::getFriendlyName().