| Info | Value |
|---|---|
| Header | mvnc.h |
| Library | libmvnc.so |
| Version | 2.0 |
| See also | ncGlobalOption_t, ncGlobalGetOption() |
This function sets a global option value. The available options and possible values can be found in the ncGlobalOption_t enumeration.
ncStatus_t ncGlobalSetOption(int option, const void* data, unsigned int dataLength);
| Name | Type | Description |
|---|---|---|
| option | int | A value from the ncGlobalOption_t enumeration that specifies which option’s value will be set. |
| data | const void* | A pointer to a buffer containing the new value for the option. The type of data this points to depends on the option that is specified. Check ncGlobalOption_t for the data types that each option requires. |
| dataLength | unsigned int | An unsigned int that contains the length, in bytes, of the buffer that the data parameter points to. |
An appropriate value from the ncStatus_t enumeration.
None.
#include <stdio.h>
#include <mvnc.h>
int main (int argc, char** argv)
{
int loggingLevel = 0;
unsigned int len = sizeof(int);
ncStatus_t status;
status = ncGlobalSetOption(NC_RW_LOG_LEVEL, &loggingLevel, sizeof(int));
if (status == NC_OK)
{
// loggingLevel option successfully set.
printf("Logging level set to: %d\n", loggingLevel);
}
status = ncGlobalGetOption(NC_RW_LOG_LEVEL, &loggingLevel, &len);
if (status == NC_OK)
{
// loggingLevel should be set to the option value now.
printf("Logging level is: %d\n", loggingLevel);
}
}