Home > C: Programming > Function descriptions > History back  Previous chapter  Next chapter  Print  

is_Configuration

uEye Camera Manual Version 4.00

is_Configuration

Windows_Logo

Linux_Logo

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.

Hinweis

Note on settings for processor operating states

The settings for processor operating states are available only on Windows operating systems.

Input parameters

hCam

Camera handle

IS_CONFIG_CMD_GET_CAPABILITIES

Returns the configuration options supported by the system.

pParam: Pointer to a UINT bitmask. The status flags from CONFIGURATION_CAPS are returned in the bitmask.

nSizeOfParam: 4

Example 1

IS_CONFIG_CPU_IDLE_STATES_CMD_GET_ENABLE

Returns whether the current settings allow low power consumption operating states (unequal C0).

pParam: Pointer to a UINT bitmask. The status flags from CONFIGURATION_SEL are returned in the bitmask.

nSizeOfParam: 4

Example 2

IS_CONFIG_CPU_IDLE_STATES_CMD_SET_DISABLE_ON_OPEN

Changes the energy settings of the operating system so that low power consumption operating states (unequal C0) are disabled.

pParam: Pointer to a UINT variable, see CONFIGURATION_SEL.

nSizeOfParam: 4

Note: To apply a new setting, you must close all open uEye cameras and then reopen at least one camera.

Example 3

IS_CONFIG_CPU_IDLE_STATES_CMD_GET_DISABLE_ON_OPEN

Returns the current setting for IS_CONFIG_CPU_IDLE_STATES_CMD_SET_DISABLE_ON_OPEN.

pParam: Pointer to a UINT bitmask. The status flags from CONFIGURATION_SEL are returned in the bitmask.

nSizeOfParam: 4

Example 3

IS_CONFIG_OPEN_MP_CMD_GET_ENABLE

Returns whether OpenMP support is enabled.

pParam: Pointer to a UINT bitmask. The status flags from CONFIGURATION_SEL are returned in the bitmask.

nSizeOfParam: 4

Example 4

IS_CONFIG_OPEN_MP_CMD_SET_ENABLE

Enables OpenMP support.

pParam: Pointer to a UINT variable,
to enable: IS_CONFIG_OPEN_MP_ENABLE
to disable: IS_CONFIG_OPEN_MP_DISABLE

nSizeOfParam: 4

Note: The settings are lost after the application is closed and must be set again the next time the camera is started.

Example 4

IS_CONFIG_OPEN_MP_CMD_GET_ENABLE_DEFAULT

Returns the default setting for OpenMP support.

pParam: Pointer to a UINT bitmask. The status flags from CONFIGURATION_SEL are returned in the bitmask.

nSizeOfParam: 4

Example 4

IS_CONFIG_INITIAL_PARAMETERSET_CMD_SET

Sets the parameter set to read and apply from the camera EEPROM when the camera is opened.

pParam: Pointer to a UINT variable,
IS_CONFIG_INITIAL_PARAMETERSET_NONE
IS_CONFIG_INITIAL_PARAMETERSET_1
IS_CONFIG_INITIAL_PARAMETERSET_2

nSizeOfParam: 4

Example 5

IS_CONFIG_INITIAL_PARAMETERSET_CMD_GET

Returns which parameter set will be read and applied from the camera EEPROM when the camera is opened.

pParam: Pointer to a UINT variable,
IS_CONFIG_INITIAL_PARAMETERSET_NONE
IS_CONFIG_INITIAL_PARAMETERSET_1
IS_CONFIG_INITIAL_PARAMETERSET_2

nSizeOfParam: 4

Example 5

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

is_ParameterSet()

Example 1

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

  }

}

Example 2

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

  }

}

Example 3

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

      }

  }

}

Example 4

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

  }

}

Example 5

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

}


Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!

For technical questions please contact you local distributor or use the support form on our website.


© 2012 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com