ncGlobalSetOption()

Info Value
Header mvnc.h
Library libmvnc.so
Version 2.0
See also ncGlobalOption_t, ncGlobalGetOption()

Overview

This function sets a global option value. The available options and possible values can be found in the ncGlobalOption_t enumeration.

Prototype

ncStatus_t ncGlobalSetOption(int option, const void* data, unsigned int dataLength);

Parameters

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.

Return

An appropriate value from the ncStatus_t enumeration.

Notes

None.

Example

#include <stdio.h>
#include <mvnc.h>

int main (int argc, char** argv)
{
        ncStatus_t status;
        int loggingLevel = NC_LOG_DEBUG;
        unsigned int len = sizeof(int);

        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);
        }
}