WVR_GetParameters

WVR_EXPORT uint32_t WVR_GetParameters(WVR_DeviceType type, const char * pchValue, char * retValue, uint32_t unBufferSize)

Function to get a parameter string from device service.

Return
The number of bytes necessary to hold the string, including the trailing null. Returns 0 (and 0-length string) on failure.
Parameters
  • type -

    which indicate WVR_DeviceType.

  • pchValue -

    send string to let AP communicate to device service.

  • retValue -

    The buffer to store parameter get from device service. unBufferSize should be the size of this buffer.

  • unBufferSize -

    The size of the buffer pointed to by pchValue.

How to use

Here is an example for the function:

#include <wvr/wvr_device.h>

//const char* ret;
char pchString[256] = "IsDeviceSupportCamera";
char retString[256] = { 0 };
uint32_t size;

//Get the result from device service
size = WVR_GetParameters(WVR_DeviceType_HMD, pchString, retString, 256);

Device Service need to implement getParameters function to get the string from content AP.