Aktivieren Sie JavaScript, um die Website anzuzeigen.

IDS Software Suite 4.96.1

Windows_Logo
Linux_Logo

GigE

GigE

Syntax

INT is_BootBoost (HIDS hCam, UINT nCommand, void* pParam, UINT cbSizeOfParam)

Beschreibung

Die Funktion is_BootBoost() öffnet die Kamera beim Systemstart und erlaubt damit einen schnelleren Zugriff auf die Kamera in der laufenden Anwendung (siehe Boot-Boost).

Mit Version 4.50 wurden für die Boot-Boost-Funktion neue Kommandos eingeführt, so dass die Funktion "synchron" aktiviert oder deaktiviert werden kann. Dies bedeutet, dass die Funktion erst dann zurückkehrt, wenn eine Änderung für alle betroffenen Kameras durchgeführt wurde (IS_BOOTBOOST_CMD_ENABLE_AND_WAIT und IS_BOOTBOOST_CMD_DISABLE_AND_WAIT). Mit dem Kommando IS_BOOTBOOST_CMD_WAIT können Änderungen an der Boot-Boost-Konfiguration zu einer Applikation synchronisiert werden.

hint_info

Hinweis: Die Änderung einer Kamera-ID wirkt sich erst nach einem Reconnect auf den Boot-Boost-Zustand der Kamera aus.

Wenn Sie eine Kamera durch die Änderung der Kamera-ID zur Boot-Boost-Liste hinzufügen, darf die Kamera nicht geöffnet sein.

Über den Übergabeparameter nCommand wird dabei der Funktionsmodus gewählt. Der Übergabeparameter pParam ist abhängig vom Funktionsmodus unterschiedlich belegt; bei Funktionen zum Setzen oder Rücklesen eines Wertes enthält pParam einen Zeiger auf eine Variable vom Typ UINT. Die Größe des Speicherbereichs, auf den pParam verweist, wird im Übergabeparameter cbSizeOfParam angegeben.

Übergabeparameter

hCam

Handle auf Kamera

pParam

Zeiger auf Funktionsparameter, der abhängig von nCommand unterschiedlich belegt ist.

cbSizeOfParam

Größe des Speicherbereichs in Byte, auf den pParam verweist.

Inhalte der Struktur IS_BOOTBOOST_ID

IS_BOOTBOOST_ID_MIN

Kleinste gültige ID (1)

IS_BOOTBOOST_ID_MAX

Größte gültige ID (254)

IS_BOOTBOOST_ID_NONE

Spezieller Wert für: keine ID (0)

IS_BOOTBOOST_ID_ALL

Spezieller Wert für: alle IDs (255)

Inhalte der Struktur IS_BOOTBOOST_IDLIST

DWORD

u32NumberOfEntries

Anzahl der aufgeführten Objekte

IS_BOOTBOOST_ID

aList

Informationen zur Liste

Rückgabewerte

IS_INVALID_PARAMETER

Einer der übergebenen Parameter ist außerhalb des gültigen Bereichs, oder für diesen Sensor nicht unterstützt, bzw. in diesem Modus nicht zugänglich.

IS_IO_REQUEST_FAILED

Eine IO Anforderung des uEye Treibers schlug fehl. Eventuell passen die Versionen der Dateien ueye_api.dll (API) und ueye_usb.sys bzw. ueye_eth.sys (Treiber) nicht zusammen.

IS_NO_SUCCESS

Allgemeine Fehlermeldung

IS_NOT_SUPPORTED

Das verwendete Kameramodell unterstützt diese Funktion oder Einstellung nicht.

IS_SUCCESS

Funktion erfolgreich

IS_TIMED_OUT

Ein Timeout trat auf.

Beispiel 1

INT nRet = IS_SUCCESS;
 
// Enable boot boost mode
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_ENABLE, NULL, 0);
 
// Disable boot boost mode
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_DISABLE, NULL, 0);  
 
UINT u32Enable = 0;
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_GET_ENABLED, (void*)&u32Enable, sizeof(u32Enable));
if (nRet == IS_SUCCESS)
{
  if (u32Enable != 0)
  {
      // Boot boost is enabled
  }
}

Beispiel 2

/* Use case: user changes camera ID */
void ChangeCameraID(HIDS hCam, INT nNewCameraID)
{
INT nRet = IS_SUCCESS;
UINT uTimeout_in_seconds = 30;
 
/* Disable boot boost mode in synchronous manner.
 * Note that we explicitly specify a timeout of 30 seconds here. */
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_DISABLE_AND_WAIT, &uTimeout_in_seconds, sizeof(uTimeout_in_seconds));
if (nRet != IS_SUCCESS)
{
  /* Handle error
   * Note: nRet is IS_TIMED_OUT if the specified timeout elapsed
   * before all cameras have left the boot boost mode. */
}
/* At this point we can rely on the fact that all cameras
 * have left the boot boost mode. */
 
