| Home > C: Programming > Function descriptions > | History back Previous chapter Next chapter Print |
is_Configuration |
|
uEye Camera Manual Version 4.00
|
|
USB 2.0 USB 3.0 GigE |
USB 2.0 USB 3.0 GigE |
Syntax
INT is_Configuration (UINT nCommand, void* pParam, UINT cbSizeOfParam)
Description
Use is_Configuration() to set various system-wide options:
•Windows only: Processor operating states (idle states/C-states)
Modern processors have various operating states, so-called C-states, that are characterized by different power requirements. When the operating system selects an operating state with low power consumption (unequal C0), the USB transmission efficiency may be affected. Please refer to the Application Note on our website for more information on this topic.
Use the function parameters IS_CONFIG_CPU_IDLE_STATES_CMD… to disable these low power consumption operating states and improve USB transmission efficiency. The uEye driver changes the current energy settings of the operating system when the first USB uEye camera is opened. After the last USB uEye camera is closed, the uEye driver restores the original settings. The settings are valid for the current user only.
•Windows only: Activate OpenMP (Open Multi-Processing)
OpenMP is a programming interface that supports distributed computing on multi-core processors. When you activate OpenMP support, intensive computing operations, such as the Bayer conversion, are distributed across several processor cores to accelerate execution. The use of OpenMP, however, increases CPU load.
•Load camera parameters during installation
Use the function parameters IS_CONFIG_INITIAL_PARAMETERSET… to indicate whether to apply the parameters stored on the camera automatically when opening the camera. You must first store the camera parameters on the camera using the is_ParameterSet() function or via the corresponding function in the uEye demo. This setting applies to all connected cameras. If no parameters are stored on the camera, the standard parameters of this camera model are applied.
The nCommand input parameter is used to select the function mode. The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam contains a pointer to a variable of the UINT type. The size of the memory area to which pParam refers is specified in the cbSizeOfParam input parameter.
|
|
Input parameters
hCam |
Camera handle |
|||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
pParam |
Pointer to a function parameter, whose function depends on nCommand. |
|||||||||||||||||||||||||||
cbSizeOfParam |
Size (in bytes) of the memory area to which pParam refers. |
|||||||||||||||||||||||||||
Contents of the CONFIGURATION_CAPS Structure
INT |
IS_CONFIG_CPU_IDLE_STATES_CAP_SUPPORTED |
Function parameters for setting the processor operating states are supported. |
INT |
IS_CONFIG_OPEN_MP_CAP_SUPPORTED |
Function parameters to configure OpenMP are supported. |
INT |
IS_CONFIG_INITIAL_PARAMETERSET_CAP_SUPPORTED |
Function parameters to load camera parameters during initialization are supported. |
Contents of the CONFIGURATION_SEL Structure
INT |
IS_CONFIG_CPU_IDLE_STATES_BIT_AC_VALUE |
Set/recover processor operating states for power supply unit operation |
INT |
IS_CONFIG_CPU_IDLE_STATES_BIT_DC_VALUE |
Set/recover processor operating states for battery operation |
INT |
IS_CONFIG_OPEN_MP_DISABLE |
OpenMP support disabled |
INT |
IS_CONFIG_OPEN_MP_ENABLE |
OpenMP support enabled |
INT |
IS_CONFIG_INITIAL_PARAMETERSET_NONE |
Load camera parameters during initialization disabled |
INT |
IS_CONFIG_INITIAL_PARAMETERSET_1 |
Load camera parameter set 1 during initialization |
INT |
IS_CONFIG_INITIAL_PARAMETERSET_2 |
Load camera parameter set 2 during initialization |
Return values
IS_CANT_OPEN_REGISTRY |
Error opening a Windows registry key |
IS_CANT_READ_REGISTRY |
Error reading settings from the Windows registry |
IS_ERROR_CPU_IDLE_STATES_CONFIGURATION |
The configuration of the CPU idle has failed. |
IS_INVALID_PARAMETER |
One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode. |
IS_NO_IMAGE_MEM_ALLOCATED |
The driver could not allocate memory. |
IS_NO_SUCCESS |
General error message |
IS_NOT_SUPPORTED |
The camera model used here does not support this function or setting. |
IS_OPERATING_SYSTEM_NOT_SUPPORTED |
Operating system not supported |
IS_SUCCESS |
Function executed successfully |
Related functions
UINT nCaps = 0;
INT nRet = is_Configuration(IS_CONFIG_CMD_GET_CAPABILITIES, (void*)&nCaps, sizeof(UINT));
if (nRet == IS_SUCCESS)
{
if (nCaps & IS_CONFIG_CPU_IDLE_STATES_CAP_SUPPORTED)
{
// CPU idle states supported
}
if (nCaps & IS_CONFIG_OPEN_MP_CAP_SUPPORTED)
{
// OpenMP supported
}
if (nCaps & IS_CONFIG_INITIAL_PARAMETERSET_CAP_SUPPORTED)
{
// Initial parameter set supported
}
}
INT nCurrentCpuStates = 0;
INT nRet = is_Configuration(IS_CONFIG_CPU_IDLE_STATES_CMD_GET_ENABLE,
(void*)&nCurrentCpuStates,
sizeof(nCurrentCpuStates)
);
if (nRet == IS_SUCCESS)
{
if ((nCurrentCpuStates & IS_CONFIG_CPU_IDLE_STATES_BIT_AC_VALUE) == 0)
{
// The CPU idle states for mains power is already deactivated
}
if ((nCurrentCpuStates & IS_CONFIG_CPU_IDLE_STATES_BIT_DC_VALUE) == 0)
{
// The CPU idle states for battery power is already deactivated
}
}
UINT nCpuStates = IS_CONFIG_CPU_IDLE_STATES_BIT_AC_VALUE | IS_CONFIG_CPU_IDLE_STATES_BIT_DC_VALUE;
INT nRet = is_Configuration(IS_CONFIG_CPU_IDLE_STATES_CMD_SET_DISABLE_ON_OPEN,
(void*)&nCpuStates,
sizeof(nCpuStates)
);
if (nRet == IS_SUCCESS)
{
nCpuStates = 0;
nRet = is_Configuration(IS_CONFIG_CPU_IDLE_STATES_CMD_GET_DISABLE_ON_OPEN,
(void*)&nCpuStates,
sizeof(nCpuStates)
);
if (nRet == IS_SUCCESS)
{
if (nCpuStates & IS_CONFIG_CPU_IDLE_STATES_BIT_AC_VALUE)
{
// CPU idle states for mains power are deactivated when camera is opened
}
if (nCpuStates & IS_CONFIG_CPU_IDLE_STATES_BIT_DC_VALUE)
{
// CPU idle states for battery power are deactivated when camera is opened
}
}
}
UINT nEnabled = 0;
INT nRet = is_Configuration(IS_CONFIG_OPEN_MP_CMD_GET_ENABLE, (void*)&nEnabled, sizeof(nEnabled));
if (nRet == IS_SUCCESS)
{
if (nEnabled == IS_CONFIG_OPEN_MP_ENABLE)
{
// OpenMP enabled
}
}
nEnabled = 0;
nRet = is_Configuration(IS_CONFIG_OPEN_MP_CMD_GET_ENABLE_DEFAULT, (void*)&nEnabled, sizeof(nEnabled));
if (nRet == IS_SUCCESS)
{
nRet = is_Configuration(IS_CONFIG_OPEN_MP_CMD_SET_ENABLE, (void*)&nEnabled, sizeof(nEnabled));
if (nRet == IS_SUCCESS)
{
// Default value set
}
}
UINT nNumber = 0;
INT nRet = is_Configuration(IS_CONFIG_INITIAL_PARAMETERSET_CMD_GET, (void*)&nNumber, sizeof(nNumber));
if (nRet == IS_SUCCESS)
{
if (nNumber == IS_CONFIG_INITIAL_PARAMETERSET_NONE)
{
// No parameter set specified
}
else if (nNumber == IS_CONFIG_INITIAL_PARAMETERSET_1)
{
// Parameter set 1
}
else if (nNumber == IS_CONFIG_INITIAL_PARAMETERSET_2)
{
// Parameter set 2
}
}
nNumber = IS_CONFIG_INITIAL_PARAMETERSET_2;
is_Configuration(IS_CONFIG_INITIAL_PARAMETERSET_CMD_SET, (void*)&nNumber, sizeof(nNumber));
if (nRet == IS_SUCCESS)
{
// Set to parameter set 2
}