/* Change the camera ID */
nRet = is_SetCameraID(hCam, nNewCameraID);
if (nRet != IS_SUCCESS)
{
  /* Handle error */
}
 
/* Enable boot boost mode in synchronous manner.
 * Note that we do not explicitly specify a timeout here;
 * the function will apply the default timeout of 60 seconds. */
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_ENABLE_AND_WAIT, NULL, 0);
if (nRet != IS_SUCCESS)
{
  /* Handle error
   * Note: nRet is IS_TIMED_OUT if the default timeout elapsed
   * before all cameras have entered the boot boost mode. */
}
 
/* At this point we can rely on the fact that all cameras
 * that are selected for boot boost
 * have entered the boot boost mode
 * (if the functions did not report an error code). */
}

Beispiel 3

INT nRet = IS_SUCCESS;
IS_BOOTBOOST_ID nBootboostValue = 0;
 
// Add camera ID 5
nBootboostValue = 5;
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_ADD_ID, (void*)&nBootboostValue, sizeof(nBootboostValue));
 
// Remove camera ID 5
nBootboostValue = 5;
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_REMOVE_ID, (void*)&nBootboostValue,
                  sizeof(nBootboostValue));
 
// Set all camera IDs (1 - 254)
nBootboostValue = IS_BOOTBOOST_ID_ALL;
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_ADD_ID, (void*)&nBootboostValue, sizeof(nBootboostValue));

Beispiel 4

/* Use case: user adds a camera ID to the boot boost list */
void SelectCameraIdForBootBoost(HIDS hCam, IS_BOOTBOOST_ID cameraIdToSelect)
{
INT nRet = IS_SUCCESS;
UINT uTimeout_in_seconds = 30;
 
/* Add the camera ID to the boot boost ID list. */
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_ADD_ID, &cameraIdToSelect, sizeof(cameraIdToSelect));
if (nRet != IS_SUCCESS)
{
  /* Handle error */
}
/* Wait until the changed boot boost configuration was applied by all cameras,
 * i.e. all cameras with the added camera ID are in boot boost mode.
 * Note that we do not explicitly specify a timeout here;
 * the function will apply the default timeout of 60 seconds. */
 
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_WAIT, NULL, 0);
if (nRet != IS_SUCCESS)
{
  /* Handle error
   * Note: nRet is IS_TIMED_OUT if the default timeout elapsed
   * before all cameras have entered the boot boost mode. */
}
 
/* At this point we can rely on the fact that all cameras
 * that are selected for boot boost have entered the boot boost mode
 * (if the functions did not report an error code). */
}

Beispiel 5

INT nRet = IS_SUCCESS;
 
// The list has 3 entries
UINT nNumber = 3;
 
// Calculate the correct size in bytes of the boot boost list
UINT nSize = sizeof(IS_BOOTBOOST_IDLIST) + ((nNumber - 1) * sizeof(IS_BOOTBOOST_ID));
 
// This line is equivalent
nSize = IS_BOOTBOOST_IDLIST_HEADERSIZE + (nNumber * IS_BOOTBOOST_IDLIST_ELEMENTSIZE);
 
IS_BOOTBOOST_IDLIST *pBootBoostList = (IS_BOOTBOOST_IDLIST*)new BYTE[nSize];
 
// Add the IDs 1, 2 and 3
pBootBoostList->aList[0] = 1;
pBootBoostList->aList[1] = 2;
pBootBoostList->aList[2] = 3;
// Do not forget to declare the number of entries!
pBootBoostList->u32NumberOfEntries = 3;
 
// Set the list
INT nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_SET_IDLIST, (void*)pBootBoostList, nSize);
 
delete [] pBootBoostList;
pBootBoostList = NULL;
 
// Clear the list
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_CLEAR_IDLIST, NULL, 0);

Beispiel 6

INT nRet = IS_SUCCESS;
 
// Get the size of the boot boost list
UINT nNumber = 0;
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_GET_IDLIST_SIZE, (void*)&nNumber, sizeof(nNumber));
if ((nNumber > 0) && (nRet == IS_SUCCESS))
{
// Calculate the correct size in bytes of the boot boost list
UINT nSize = sizeof(IS_BOOTBOOST_IDLIST) + (nNumber * sizeof(IS_BOOTBOOST_ID));
 
// This line is equivalent
nSize = IS_BOOTBOOST_IDLIST_HEADERSIZE + (nNumber * IS_BOOTBOOST_IDLIST_ELEMENTSIZE);
 
IS_BOOTBOOST_IDLIST *pBootBoostList = (IS_BOOTBOOST_IDLIST*)new BYTE[nSize];
 
// Init the allocated list.
ZeroMemory(pBootBoostList, nSize);
// It is particularly important to tell is_BootBoost() how many items the list can take!
pBootBoostList->u32NumberOfEntries = nNumber;
 
// Get the list
nRet = is_BootBoost(0, IS_BOOTBOOST_CMD_GET_IDLIST, (void*)m_pBootBoostList, nSize);
 
// ...
}