Function declarations for control of GenICam based cameras connected to a Basler frame grabber.
More...
#include "fg_struct.h"
#include "siso_genicam_error.h"
#include <sys/types.h>
Go to the source code of this file.
|
enum | SgcPowerStatus {
SgcPowerStatusDisabled
, SgcPowerStatusInitializing
, SgcPowerStatusNoCable
, SgcPowerStatusOff
,
SgcPowerStatusOn
, SgcPowerStatusErrorLowCurrent
, SgcPowerStatusErrorHighCurrent
, SgcPowerStatusErrorLowVoltage
,
SgcPowerStatusErrorHighVoltage
, SgcPowerStatusErrorAdcFault
, SgcPowerStatusErrorInvalidValue
} |
| power status values More...
|
|
|
int | DEPRECATED (Sgc_CxpConnect(SgcBoardHandle *boardHandle, SgcCameraHandle *cameraHandle)) |
| connects a camera handle to a CXP-GenICam camera
|
|
int | DEPRECATED (Sgc_CxpDisconnect(SgcCameraHandle *cameraHandle)) |
| disconnects a camera handle to a CXP - GenICam camera
|
|
int | DEPRECATED (Sgc_DirectRegisterRead(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, uint32_t *data)) |
| reads an integer value from the camera
|
|
int | DEPRECATED (Sgc_DirectRegisterReadMem(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, unsigned char *data, uint32_t *buflen)) |
| write a block of data to the camera
|
|
int | DEPRECATED (Sgc_DirectRegisterReadMemWithTimeOut(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, unsigned char *data, uint32_t *buflen, uint32_t timeoutInMilliseconds)) |
| write a block of data to the camera
|
|
int | DEPRECATED (Sgc_DirectRegisterWrite(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, const uint32_t data, const unsigned int switchByteOrder)) |
| write an integer value to the camera
|
|
int | DEPRECATED (Sgc_DirectRegisterWriteMem(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, const unsigned char *data, const uint32_t buflen)) |
| write a block of data to the camera
|
|
int | DEPRECATED (Sgc_DirectRegisterWriteMemWithTimeOut(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, const unsigned char *data, const uint32_t buflen, uint32_t timeoutInMilliseconds)) |
| write a block of data to the camera
|
|
int | DEPRECATED (Sgc_LoadBoardConfiguration(SgcBoardHandle *board_handle, const char *configFileName)) |
| load connection parameters from a file
|
|
int | DEPRECATED (Sgc_RegisterEventCallback(SgcBoardHandle *boardHandle, SgcEventCallback_t eventHandler, void *userData)) |
| Register an callback procedure for event notifications.
|
|
int | DEPRECATED (Sgc_SaveBoardConfiguration(SgcBoardHandle *board_handle, const char *configFileName)) |
| save connection parameters of the board to a file
|
|
int | Sgc_callInternalFunction (int id, const void *const in, void *const out) |
|
int | Sgc_clearStringCache (SgcCameraHandle *cameraHandle) |
| Clear the internal cache for GenICam string representations.
|
|
int | Sgc_connectCamera (SgcCameraHandle *cameraHandle) |
| Connect to camera by downloading the cameras internal GenICam XML file A call of this function is necessary in order to control the camera by using GenICam features e.g. "Width", Height" etc. and starting / stopping the camera acquisition as well. The functions loads the GenICam form camera and creates a GenICam node map internally for use by calls to Sgc_SetXXXValue, Sgc_getXXXValues. Alternatively the function Sgc_connectCameraWithExternalXml might be called, if no GenICam is available at the camera.
|
|
int | Sgc_connectCameraWithExternalXml (SgcCameraHandle *cameraHandle, const char *filename) |
| Connect to Camera by using a certain GenICam XML File from the hard disk.
|
|
int | Sgc_DirectRegisterRead64 (SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, uint32_t *data) |
| reads an integer value to the camera
|
|
int | Sgc_DirectRegisterReadMem64 (SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, unsigned char *data, uint32_t *buflen) |
| write a block of data to the camera
|
|
int | Sgc_DirectRegisterReadMemWithTimeOut64 (SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, unsigned char *data, uint32_t *buflen, uint32_t timeoutInMilliseconds) |
| write a block of data to the camera
|
|
int | Sgc_DirectRegisterWrite64 (SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, const uint32_t data, const unsigned int switchByteOrder) |
| write a block of data to the camera
|
|
int | Sgc_DirectRegisterWriteMem64 (SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, const unsigned char *data, const uint32_t buflen) |
| write a block of data to the camera
|
|
int | Sgc_DirectRegisterWriteMemWithTimeOut64 (SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, const unsigned char *data, const uint32_t buflen, uint32_t timeoutInMilliseconds) |
| write a block of data to the camera
|
|
int | Sgc_disconnectCamera (SgcCameraHandle *cameraHandle) |
| Disconnect from camera.
|
|
int | Sgc_executeCommand (SgcCameraHandle *cameraHandle, const char *featureName) |
| Execute a certain GenICam command at the camera.
|
|
void | Sgc_freeBoard (SgcBoardHandle *boardHandle) |
| Release resources allocated by Sgc_initBoard.
|
|
int | Sgc_getBoardPropertyWithType (SgcBoardHandle *boardHandle, const char *propertyName, const void *value, unsigned int propertyType, const void *additionalValue) |
| get a global board property
|
|
int | Sgc_getBooleanValue (SgcCameraHandle *cameraHandle, const char *featureName, unsigned int *valuePtr) |
| Read GenICam boolean value at camera.
|
|
int | Sgc_getCamera (SgcBoardHandle *boardHandle, const unsigned int port, SgcCameraHandle **cameraHandle) |
| get a camera object associated to a certain frame grabber port
|
|
int | Sgc_getCameraByIndex (SgcBoardHandle *boardHandle, const unsigned int index, SgcCameraHandle **cameraHandle) |
| get a handle of the currently detected cameras
|
|
int | Sgc_getCameraCount (SgcBoardHandle *boardHandle) |
| get number of the currently detected cameras
|
|
SgcCameraInfo * | Sgc_getCameraInfo (SgcCameraHandle *cameraHandle) |
| get manufacturer information from connected camera.
|
|
int | Sgc_getCameraPropertyWithType (SgcCameraHandle *cameraHandle, const char *propertyName, void *value, unsigned int *propertyType, void *additionalValue) |
| get camera specific properties
|
|
int | Sgc_getEnumerationValue (SgcCameraHandle *cameraHandle, const char *featureName, int64_t *value) |
| Read GenICam integer representation of enumeration value from camera.
|
|
int | Sgc_getEnumerationValueAsString (SgcCameraHandle *cameraHandle, const char *featureName, const char **valuePtr) |
| Read GenICam string representation of enumeration value from camera.
|
|
const char * | Sgc_getErrorDescription (const int errorCode) |
| returns a descriptive text for the error code
|
|
int | Sgc_getFloatValue (SgcCameraHandle *cameraHandle, const char *featureName, double *valuePtr) |
| Read GenICam floating point value at camera.
|
|
int | Sgc_getFloatValueLimits (SgcCameraHandle *cameraHandle, const char *featureName, double *min_valuePtr, double *max_valuePtr, double *step_valuePtr) |
| Read GenICam Float value limits and increment.
|
|
int | Sgc_getGenICamXML (SgcCameraHandle *cameraHandle, char *buffer, size_t *bufferSize) |
| returns the currently loaded GenICam-XML
|
|
int | Sgc_getIntegerValue (SgcCameraHandle *cameraHandle, const char *featureName, int64_t *valuePtr) |
| Read GenICam Integer value from camera.
|
|
int | Sgc_getIntegerValueLimits (SgcCameraHandle *cameraHandle, const char *featureName, int64_t *min_valuePtr, int64_t *max_valuePtr, int64_t *step_valuePtr) |
| Read GenICam Integer value from camera.
|
|
int | Sgc_getStringValue (SgcCameraHandle *cameraHandle, const char *featureName, const char **valuePtr) |
| Read GenICam string value from camera.
|
|
int | Sgc_initBoard (Fg_Struct *fg, unsigned int initFlag, SgcBoardHandle **boardHandle) |
| Create an Interface object for accessing cameras connected to a frame grabber.
|
|
int | Sgc_initBoardEx (Fg_Struct *fg, unsigned int initFlag, SgcBoardHandle **boardHandle, unsigned int portMask, unsigned int slaveMode) |
| Create an Interface object for accessing cameras connected to a frame grabber.
|
|
unsigned int | Sgc_isCameraAvailable (SgcBoardHandle *boardHandle, const unsigned int port) |
| Check for camera.
|
|
unsigned int | Sgc_isCameraAvailableAtIndex (SgcBoardHandle *boardHandle, const unsigned int index) |
| Check for camera.
|
|
int | Sgc_isCommandDone (SgcCameraHandle *cameraHandle, const char *featureName, unsigned int *valuePtr) |
| Check, if a GenICam command is performed completely.
|
|
int | Sgc_LinkConnect (SgcBoardHandle *boardHandle, SgcCameraHandle *cameraHandle) |
| connects a camera handle a GenICam capable camera
|
|
int | Sgc_LinkDisconnect (SgcCameraHandle *cameraHandle) |
| disconnects a camera handle from a GenICam capable camera
|
|
int | Sgc_LoadCameraParameters (SgcCameraHandle *cameraHandle, const char *paramFileName, uint32_t flags) |
| load the current camera parameters from a file
|
|
int | Sgc_loadCameraXml (SgcCameraHandle *cameraHandle) |
| Downloading the cameras internal GenICam XML file. A call of this function with a connectToGenAPI set to true is necessary in order to control the camera by using GenICam features e.g. "Width", Height" etc. and starting / stopping the camera acquisition as well. The functions loads the GenICam form camera and optionally creates a GenICam node map internally for use by calls to Sgc_SetXXXValue, Sgc_getXXXValues. Alternatively the function Sgc_connectCameraWithExternalXml might be called, if no GenICam is available at the camera.
|
|
int | Sgc_LoadConnectionProfile (Fg_Struct *fg, const char *boardConfigurationFilePath, SgcConnectionProfile **connectionProfilePtr) |
| load a connection profile
|
|
int | Sgc_memoryReadFromCamera (SgcCameraHandle *cameraHandle, void *buffer, uint64_t address, size_t length) |
| read a number of bytes from a camera register without a timeout
|
|
int | Sgc_memoryReadFromCameraWithTimeout (SgcCameraHandle *cameraHandle, void *buffer, uint64_t address, size_t length, uint32_t timeoutInMilliseconds) |
| read a number of bytes from a camera register
|
|
int | Sgc_memoryWriteToCamera (SgcCameraHandle *cameraHandle, const void *buffer, uint64_t address, size_t length) |
| write a number of bytes to a camera register without a timeout
|
|
int | Sgc_memoryWriteToCameraWithTimeout (SgcCameraHandle *cameraHandle, const void *buffer, uint64_t address, size_t length, uint32_t timeoutInMilliseconds) |
| write a number of bytes to a camera register
|
|
int | Sgc_powerSwitch (SgcBoardHandle *boardHandle, const unsigned int portMask) |
| switch on Power over CoaxPress/CameraLink/...
|
|
int | Sgc_powerSwitchExt (SgcBoardHandle *boardHandle, const unsigned int portMask, const unsigned int command) |
| switch on Power over CoaxPress
|
|
int | Sgc_registerBoardEventCallback (SgcBoardHandle *board_handle, Sgc_BoardEventCallbackFunc_t eventHandler, void *userData) |
| Register an callback procedure for board event notifications.
|
|
int | Sgc_registerCameraEventCallback (SgcCameraHandle *camera_handle, Sgc_CameraEventCallbackFunc_t eventHandler, void *userData) |
| Register an callback procedure for camera event notifications.
|
|
int | Sgc_registerReadFromCamera (SgcCameraHandle *cameraHandle, uint32_t *data, uint64_t address) |
| read a 32 bit integer value from a camera register
|
|
int | Sgc_registerWriteToCamera (SgcCameraHandle *cameraHandle, uint32_t data, uint64_t address) |
| write a 32 bit integer value to a camera register
|
|
int | Sgc_RestoreLowLevelLinkProfile (SgcBoardHandle *boardHandle, const char *file) |
| restore low level link profile from file to board
|
|
int | Sgc_SaveCameraParameters (SgcCameraHandle *cameraHandle, const char *paramFileName, uint32_t flags) |
| save the current camera parameters to a file
|
|
int | Sgc_scanPorts (SgcBoardHandle *boardHandle, const unsigned int portMask, const int discoveryTimeout, const int speed) |
| Scans the defined ports of the frame grabber for present cameras.
|
|
int | Sgc_scanPortsEx (SgcBoardHandle *boardHandle, const unsigned int portMask, const int discoveryTimeout, const int speed, const unsigned int flags) |
| Scans the defined ports of the frame grabber for present cameras.
|
|
int | Sgc_setBoardPropertyWithType (SgcBoardHandle *boardHandle, const char *propertyName, const void *propertyValuePtr, unsigned int propertyType, void *additionalValue) |
| set global board properties
|
|
int | Sgc_setBooleanValue (SgcCameraHandle *cameraHandle, const char *featureName, unsigned int value) |
| Set GenICam boolean value at camera.
|
|
int | Sgc_setCameraPropertyWithType (SgcCameraHandle *cameraHandle, const char *propertyName, const void *value, unsigned int propertyType, void *additionalValue) |
| set camera or camera connection specific properties
|
|
int | Sgc_setEnumerationValue (SgcCameraHandle *cameraHandle, const char *featureName, const char *value) |
| Set GenICam enumeration value at camera.
|
|
int | Sgc_setFloatValue (SgcCameraHandle *cameraHandle, const char *featureName, double value) |
| Set GenICam floating point value at camera.
|
|
int | Sgc_setGenICamXML (SgcCameraHandle *cameraHandle, const char *buffer, const size_t bufferSize) |
| sets the currently GenICam-XML from a buffer
|
|
int | Sgc_setIntegerValue (SgcCameraHandle *cameraHandle, const char *featureName, int64_t value) |
| Set GenICam Integer value at camera.
|
|
int | Sgc_setStringValue (SgcCameraHandle *cameraHandle, const char *featureName, const char *value) |
| Set GenICam string value at camera.
|
|
int | Sgc_startAcquisition (SgcCameraHandle *cameraHandle, unsigned int startCamera) |
| activates the the data flow towards the applet and activates the image acquisition at the camera This function is used in combination with the Fg_StartAcquire() function of the standard frame grabber SDK. Acquisition needs to be started from both sides always: from the applet side (Fg_startAcquire()) and from the camera side (Sgc_startAcquisition()). The order or the commands should be:
|
|
int | Sgc_stopAcquisition (SgcCameraHandle *cameraHandle, unsigned int stopCamera) |
| stops the the data flow towards the applet and stops the image acquisition at the camera (optionally)
|
|
int | Sgc_StoreLowLevelLinkProfile (SgcBoardHandle *boardHandle, const char *file) |
| store current low level link profile into file
|
|
int | Sgc_stringReadFromCamera (SgcCameraHandle *cameraHandle, char *data, uint64_t address, unsigned int length) |
| read a string value from a camera register This function can be used for a direct access to a camera without by bypassing the GenICam XML implementation and register name translations. It might be used, if the register address of the connected camera is known exactly.
|
|
int | Sgc_UnloadConnectionProfile (SgcConnectionProfile *connectionProfile) |
| unload a connection profile
|
|
int | Sgc_updateCameraInfos (SgcCameraHandle *cameraHandle) |
| update the informations of the camera handle
|
|
Function declarations for control of GenICam based cameras connected to a Basler frame grabber.
siso_genicam.h
Copyright (c) 2021 Basler AG, All Rights Reserved.
- Author
- Basler AG
◆ BOARD_PROP_CAMPORT
#define BOARD_PROP_CAMPORT "CamPort" |
◆ BOARD_PROP_CL_CLP_SHARED_LIBRARY_PATH
#define BOARD_PROP_CL_CLP_SHARED_LIBRARY_PATH "CLCLPSharedLibraryPath" |
Path to a camera link protocol shared libray instead of GenCP. Changing this property takes effect after closing and reinitializing the board
◆ BOARD_PROP_CL_LOADED_CLP_SHARED_LIBRARY_PATH
#define BOARD_PROP_CL_LOADED_CLP_SHARED_LIBRARY_PATH "CLCLPLoadedSharedLibraryPath" |
Path to the loaded camera link protocol shared libray (instead of GenCP). This property is Read Only
◆ BOARD_PROP_CLHS_FEC_ENABLE
#define BOARD_PROP_CLHS_FEC_ENABLE "CLHSFecEnable" |
Enable/Disable Forward error correction
◆ BOARD_PROP_CLHS_LINK_DETECTION_ENABLE
#define BOARD_PROP_CLHS_LINK_DETECTION_ENABLE "CLHSLinkDetectionEnable" |
enable or disable link detection at a specific frame grabber port. Value: 0, disable, 1 enable; AddValue: physical port
◆ BOARD_PROP_CLHS_LINK_STATE
#define BOARD_PROP_CLHS_LINK_STATE "CLHSLinkState" |
state of the physical link: disconnected, connected, connecting
◆ BOARD_PROP_CLHS_READ_MDIO
#define BOARD_PROP_CLHS_READ_MDIO "CLHSReadMDIO" |
internal interface for read access to physical layer
◆ BOARD_PROP_CLHS_SEND_REVISION_MESSAGE
#define BOARD_PROP_CLHS_SEND_REVISION_MESSAGE "CLHSSendRevisionMessage" |
Force Sending of a revision message, AddValue = 1, forces a LinkReset at the message
◆ BOARD_PROP_CLHS_WRITE_MDIO
#define BOARD_PROP_CLHS_WRITE_MDIO "CLHSWriteMDIO" |
internal interface for write access to physical layer
◆ BOARD_PROP_CXP_AUX_TEMP
#define BOARD_PROP_CXP_AUX_TEMP "CxpPowerAdIn" |
Returns the value of temperature in Celsius at frame grabber
◆ BOARD_PROP_CXP_POWERSENSE
#define BOARD_PROP_CXP_POWERSENSE "CxpPowerSense" |
board properties
Return the value of the current in mA at the PowerOverCoaxPress Subsystem for a given frame grabber port.
◆ BOARD_PROP_CXP_POWERSTATUS
#define BOARD_PROP_CXP_POWERSTATUS "CxpPowerStatus" |
Returns the state of the PowerOverCoaxPress subsystem for a given frame grabber port
◆ BOARD_PROP_CXP_POWERVIN
#define BOARD_PROP_CXP_POWERVIN "CxpPowerVin" |
Returns the value of voltage output in V at the PowerOverCoaxPress Subsystem for a given frame grabber port
◆ BOARD_PROP_CXP_TRANSCEIVER_DISPARITY_ERROR
#define BOARD_PROP_CXP_TRANSCEIVER_DISPARITY_ERROR "CxpTransceiverDisparityError" |
Error indicator at physical layer
◆ BOARD_PROP_CXP_TRANSCEIVER_NOT_IN_TABLE
#define BOARD_PROP_CXP_TRANSCEIVER_NOT_IN_TABLE "CxpTransceiverNotInTable" |
Error indicator at physical layer
◆ BOARD_PROP_GBE_ACTION_CMD
#define BOARD_PROP_GBE_ACTION_CMD "GbeActionCmd" |
Returns GBE action command supported.
◆ BOARD_PROP_GBE_ACTION_SGN
#define BOARD_PROP_GBE_ACTION_SGN "GbeActionSgn" |
Returns GBE actions signals
◆ BOARD_PROP_GBE_AGGREG_TYPE
#define BOARD_PROP_GBE_AGGREG_TYPE "GbeAggregLinks" |
Returns aggregation on GBE.
◆ BOARD_PROP_GBE_ALGORITHM
#define BOARD_PROP_GBE_ALGORITHM "GbeAlgorithm" |
◆ BOARD_PROP_GBE_AUTO_IP
#define BOARD_PROP_GBE_AUTO_IP "GbeAutoIp" |
Returns AutoIp status of GBE.
◆ BOARD_PROP_GBE_CL_SYNC_LEN
#define BOARD_PROP_GBE_CL_SYNC_LEN "GbeCLSyncLen" |
Returns GBE set CLSyncLen
◆ BOARD_PROP_GBE_CONF_CUR
#define BOARD_PROP_GBE_CONF_CUR "GbeConfCur" |
Returns GBE current configuration.
◆ BOARD_PROP_GBE_CONF_OPT
#define BOARD_PROP_GBE_CONF_OPT "GbeConfOpt" |
Returns GBE configuration option.
◆ BOARD_PROP_GBE_DEVMODE
#define BOARD_PROP_GBE_DEVMODE "GbeDevMode" |
◆ BOARD_PROP_GBE_DHCP
#define BOARD_PROP_GBE_DHCP "GbeDHCP" |
Returns DHCP status of GBE.
◆ BOARD_PROP_GBE_EXTEND_ID
#define BOARD_PROP_GBE_EXTEND_ID "GbeCLExtendID" |
◆ BOARD_PROP_GBE_GVCP_CONF
#define BOARD_PROP_GBE_GVCP_CONF "GbeGvcpConf" |
Returns GBE gvcp configuration
◆ BOARD_PROP_GBE_GVCP_VER
#define BOARD_PROP_GBE_GVCP_VER "GbeGvcpVer" |
◆ BOARD_PROP_GBE_IP_DEST
#define BOARD_PROP_GBE_IP_DEST "GbeIpDest" |
Returns ip destination of GBE.
◆ BOARD_PROP_GBE_IP_SOURCE
#define BOARD_PROP_GBE_IP_SOURCE "GbeIpSource" |
Returns ip source of GBE.
◆ BOARD_PROP_GBE_IP_STATIC
#define BOARD_PROP_GBE_IP_STATIC "GbeIpStatic" |
Returns ip static of GBE.
◆ BOARD_PROP_GBE_MAC_DEST
#define BOARD_PROP_GBE_MAC_DEST "GbeMacDest" |
Returns mac destination of GBE.
◆ BOARD_PROP_GBE_MAC_SOURCE
#define BOARD_PROP_GBE_MAC_SOURCE "GbeMacSource" |
Returns mac source of GBE.
◆ BOARD_PROP_GBE_MASK_LINKS
#define BOARD_PROP_GBE_MASK_LINKS "GbeMaskLinks" |
Returns mask of links on GBE.
◆ BOARD_PROP_GBE_NR_LINKS
#define BOARD_PROP_GBE_NR_LINKS "GbeNrLinks" |
Returns nr of links on GBE .
◆ BOARD_PROP_GBE_NR_MSG_CH
#define BOARD_PROP_GBE_NR_MSG_CH "GbeNrMsgCh" |
Returns GBE nr of msg channels
◆ BOARD_PROP_GBE_NR_NET_INTF
#define BOARD_PROP_GBE_NR_NET_INTF "GbeNrNetIntf" |
Returns GBE nr of network interfaces configuration.
◆ BOARD_PROP_GBE_RESTART_IP
#define BOARD_PROP_GBE_RESTART_IP "GbeRestartIp" |
◆ BOARD_PROP_GBE_SET_CCP
#define BOARD_PROP_GBE_SET_CCP "GbeCCP" |
◆ BOARD_PROP_GBE_STREAM_CH
#define BOARD_PROP_GBE_STREAM_CH "GbeStreamCh" |
Returns GBE stream channels
◆ BOARD_PROP_GBE_STREAM_CHANNEL
#define BOARD_PROP_GBE_STREAM_CHANNEL "GbeStreamChannel" |
Returns GBE enable stream channel
◆ BOARD_PROP_GBE_TIMEOUT
#define BOARD_PROP_GBE_TIMEOUT "GbeTimeOut" |
◆ BOARD_PROP_LINKCONFIG
#define BOARD_PROP_LINKCONFIG "LinkConfig" |
◆ BOARD_PROP_MAGIC_VALUE
#define BOARD_PROP_MAGIC_VALUE "MagicValue" |
Returns magic value - normal only for CXP.
◆ BOARD_PROP_NR_OF_CAMERAS
#define BOARD_PROP_NR_OF_CAMERAS "NrOfCameras" |
Returns the number of detected cameras.
◆ BOARD_PROP_NR_OF_PORTS
#define BOARD_PROP_NR_OF_PORTS "NrOfPorts" |
Returns nr of ports on board.
◆ BOARD_PROP_REVISION
#define BOARD_PROP_REVISION "CameraRevision" |
◆ BOARD_PROP_TRANSCEIVERS_LOCKED_MASK
#define BOARD_PROP_TRANSCEIVERS_LOCKED_MASK "TransceiversLockedMask" |
Returns the mask of transceivers locked (Bit n: channel n transceiver is locked).
◆ CAM_PROP_APPLETEXTENSIONID_S
#define CAM_PROP_APPLETEXTENSIONID_S "APPLETLINKORDERINDEX" |
◆ CAM_PROP_APPLETMASTERID
#define CAM_PROP_APPLETMASTERID "AppletMasterID" |
master ID of this applet port [in/out]
◆ CAM_PROP_APPLETMASTERID_S
◆ CAM_PROP_APPLETOPERATORINDEX
#define CAM_PROP_APPLETOPERATORINDEX "AppletOperatorIndex" |
index of the applet dma camera operator
◆ CAM_PROP_APPLETOPERATORSIZE
#define CAM_PROP_APPLETOPERATORSIZE "AppletOperatorSize" |
size of the applet dma camera operator
◆ CAM_PROP_APPLETPORT
#define CAM_PROP_APPLETPORT "AppletPort" |
index of the applet port of an certain link [in/out]
◆ CAM_PROP_APPLETPORT_S
◆ CAM_PROP_CONTROLPACKETSIZE
#define CAM_PROP_CONTROLPACKETSIZE "ControlPacketSize" |
max. size of CxP Control packages for that camera [out]
◆ CAM_PROP_CONTROLPACKETSIZE_S
◆ CAM_PROP_DISCOVERYSPEED
#define CAM_PROP_DISCOVERYSPEED "DiscoverySpeed" |
CXP-speed for a certain link as enum, values see CXP_SPEED_XXX [in/out]
◆ CAM_PROP_DISCOVERYSPEED_S
◆ CAM_PROP_EXTENSIONLINK_S
#define CAM_PROP_EXTENSIONLINK_S "EXTENSIONLINK" |
◆ CAM_PROP_FAMILY_NAME
#define CAM_PROP_FAMILY_NAME "FamilyName" |
camera family name as a zero-terminated string [out]
◆ CAM_PROP_FGPORT
#define CAM_PROP_FGPORT "FgPort" |
index of the frame grabber port of an certain link [in/out]
◆ CAM_PROP_FGPORT_S
◆ CAM_PROP_FIRMWARE_VERSION
#define CAM_PROP_FIRMWARE_VERSION "FirmwareVersion" |
camera firmware version as a zero-terminated string [out]
◆ CAM_PROP_ISCONNECTED
#define CAM_PROP_ISCONNECTED "Connected" |
State of CXP - Connection [out]
◆ CAM_PROP_ISCONNECTED_S
◆ CAM_PROP_ISGENICAMCONNECTED
#define CAM_PROP_ISGENICAMCONNECTED "IsGenICamConnected" |
state of GenICam connection (true/false) [out]
◆ CAM_PROP_ISGENICAMCONNECTED_S
◆ CAM_PROP_ISTRANSCEIVERLOCKED
#define CAM_PROP_ISTRANSCEIVERLOCKED "IsTransceiverLocked" |
status of the transceiver lock [out]
◆ CAM_PROP_ISTRANSCEIVERLOCKED_S
◆ CAM_PROP_LINKCONFIG
#define CAM_PROP_LINKCONFIG "LinkConfig" |
link configuration value[23:0] -> speed, value[27:24] -> number of links [in/out]
◆ CAM_PROP_LINKCONFIG_S
◆ CAM_PROP_LINKORDER_INDEX_S
#define CAM_PROP_LINKORDER_INDEX_S "LINKORDERINDEX" |
◆ CAM_PROP_LINKSPEED
#define CAM_PROP_LINKSPEED "LinkSpeed" |
CXP-speed for a certain link as enum, values see CXP_SPEED_XXX [in/out]
◆ CAM_PROP_LINKSPEED_S
◆ CAM_PROP_MANUFACTURER_INFO
#define CAM_PROP_MANUFACTURER_INFO "ManufacturerInfo" |
camera manufacturer info as a zero-terminated string [out]
◆ CAM_PROP_MASTERID
#define CAM_PROP_MASTERID "MasterID" |
master ID of this camera [in/out] (this is set by the discovery using both the port index and the board index)
◆ CAM_PROP_MASTERID_S
◆ CAM_PROP_MASTERLINK
#define CAM_PROP_MASTERLINK "MasterLink" |
master-state of a certain link [out]
◆ CAM_PROP_MASTERLINK_S
◆ CAM_PROP_MASTERPORT
#define CAM_PROP_MASTERPORT "MasterPort" |
master-port of this camera [out]
◆ CAM_PROP_MASTERPORT_S
◆ CAM_PROP_MODEL_NAME
#define CAM_PROP_MODEL_NAME "ModelName" |
camera model name as a zero-terminated string [out]
◆ CAM_PROP_NROFLINKS
#define CAM_PROP_NROFLINKS "NrOfLinks" |
No. of camera links including master and extension links [in/out]
◆ CAM_PROP_NROFLINKS_S
◆ CAM_PROP_SERIAL_NUMBER
#define CAM_PROP_SERIAL_NUMBER "SerialNumber" |
camera serial number as a zero-terminated string [out]
◆ CAM_PROP_STREAMPACKET_SIZE_S
◆ CAM_PROP_STREAMPACKETSIZE
#define CAM_PROP_STREAMPACKETSIZE "StreamPacketSize" |
camera properties
max. size of stream packages [in/out]
◆ CAM_PROP_STREAMPACKETSIZE_S
◆ CAM_PROP_USER_ID
#define CAM_PROP_USER_ID "UserID" |
camera user id as a zero-terminated string [out]
◆ CAM_PROP_VENDOR_NAME
#define CAM_PROP_VENDOR_NAME "VendorName" |
camera vendor name as a zero-terminated string [out]
◆ CAM_PROP_VERSION
#define CAM_PROP_VERSION "Version" |
camera version as a zero-terminated string [out]
◆ CAM_PROP_XML_DATA
#define CAM_PROP_XML_DATA "XmlData" |
camera XML data as a zero-terminated string [in/out]
◆ CXP_SPEED_10000
define for link speed 10 Gbps
◆ CXP_SPEED_1250
define for link speed 1.25 Gbps
◆ CXP_SPEED_12500
define for link speed 12.5 Gbps
◆ CXP_SPEED_2500
define for link speed 2.5 Gbps
◆ CXP_SPEED_3125
define for link speed 3.125 Gbps
◆ CXP_SPEED_5000
define for link speed 5 Gbps
◆ CXP_SPEED_6250
define for link speed 6.25 Gbps
◆ CXP_SPEED_NONE
predefined link speeds according to CXP specs.
define for default / unused link speed
◆ LINK_SPEED_10000
#define LINK_SPEED_10000 10000 |
define for link speed 10 Gbps
◆ LINK_SPEED_1250
#define LINK_SPEED_1250 1250 |
define for link speed 1.25 Gbps
◆ LINK_SPEED_12500
#define LINK_SPEED_12500 12500 |
define for link speed 12.5 Gbps
◆ LINK_SPEED_2500
#define LINK_SPEED_2500 2500 |
define for link speed 2.5 Gbps
◆ LINK_SPEED_3125
#define LINK_SPEED_3125 3125 |
define for link speed 3.125 Gbps
◆ LINK_SPEED_5000
#define LINK_SPEED_5000 5000 |
define for link speed 5 Gbps
◆ LINK_SPEED_6250
#define LINK_SPEED_6250 6250 |
define for link speed 6.25 Gbps
◆ LINK_SPEED_NONE
#define LINK_SPEED_NONE 0 |
predefined link speeds
define for default / unused link speed
◆ PORTMASK0
predefined port masks
Bit of port mask for frame grabber port 0
◆ PORTMASK1
Bit of port mask for frame grabber port 1
◆ PORTMASK2
Bit of port mask for frame grabber port 2
◆ PORTMASK3
Bit of port mask for frame grabber port 3
◆ PROP_SET_LINK_CONFIG_FREQ_S
#define PROP_SET_LINK_CONFIG_FREQ_S "SET_LINK_CONFIG_FREQ" |
ErrorCodes.
connection properties Link frequency, defined by IDs LINK_SPEED_XXX, additional value: port
◆ PROP_SET_STREAM_PAKET_SIZE_S
#define PROP_SET_STREAM_PAKET_SIZE_S "SET_STREAM_PAKET_SIZE" |
◆ SGC_CP_CAMERA_STATE_FULL_CONNECTED
#define SGC_CP_CAMERA_STATE_FULL_CONNECTED 3 |
camera is full connected (GenICam connection available)
◆ SGC_CP_CAMERA_STATE_INVALID
#define SGC_CP_CAMERA_STATE_INVALID 0 |
camera states for connection profiles
camera handle invalid
◆ SGC_CP_CAMERA_STATE_LINK_ONLY_CONNECTED
#define SGC_CP_CAMERA_STATE_LINK_ONLY_CONNECTED 2 |
camera is only low level connected (no GenICam connection available)
◆ SGC_CP_CAMERA_STATE_NOT_CONNECTED
#define SGC_CP_CAMERA_STATE_NOT_CONNECTED 1 |
◆ SGC_ELCS_CONNECTED
#define SGC_ELCS_CONNECTED 1 |
additional data for event SGC_EVENT_LINK_CONNECTION_STATE_CHANGED
event type "link state is changed to connected
◆ SGC_ELCS_DISCONNECTED
#define SGC_ELCS_DISCONNECTED 2 |
event type "link state is changed to disconnected
◆ SGC_EVENT_BROKEN_FRAME
#define SGC_EVENT_BROKEN_FRAME 403 |
event type "Broken Frame": Event of type "Broken Frame" occurred (Camera Event)
◆ SGC_EVENT_CABLEDIAGNOSTIC_STATUS
#define SGC_EVENT_CABLEDIAGNOSTIC_STATUS 110 |
event type "Cable Diagnostic Status": cable diagnostic status changed (Board Event)
◆ SGC_EVENT_CAMERA_CONNECTION_LOST
#define SGC_EVENT_CAMERA_CONNECTION_LOST 200 |
event type "Camera Connection Lost": the connection to the connected camera has been lost (Camera Event)
◆ SGC_EVENT_CORRUPTED_FRAME
#define SGC_EVENT_CORRUPTED_FRAME 400 |
event type "Corrupted Frame": Event of type "Corrupted Frame" occurred (Camera Event)
◆ SGC_EVENT_DISCOVERY_CHANGE
#define SGC_EVENT_DISCOVERY_CHANGE 100 |
Event types handled by Sgc_RegisterEventCallback, Sgc_registerBoardEventCallback, Sgc_registerCameraEventCallback.
event type "Discovery Change": the camera environment for the board has changed (Board Event)
◆ SGC_EVENT_DISCOVERY_STATE_CAMERA_ADDED
#define SGC_EVENT_DISCOVERY_STATE_CAMERA_ADDED 250 |
◆ SGC_EVENT_DISCOVERY_STATE_CAMERA_LOST
#define SGC_EVENT_DISCOVERY_STATE_CAMERA_LOST 251 |
◆ SGC_EVENT_DISCOVERY_STATE_CAMERA_PROPERTY_CHANGE
#define SGC_EVENT_DISCOVERY_STATE_CAMERA_PROPERTY_CHANGE 252 |
◆ SGC_EVENT_EXTERNAL_FRAME_LOSS
#define SGC_EVENT_EXTERNAL_FRAME_LOSS 401 |
event type "External Frame Loss": Event of type "External Frame Loss" occurred (Camera Event)
◆ SGC_EVENT_GEVEVENT
#define SGC_EVENT_GEVEVENT 300 |
event type "GEV Event": an GigE Vision event occurred (Camera Event)
◆ SGC_EVENT_LINK_CONNECTION_STATE_CHANGED
#define SGC_EVENT_LINK_CONNECTION_STATE_CHANGED 201 |
event type "Camera Connection State Changed": the connection state of the connected camera has changed (Camera Event) This event is Deprecated, use SGC_EVENT_CAMERA_CONNECTION_LOST instead
◆ SGC_EVENT_LOST_FRAME
#define SGC_EVENT_LOST_FRAME 402 |
event type "Lost Frame": Event of type "Lost Frame" occurred (Camera Event)
◆ SGC_EVENT_NUMBER_OF_LINKS_CHANGED
#define SGC_EVENT_NUMBER_OF_LINKS_CHANGED 101 |
event type "Number of links Change": the camera environment for the board has changed (Board Event) This event is Deprecated, use SGC_EVENT_DISCOVERY_CHANGE instead
◆ SGC_EVENT_PHY_IRQ
#define SGC_EVENT_PHY_IRQ 130 |
event type "PHY IRQ": phy interrupt occurred (Board Event)
◆ SGC_EVENT_SGCEVENT
#define SGC_EVENT_SGCEVENT 310 |
event type "SGC Event": a GenICam event occurred (Camera Event)
◆ SGC_EVENT_TEMPERATURE_ALERT
#define SGC_EVENT_TEMPERATURE_ALERT 120 |
event type "Temperature Alert": temperature alert (Board Event)
◆ SGC_FLAGS_NONE
#define SGC_FLAGS_NONE 0x0 |
◆ SGC_FLAGS_STOPONERROR
#define SGC_FLAGS_STOPONERROR 0x1 |
◆ SGC_INIT_FLAG_FORCE_PHY_RESET
#define SGC_INIT_FLAG_FORCE_PHY_RESET 0x01 |
flags for Sgc_initBoardEx
force hard reset of phys
◆ SGC_PLS_CONNECTED
#define SGC_PLS_CONNECTED 1 |
frame grabber is connected to camera on physical layer
◆ SGC_PLS_CONNECTING
#define SGC_PLS_CONNECTING 3 |
frame grabber is connecting to camera on physical layer
◆ SGC_PLS_DISCONNECTED
#define SGC_PLS_DISCONNECTED 2 |
frame grabber is disconnected to camera on physical layer
◆ SGC_PLS_UNDEFINED
#define SGC_PLS_UNDEFINED 0 |
physical link states for frame grabber ports
frame grabber connected to camera is not initialized
◆ SGC_PROPERTY_TYPE_DOUBLE
#define SGC_PROPERTY_TYPE_DOUBLE 0x2 |
◆ SGC_PROPERTY_TYPE_STRING
#define SGC_PROPERTY_TYPE_STRING 0x3 |
◆ SGC_PROPERTY_TYPE_UINT
#define SGC_PROPERTY_TYPE_UINT 0x1 |
possible data types for Sgc_getBoardPropertyWithType and Sgc_getCameraPropertyWithType
property type: UNSIGNED INT
◆ SGC_SP_FLAG_KEEP_PHYCONNECTION
#define SGC_SP_FLAG_KEEP_PHYCONNECTION 0x0001 |
flags for Sgc_ScanPortsEx() function
Skip interaction on physical layer and assume physical layer is setup
◆ SGC_SP_FLAG_RESET_DISCOVERY_INFOS
#define SGC_SP_FLAG_RESET_DISCOVERY_INFOS 0x0040 |
reset discovery infos and trigger complete rescan
◆ SGC_SP_FLAG_SKIP_AUTO_PORTADJUSTMENT
#define SGC_SP_FLAG_SKIP_AUTO_PORTADJUSTMENT 0x0002 |
do not adjust adjust port ordering and keep 1:1 connection
◆ SGC_SP_FLAG_SKIP_DEVICE_CONFIGURATION
#define SGC_SP_FLAG_SKIP_DEVICE_CONFIGURATION 0x0004 |
skip adjustment of camera device configuration and keep current camera state
◆ SGC_SP_FLAG_SKIP_MULTIFRAMEGRABBERSYNC
#define SGC_SP_FLAG_SKIP_MULTIFRAMEGRABBERSYNC 0x0008 |
skips waiting for master frame grabber on a slave frame grabber system
◆ SGC_SP_FLAG_UPDATE_DISCOVERY_INFOS_ONLY
#define SGC_SP_FLAG_UPDATE_DISCOVERY_INFOS_ONLY 0x0020 |
update the discovery infos only
◆ SGC_SP_FLAG_USE_CAMERA_DEFAULT_SPEED
#define SGC_SP_FLAG_USE_CAMERA_DEFAULT_SPEED 0x0010 |
try to connect to camera at the default speed of the camera
◆ SISO_INTERNAL_FUNCTION__ENABLE_LOGGING
#define SISO_INTERNAL_FUNCTION__ENABLE_LOGGING 2 |
◆ SISO_INTERNAL_FUNCTION__ENABLE_PROFILING
#define SISO_INTERNAL_FUNCTION__ENABLE_PROFILING 3 |
◆ SISO_INTERNAL_FUNCTION__RESET_PHY
#define SISO_INTERNAL_FUNCTION__RESET_PHY 1 |
Id for Basler Internal Function 'Reset PHY'
◆ Sgc_BoardEventCallbackFunc_t
prototype of board event callback procedure
reserved for later usage
- Parameters
-
boardHandle | board handle, at which the event occurred |
eventInfo | event details/data |
userData | additional payload passed from user at registration of event handler |
◆ Sgc_CameraEventCallbackFunc_t
prototype of camera event callback procedure
reserved for later usage
- Parameters
-
cameraHandle | camera handle, at which the event occurred |
eventInfo | event details/data |
userData | additional payload passed from user at registration of event handler |
◆ SgcBoardHandle
handle structure for boards
◆ SgcCameraHandle
handle structure for cameras
◆ SgcCameraInfo
typedef struct SgcCameraInfo SgcCameraInfo |
structure for camera information
◆ SgcConnectionProfile
typedef struct SgcConnectionProfile SgcConnectionProfile |
data structure representing the state of a loaded connection profile
◆ SgcEventCallback_t
prototype of event callback procedure
reserved for later usage
- Parameters
-
boardHandle | board handle, at which the event occurred |
cameraHandle | camera handle, at which the event occurred |
eventInfo | event details/data |
userData | additional payload passed from user at registration of event handler |
◆ SgcEventInfo
typedef struct SgcEventInfo SgcEventInfo |
data structure for events received from the board callback functions
◆ SgcPowerStatus
power status values
Enumerator |
---|
SgcPowerStatusDisabled | |
SgcPowerStatusInitializing | |
SgcPowerStatusNoCable | |
SgcPowerStatusOff | |
SgcPowerStatusOn | |
SgcPowerStatusErrorLowCurrent | |
SgcPowerStatusErrorHighCurrent | |
SgcPowerStatusErrorLowVoltage | |
SgcPowerStatusErrorHighVoltage | |
SgcPowerStatusErrorAdcFault | |
SgcPowerStatusErrorInvalidValue | |
◆ DEPRECATED() [1/11]
◆ DEPRECATED() [2/11]
◆ DEPRECATED() [3/11]
int DEPRECATED |
( |
Sgc_DirectRegisterRead(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, uint32_t *data) | | ) |
|
◆ DEPRECATED() [4/11]
int DEPRECATED |
( |
Sgc_DirectRegisterReadMem(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, unsigned char *data, uint32_t *buflen) | | ) |
|
◆ DEPRECATED() [5/11]
int DEPRECATED |
( |
Sgc_DirectRegisterReadMemWithTimeOut(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, unsigned char *data, uint32_t *buflen, uint32_t timeoutInMilliseconds) | | ) |
|
◆ DEPRECATED() [6/11]
int DEPRECATED |
( |
Sgc_DirectRegisterWrite(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, const uint32_t data, const unsigned int switchByteOrder) | | ) |
|
◆ DEPRECATED() [7/11]
int DEPRECATED |
( |
Sgc_DirectRegisterWriteMem(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, const unsigned char *data, const uint32_t buflen) | | ) |
|
◆ DEPRECATED() [8/11]
int DEPRECATED |
( |
Sgc_DirectRegisterWriteMemWithTimeOut(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, const unsigned char *data, const uint32_t buflen, uint32_t timeoutInMilliseconds) | | ) |
|
◆ DEPRECATED() [9/11]
int DEPRECATED |
( |
Sgc_LoadBoardConfiguration(SgcBoardHandle *board_handle, const char *configFileName) | | ) |
|
load connection parameters from a file
This function can be used to load the current connection parameters for all links/cameras from the hard disk in order to create camera connections. It can be used as an alternative approach for setting up a connection instead of the camera discovery. The predefined connection parameters will be used and the connection can be established afterwards by using exactly these parameters. In case of an error condition the calls to established will fail, which can can be evaluated by the software.
- Parameters
-
board_handle | a handle to the according board |
configFileName | filename |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG: invalid out parameter ERR_SGC_INVALIDFILENAME: file not found ERR_SGC_INVALID_DATA: the data inside the file is invalid |
- See also
- Sgc_CxpConnect, Sgc_ScanPorts, Sgc_SetCameraProperty
◆ DEPRECATED() [10/11]
Register an callback procedure for event notifications.
- Parameters
-
boardHandle | a handle for accessing the board |
eventHandler | structure containing the callback function |
userData | additional data, that gets passed at each callback |
- Return values
-
0:in | case of success, <> 0: error code (defined in XXX_error.h) |
- See also
- Sgc_getErrorDescription,
◆ DEPRECATED() [11/11]
int DEPRECATED |
( |
Sgc_SaveBoardConfiguration(SgcBoardHandle *board_handle, const char *configFileName) | | ) |
|
save connection parameters of the board to a file
This function can be used to store the current camera connection parameters for all links/cameras to the hard disk. All Connection data like number of links, ordering of the links, link speed and assignment to then applet interface is exported and can be reloaded afterwards. It can be used e.g. after an automatic discovery or a manual setup of link configuration had taken place. The function can be used in combination with Sgc_LoadBoardConfiguration(), which reloads the parameters, that had been saved by using this method.
- Parameters
-
board_handle | a handle to the according board |
configFileName | filename |
- Return values
-
0 | success, ERR_SGC_NO_DATA : currently no link configuration present (e.g. if no camera is found) ERR_SGC_FILEACCESS: file access failure when saving to hard disk ERR_SGC_INVALID_DATA: current link configuration is invalid |
- See also
- Sgc_LoadBoardConfiguration, Sgc_CxpConnect, Sgc_ScanPorts, Sgc_SetCameraProperty
◆ Sgc_callInternalFunction()
int Sgc_callInternalFunction |
( |
int | id, |
|
|
const void *const | in, |
|
|
void *const | out ) |
◆ Sgc_clearStringCache()
◆ Sgc_connectCamera()
Connect to camera by downloading the cameras internal GenICam XML file A call of this function is necessary in order to control the camera by using GenICam features e.g. "Width", Height" etc. and starting / stopping the camera acquisition as well. The functions loads the GenICam form camera and creates a GenICam node map internally for use by calls to Sgc_SetXXXValue, Sgc_getXXXValues. Alternatively the function Sgc_connectCameraWithExternalXml might be called, if no GenICam is available at the camera.
- Return values
-
0 | success, ERR_SGC_NOT_CONNECTED : no physical connection established ERR_SGC_UNEXPECTED: URL is not valid, no GenICam present, error inside XML data ERR_SGC_INVALID_CAMHANDLE: camera handle is not valid |
- See also
- Sgc_connectCameraWithExternalXml
◆ Sgc_connectCameraWithExternalXml()
int Sgc_connectCameraWithExternalXml |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | filename ) |
Connect to Camera by using a certain GenICam XML File from the hard disk.
- Parameters
-
cameraHandle | Camera handle retrieved by calling |
filename | filename of the GenICam XML file for the camera |
- Return values
-
0 | success ERR_SGC_FILENOTFOUND file cannot be opened for reading ERR_SGC_INVALIDFILENAME invalid filename, e.g. empty string |
- See also
- Sgc_connectCamera
◆ Sgc_DirectRegisterRead64()
int Sgc_DirectRegisterRead64 |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | port, |
|
|
const uint64_t | address, |
|
|
uint32_t * | data ) |
reads an integer value to the camera
This function can be used in order to read an integer value from a camera register directly
- Parameters
-
boardHandle | a handle to the according board |
port | port identifier |
address | camera register address |
data | data to be written |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
◆ Sgc_DirectRegisterReadMem64()
int Sgc_DirectRegisterReadMem64 |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | port, |
|
|
const uint64_t | address, |
|
|
unsigned char * | data, |
|
|
uint32_t * | buflen ) |
write a block of data to the camera
This function can be used in order to write an block of data to a camera register directly All data according to the parameter buflen is written to the camera
- Parameters
-
boardHandle | a handle to the according board |
port | port identifier |
address | camera register address |
data | data read from the camera |
buflen | length of the output buffer in bytes, after reading containing the number of bytes read |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
◆ Sgc_DirectRegisterReadMemWithTimeOut64()
int Sgc_DirectRegisterReadMemWithTimeOut64 |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | port, |
|
|
const uint64_t | address, |
|
|
unsigned char * | data, |
|
|
uint32_t * | buflen, |
|
|
uint32_t | timeoutInMilliseconds ) |
write a block of data to the camera
This function can be used in order to write an block of data to a camera register directly All data according to the parameter buflen is written to the camera
- Parameters
-
boardHandle | a handle to the according board |
port | port identifier |
address | camera register address |
data | data read from the camera |
buflen | length of the output buffer in bytes, after reading containing the number of bytes read |
timeoutInMilliseconds | timeout in ms. 0 indicates infinite |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
◆ Sgc_DirectRegisterWrite64()
int Sgc_DirectRegisterWrite64 |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | port, |
|
|
const uint64_t | address, |
|
|
const uint32_t | data, |
|
|
const unsigned int | switchByteOrder ) |
write a block of data to the camera
This function can be used in order to write an block of data to a camera register directly All data according to the parameter buflen is written to the camera
- Parameters
-
boardHandle | a handle to the according board |
port | port identifier |
address | camera register address |
data | data read from the camera |
switchByteOrder | switches the byte order of data before writing (endianess) |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
◆ Sgc_DirectRegisterWriteMem64()
int Sgc_DirectRegisterWriteMem64 |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | port, |
|
|
const uint64_t | address, |
|
|
const unsigned char * | data, |
|
|
const uint32_t | buflen ) |
write a block of data to the camera
This function can be used in order to write an block of data to a camera register directly All data according to the parameter buflen is written to the camera
- Parameters
-
boardHandle | a handle to the according board |
port | port identifier |
address | camera register address |
data | data to be written |
buflen | length of the input buffer |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG: invalid out parameter |
◆ Sgc_DirectRegisterWriteMemWithTimeOut64()
int Sgc_DirectRegisterWriteMemWithTimeOut64 |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | port, |
|
|
const uint64_t | address, |
|
|
const unsigned char * | data, |
|
|
const uint32_t | buflen, |
|
|
uint32_t | timeoutInMilliseconds ) |
write a block of data to the camera
This function can be used in order to write an block of data to a camera register directly All data according to the parameter buflen is written to the camera. A timeout can be set in order to take care of the cameras's processing time.
- Parameters
-
boardHandle | a handle to the according board |
port | port identifier |
address | camera register address |
data | data to be written |
buflen | length of the input buffer |
timeoutInMilliseconds | timeout in ms. 0 indicates infinite |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG: invalid out parameter |
◆ Sgc_disconnectCamera()
Disconnect from camera.
- Parameters
-
cameraHandle | Camera handle retrieved by calling |
◆ Sgc_executeCommand()
int Sgc_executeCommand |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName ) |
Execute a certain GenICam command at the camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) ERR_SGC_INVALID_COMMAND command name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_freeBoard()
Release resources allocated by Sgc_initBoard.
- Parameters
-
boardHandle | Interface object to be released. Retrieved by Sgc_initBoard |
- See also
- Sgc_initBoard
◆ Sgc_getBoardPropertyWithType()
int Sgc_getBoardPropertyWithType |
( |
SgcBoardHandle * | boardHandle, |
|
|
const char * | propertyName, |
|
|
const void * | value, |
|
|
unsigned int | propertyType, |
|
|
const void * | additionalValue ) |
get a global board property
This generic function allows to get any board property, which is currently active. The property itself is identified by a null terminated string value according to the defined values. The data type of this variable depends on the property itself and might be any standard C data type like integer, double, char[], etc. To allow a check inside the function, the used data type has to be passed at the parameter property type. Constants for definition of the data type passed at the propertyValue parameter can be seen at the SGC_PROPERTY_TYPE_XXX definitions. Some properties need additional addressing. In such cases the data has to be passed at the value parameter. In most cases, this pointer might be set to NULL.
- Parameters
-
boardHandle | a handle to the according board |
propertyName | property identifier, see PROP_XXX |
value | pointer to a buffer for returning the data |
propertyType | data type of the variable passed at the propertyValuePtr parameter |
additionalValue | additional value for addressing a property, might be NULL |
- Return values
-
0 | in case of success, error code (defined in ERR_SGC_XXX) |
- See also
- Sgc_getErrorDescription, Sgc_setBoardPropertyWithType
◆ Sgc_getBooleanValue()
int Sgc_getBooleanValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
unsigned int * | valuePtr ) |
Read GenICam boolean value at camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
valuePtr | buffer for value to be read ( 1 : true, 0: false) |
- Return values
-
0 | in case of success, <> 0: error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_getCamera()
get a camera object associated to a certain frame grabber port
- Parameters
-
boardHandle | handle to frame grabber generated by Sgc_initBoard() |
port | port index (frame grabber port index) |
cameraHandle | return value of allocated interface resources, needs to be initialized by NULL pointer |
- Return values
-
0 | success, <> 0 see ERR_SGC_XXX constants |
- See also
- Sgc_initBoard
◆ Sgc_getCameraByIndex()
get a handle of the currently detected cameras
This function can be used for iterations or loops to obtain the currently present camera objects. The range of the index is between 0 and Sgc_getNrOfCameras()-1. It returns both: discovered/connected camera handles or unconnected camera handles, which are created by Sgc_GetCamera(port) and might wait for connection.
The camera handle will be returned in the cameraHandle parameter.
- Parameters
-
boardHandle | a handle to the according board |
cameraHandle | return value as CameraHandle that can be used for further camera access NULL in case of an error |
index | index between 0 and Sgc_getCameraCount()-1 |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
- See also
- Sgc_getCameraCount, Sgc_getErrorDescription
◆ Sgc_getCameraCount()
get number of the currently detected cameras
This function can be used for iterations or loops to obtain the currently present camera objects. It returns both: number of discovered/connected camera handles or unconnected camera handles, which are created by Sgc_GetCamera(port) and might wait for connection.
- Parameters
-
boardHandle | a handle to the according board |
- Return values
-
>= | 0: number of cameras ( # of camera handles) <> 0 error code (defined in ERR_SGC_XXX) |
- See also
- Sgc_getErrorDescription
◆ Sgc_getCameraInfo()
get manufacturer information from connected camera.
This function returns camera specific information from a camera connected to the frame grabber. In general this information is read from technology specific bootstrap registers. The data is returned in form of the SgcCameraInfo structure.
- Parameters
-
- Return values
-
camera | information obtained from bootstrap registers |
◆ Sgc_getCameraPropertyWithType()
int Sgc_getCameraPropertyWithType |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | propertyName, |
|
|
void * | value, |
|
|
unsigned int * | propertyType, |
|
|
void * | additionalValue ) |
get camera specific properties
This generic function allows to get various camera properties like current link speed, current stream packet size, state of connection etc. The available properties are defined at the CAM_PROP_XXX constants. Due to the variety of these parameters, the generic functions uses a void pointer to give access to any of these. The type of data (pointer to integer, pointer to double etc.) have to be passed at the property type parameter in order to allow a minimum check for data security. The available types are listed at the SGC_PROPERTY_TYPE_XXX constants. Some parameter need additional information to address the value correctly. In such cases, the pointer named value has to be used.
- Parameters
-
cameraHandle | camera handle instance |
propertyName | string containing the name of property to be accessed, see CAM_PROP_XXX constants |
value | pointer to data structure, where the result value should be used. Needs to be large enough to carry the data completely. For valid values see CAM_PROP_XXX constants |
propertyType | type of data given at parameter propertyValuePtr (in / out parameter) see SGC_PROPERTY_TYPE_XXX constants |
additionalValue | additional parameter to address the the property (multi-purpose) |
- Return values
-
0 | success ERR_SGC_INVALID_ARG : a needed data structure was not initialized ERR_SGC_INVALID_PROPERTY: tried to access an invalid property |
◆ Sgc_getEnumerationValue()
int Sgc_getEnumerationValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
int64_t * | value ) |
Read GenICam integer representation of enumeration value from camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
value | buffer for value to be read (value returned as number) |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_getEnumerationValueAsString()
int Sgc_getEnumerationValueAsString |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
const char ** | valuePtr ) |
Read GenICam string representation of enumeration value from camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
valuePtr | return value |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_getErrorDescription()
const char * Sgc_getErrorDescription |
( |
const int | errorCode | ) |
|
returns a descriptive text for the error code
This function returns a descriptive text for an error code returned from a previous call to a Sgc_XXX function.
- Parameters
-
errorCode | error code to be decoded. |
- Return values
-
pointer | to a null terminated string containing the according error code |
◆ Sgc_getFloatValue()
int Sgc_getFloatValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
double * | valuePtr ) |
Read GenICam floating point value at camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
valuePtr | buffer for value to be read |
- Return values
-
0 | in case of success, <> 0: error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_getFloatValueLimits()
int Sgc_getFloatValueLimits |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
double * | min_valuePtr, |
|
|
double * | max_valuePtr, |
|
|
double * | step_valuePtr ) |
Read GenICam Float value limits and increment.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
min_valuePtr | buffer for minimum value to be read |
max_valuePtr | buffer for maximum value to be read |
step_valuePtr | buffer for step size value to be read |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription,
◆ Sgc_getGenICamXML()
int Sgc_getGenICamXML |
( |
SgcCameraHandle * | cameraHandle, |
|
|
char * | buffer, |
|
|
size_t * | bufferSize ) |
returns the currently loaded GenICam-XML
- Parameters
-
cameraHandle | camera handle instance |
buffer | the buffer, where to copy the data, if NULL, the required buffer size is returned |
bufferSize | the fill level or required buffer size of the buffer |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_getIntegerValue()
int Sgc_getIntegerValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
int64_t * | valuePtr ) |
Read GenICam Integer value from camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
valuePtr | buffer for value to be read |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription,
◆ Sgc_getIntegerValueLimits()
int Sgc_getIntegerValueLimits |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
int64_t * | min_valuePtr, |
|
|
int64_t * | max_valuePtr, |
|
|
int64_t * | step_valuePtr ) |
Read GenICam Integer value from camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
min_valuePtr | buffer for minimum value to be read |
max_valuePtr | buffer for maximum value to be read |
step_valuePtr | buffer for step size value to be read |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription,
◆ Sgc_getStringValue()
int Sgc_getStringValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
const char ** | valuePtr ) |
Read GenICam string value from camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
valuePtr | return value |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_initBoard()
Create an Interface object for accessing cameras connected to a frame grabber.
This function has to be called first, before any access to cameras can be done. By using the retrieved handle, a camera detection, connections to certain cameras or an iteration over present cameras can be performed.
The allocated resources have to be released by using the Sgc_freeBoard function.
- Parameters
-
fg | frame grabber handle retrieved by FGLIB::fg_init(<APPLETNAME>) |
initFlag | reserved for later usage |
boardHandle | return value of allocated interface resources, needs to be initialized by NULL pointer |
- Return values
-
0 | success, <> 0 see ERR_SGC_XXX constants |
- See also
- Sgc_freeBoard, Sgc_getErrorDescription
◆ Sgc_initBoardEx()
int Sgc_initBoardEx |
( |
Fg_Struct * | fg, |
|
|
unsigned int | initFlag, |
|
|
SgcBoardHandle ** | boardHandle, |
|
|
unsigned int | portMask, |
|
|
unsigned int | slaveMode ) |
Create an Interface object for accessing cameras connected to a frame grabber.
This function has to be called first, before any access to cameras can be done. By using the retrieved handle, a camera detection, connections to certain cameras or an iteration over present cameras can be performed.
The allocated resources have to be released by using the Sgc_freeBoard function.
- Parameters
-
fg | frame grabber handle retrieved by FGLIB::fg_init(<APPLETNAME>) |
initFlag | reserved for later usage |
boardHandle | return value of allocated interface resources, needs to be initialized by NULL pointer |
portMask | bit mask, to enable specific frame grabber ports, that shall be used. Default value is 0xFFFF (all ports) |
slaveMode | currently not used |
- Return values
-
0 | success, <> 0 see ERR_SGC_XXX constants |
- See also
- Sgc_freeBoard, Sgc_getErrorDescription
◆ Sgc_isCameraAvailable()
unsigned int Sgc_isCameraAvailable |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | port ) |
Check for camera.
- Parameters
-
boardHandle | Interface object to be released. Retrieved by Sgc_initBoard |
port | port to check |
- Return values
-
true | a camera is present at the given port, otherwise false |
◆ Sgc_isCameraAvailableAtIndex()
unsigned int Sgc_isCameraAvailableAtIndex |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | index ) |
Check for camera.
- Parameters
-
boardHandle | Interface object to be released. Retrieved by Sgc_initBoard |
index | port index to check |
- Return values
-
true | a camera is present at the given port, otherwise false |
◆ Sgc_isCommandDone()
int Sgc_isCommandDone |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
unsigned int * | valuePtr ) |
Check, if a GenICam command is performed completely.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
valuePtr | returned data read from the camera by using GenICam |
- Return values
-
0 | command is currently in process, 1:command is currently in not process ERR_SGC_INVALID_COMMAND command name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_LinkConnect()
connects a camera handle a GenICam capable camera
This function can be used when presetting the link connection parameters manually. It configures the frame grabber port(s) associated to the camera handle at the predefined link speeds, and handles the protocol commands needed for creating a connection. It might be used as an alternative to the camera detection by using the discovery procedures (sgc_ScanPorts()).
- Parameters
-
boardHandle | a handle to the according board |
cameraHandle | camera handle containing the necessary information for creating the connection |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
- See also
- Sgc_ScanPorts, Sgc_SetCameraProperty, Sgc_LoadBoardConfiguration, Sgc_LinkDisconnect
◆ Sgc_LinkDisconnect()
disconnects a camera handle from a GenICam capable camera
- Parameters
-
cameraHandle | camera handle containing the necessary information for creating the connection |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
- See also
- Sgc_LinkConnect
◆ Sgc_LoadCameraParameters()
int Sgc_LoadCameraParameters |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | paramFileName, |
|
|
uint32_t | flags ) |
load the current camera parameters from a file
This function can be used to load values of camera registers from a file. Parameters are loaded and carried over to the camera according to the camera's GenICam register description.
- Parameters
-
cameraHandle | a handle to the according camera |
paramFileName | filename |
flags | specific flags see : |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
- See also
- Sgc_SaveCameraParameters, Sgc_connectCamera,
◆ Sgc_loadCameraXml()
Downloading the cameras internal GenICam XML file. A call of this function with a connectToGenAPI set to true is necessary in order to control the camera by using GenICam features e.g. "Width", Height" etc. and starting / stopping the camera acquisition as well. The functions loads the GenICam form camera and optionally creates a GenICam node map internally for use by calls to Sgc_SetXXXValue, Sgc_getXXXValues. Alternatively the function Sgc_connectCameraWithExternalXml might be called, if no GenICam is available at the camera.
- Return values
-
0 | success, ERR_SGC_NOT_CONNECTED : no physical connection established ERR_SGC_UNEXPECTED: URL is not valid, no GenICam present, error inside XML data ERR_SGC_INVALID_CAMHANDLE: camera handle is not valid |
- See also
- Sgc_connectCamera, Sgc_connectCameraWithExternalXml
◆ Sgc_LoadConnectionProfile()
load a connection profile
This function initializes the board, loads the board configuration file and establishes connections to the cameras. The result of these operations is represented by the returned connection profile structure.
The allocated resources have to be released by using the Sgc_UnloadConnectionProfile function.
- Parameters
-
fg | frame grabber handle retrieved by FGLIB::fg_init(<APPLETNAME>) |
boardConfigurationFilePath | path to th board configuration file |
connectionProfilePtr | pointer address for the allocated connection profile structure |
- Return values
-
0 | success, <> 0 see ERR_SGC_XXX constants |
- See also
- Sgc_UnloadConnectionProfile
◆ Sgc_memoryReadFromCamera()
int Sgc_memoryReadFromCamera |
( |
SgcCameraHandle * | cameraHandle, |
|
|
void * | buffer, |
|
|
uint64_t | address, |
|
|
size_t | length ) |
◆ Sgc_memoryReadFromCameraWithTimeout()
int Sgc_memoryReadFromCameraWithTimeout |
( |
SgcCameraHandle * | cameraHandle, |
|
|
void * | buffer, |
|
|
uint64_t | address, |
|
|
size_t | length, |
|
|
uint32_t | timeoutInMilliseconds ) |
read a number of bytes from a camera register
The data will be copied to the buffer given at the buffer parameter. This buffer needs to be large enough to store the whole string. The number of bytes to be read have to be passed at the length parameter. The string is not necessarily 0 terminated.
This function can be used for a direct access to a camera by bypassing the GenICam XML implementation and register name translations. It might be used, if the register address of the connected camera is known exactly.
- Parameters
-
cameraHandle | camera handle instance |
address | address of the camera register (example 0x00002070 "Device version") |
buffer | pointer to a buffer for the return value |
length | number of bytes to be read |
timeoutInMilliseconds | timeout for camera response and data transfer. if set to 0 the timeout is disabled |
- Return values
-
0 | success, ERR_SGC_BUFFER_TOO_SMALL: Buffer too small |
◆ Sgc_memoryWriteToCamera()
int Sgc_memoryWriteToCamera |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const void * | buffer, |
|
|
uint64_t | address, |
|
|
size_t | length ) |
◆ Sgc_memoryWriteToCameraWithTimeout()
int Sgc_memoryWriteToCameraWithTimeout |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const void * | buffer, |
|
|
uint64_t | address, |
|
|
size_t | length, |
|
|
uint32_t | timeoutInMilliseconds ) |
write a number of bytes to a camera register
The content of the buffer data will be written to the specified camera register. This function can be used for a direct access to a camera register by bypassing the GenICam XML implementation and register name translations. It might be used, if the register address of the connected camera is known exactly.
- Parameters
-
cameraHandle | camera handle instance |
address | address of the camera register (example 0x00002070 "Device version") |
buffer | pointer to a buffer for the return value |
length | number of bytes to be read |
timeoutInMilliseconds | timeout for camera response and data transfer. if set to 0 the timeout is disbled |
- Return values
-
0 | success, ERR_SGC_BUFFER_TOO_SMALL: Buffer too small |
◆ Sgc_powerSwitch()
int Sgc_powerSwitch |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | portMask ) |
switch on Power over CoaxPress/CameraLink/...
This function switches the power supply of the given frame grabber ports off and on again in order to perform a reset of the camera. This function is only effectful, if the connected camera does not use an external power supply.
Important note: after switching the power on at a certain port, the cameras will boot up. The booting of a camera takes some time, until an access to the camera is possible. This dead time varies between different camera / camera types. Please refer to the camera manufacturer's specification in order to get the information how long the client has to wait after power on.
- Parameters
-
boardHandle | Interface object to be released. Retrieved by Sgc_initBoard |
portMask | bit mask containing the frame grabber ports to access |
◆ Sgc_powerSwitchExt()
int Sgc_powerSwitchExt |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | portMask, |
|
|
const unsigned int | command ) |
switch on Power over CoaxPress
This function allows to change the state of power supply at a certain frame grabber port.
Important note: after switching the power on at a certain port, the cameras will boot up. The booting of a camera takes some time, until an access to the camera is possible. This dead time varies between different camera / camera types. Please refer to the camera manufacturer's specification in order to get the information how long the client has to wait after power on.
- Parameters
-
boardHandle | Interface object to be released. Retrieved by Sgc_initBoard |
portMask | bit mask containing the frame grabber ports to access |
command | command, how to switch power. values: 0 power off, 1: power on, 2: tear down power for a certain duration |
◆ Sgc_registerBoardEventCallback()
Register an callback procedure for board event notifications.
- Parameters
-
board_handle | a handle for accessing the board |
eventHandler | structure containing the callback function |
userData | additional data, that gets passed at each callback |
- Return values
-
0:in | case of success, <> 0: error code (defined in XXX_error.h) |
- See also
- Sgc_getErrorDescription,
◆ Sgc_registerCameraEventCallback()
Register an callback procedure for camera event notifications.
- Parameters
-
camera_handle | a handle for accessing the camera |
eventHandler | structure containing the callback function |
userData | additional data, that gets passed at each callback |
- Return values
-
0:in | case of success, <> 0: error code (defined in XXX_error.h) |
- See also
- Sgc_getErrorDescription,
◆ Sgc_registerReadFromCamera()
int Sgc_registerReadFromCamera |
( |
SgcCameraHandle * | cameraHandle, |
|
|
uint32_t * | data, |
|
|
uint64_t | address ) |
read a 32 bit integer value from a camera register
This function can be used for a direct access to a camera without by bypassing the GenICam XML implementation and register name translations. It might be used, if the register address of the connected camera is known exactly. The byte order gets converted into little endian.
- Parameters
-
cameraHandle | camera handle instance |
address | address of the camera register (example 0x00002070 "Device version") |
data | pointer to a buffer for the return value |
- Return values
-
0 | success ERR_SGC_INVALID_ARG : the pointer to return value is not set ERR_SGC_INVALID_CAMHANDLE : the camera handle is not valid |
◆ Sgc_registerWriteToCamera()
int Sgc_registerWriteToCamera |
( |
SgcCameraHandle * | cameraHandle, |
|
|
uint32_t | data, |
|
|
uint64_t | address ) |
write a 32 bit integer value to a camera register
This function can be used for a direct access to a camera without by bypassing the GenICam XML implementation and register name translations. It might be used, if the register address of the connected camera is known exactly. Data is assumed to be little in little endian byte order
- Parameters
-
cameraHandle | camera handle instance |
address | address of the camera register (example 0x00002070 "Device version") |
data | value to write |
- Return values
-
0 | success ERR_SGC_INVALID_CAMHANDLE : the camera handle is not valid |
◆ Sgc_RestoreLowLevelLinkProfile()
int Sgc_RestoreLowLevelLinkProfile |
( |
SgcBoardHandle * | boardHandle, |
|
|
const char * | file ) |
restore low level link profile from file to board
This function applies a stored low level link profile from file to a (monitoring) board. This is only needed in a controlling/monitoring scenario. You will need a device, which is able to duplicate the data traffic between camera and board. Currently only CXP is supported.
Note: Every discovery cycle on this board or change in speed settings of the connected remote device reverts the link profile, so it must be restored again!
- Parameters
-
boardHandle | a handle to the according board |
file | filename |
- Return values
-
0 | success, <> 0 see ERR_SGC_XXX constants |
- See also
- Sgc_StoreLowLevelLinkProfile
◆ Sgc_SaveCameraParameters()
int Sgc_SaveCameraParameters |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | paramFileName, |
|
|
uint32_t | flags ) |
save the current camera parameters to a file
This function can be used to save the values of all camera registers based on the camera's GenICam interface to a file. Purpose of this method is the possibility of exporting and reloading the current state of parametrization of the camera.
- Parameters
-
cameraHandle | a handle to the according camera |
paramFileName | filename, where to save the data |
flags | specific flags see : |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid out parameter |
- See also
- Sgc_LoadCameraParameters, Sgc_connectCamera
◆ Sgc_scanPorts()
int Sgc_scanPorts |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | portMask, |
|
|
const int | discoveryTimeout, |
|
|
const int | speed ) |
Scans the defined ports of the frame grabber for present cameras.
This functions scans the frame grabber ports for present cameras (camera discovery). All defined ports will be checked, if cameras are present. The link discovery procedure will be initiated and possible link aggregations will be detected and established, according to the underlaying interfaces (in this case: CoaxPress). The detected link topology and recommended link speed according to the rules of discovery can be queried later by using the camera handles. Therefor the number of cameras and associated camera handles can be retrieved to get further connection details.
- Parameters
-
boardHandle | Interface object to be released. Retrieved by Sgc_initBoard |
portMask | bit mask representing the physical frame grabber ports to be scanned; currently, only a full scan is supported |
discoveryTimeout | timeout in milliseconds, |
speed | preferred link speed, set to 0 in case of automatic detection at highest speed. |
- Return values
-
0 | in case of success, elsewise: error codes ERR_SGC_TOPOLOGY_MISMATCH, ERR_SGC_WAITFORLINK_TIMEOUT, |
- See also
- Sgc_getCamera, Sgc_getCameraCount, Sgc_getErrorDescription
◆ Sgc_scanPortsEx()
int Sgc_scanPortsEx |
( |
SgcBoardHandle * | boardHandle, |
|
|
const unsigned int | portMask, |
|
|
const int | discoveryTimeout, |
|
|
const int | speed, |
|
|
const unsigned int | flags ) |
Scans the defined ports of the frame grabber for present cameras.
This functions scans the frame grabber ports for present cameras (camera discovery). All defined ports will be checked, if cameras are present. The link discovery procedure will be initiated and possible link aggregations will be detected and established, according to the underlaying interfaces (in this case: CoaxPress). The detected link topology and recommended link speed according to the rules of discovery can be queried later by using the camera handles. Therefor the number of cameras and associated camera handles can be retrieved to get further connection details.
- Parameters
-
boardHandle | Interface object to be released. Retrieved by Sgc_initBoard |
portMask | bit mask representing the physical frame grabber ports to be scanned; currently, only a full scan is supported |
discoveryTimeout | timeout in milliseconds, |
speed | preferred link speed, set to 0 in case of automatic detection at highest speed. |
flags | Bit mask representing specific options, see SGC_SP_FLAG_XXXX |
- Return values
-
0 | in case of success, elsewise: error codes ERR_SGC_TOPOLOGY_MISMATCH, ERR_SGC_WAITFORLINK_TIMEOUT, |
- See also
- Sgc_getCamera, Sgc_getCameraCount, Sgc_getErrorDescription
◆ Sgc_setBoardPropertyWithType()
int Sgc_setBoardPropertyWithType |
( |
SgcBoardHandle * | boardHandle, |
|
|
const char * | propertyName, |
|
|
const void * | propertyValuePtr, |
|
|
unsigned int | propertyType, |
|
|
void * | additionalValue ) |
set global board properties
This generic function allows to set any board property. The property itself is identified by a null terminated string value according to the defined values. The value has to be saved in variables inside the client and a pointer to this variable has to be passed to this function (parameter propertyValuePtr). The data type of this variable depends on the property itself and might be any standard C data type like integer, double, char[], etc. To allow a check inside the function, the used data type has to be passed at the parameter property type. Constants for definition of the data type passed at the propertyValue parameter can be seen at the SGC_PROPERTY_TYPE_XXX definitions. Some properties need additional addressing. In such cases the data has to be passed at the value parameter. In most cases, this pointer might be set to NULL.
- Parameters
-
boardHandle | a handle to the according board |
propertyName | property identifier, see PROP_XXX |
propertyValuePtr | pointer to data structure containing the data to be set e.g. |
propertyType | data type of the variable passed at the propertyValuePtr parameter |
additionalValue | additional value for addressing a property, might be NULL |
- Return values
-
0 | in case of success, error code (defined in ERR_SGC_XXX) |
- See also
- Sgc_getErrorDescription, Sgc_getBoardPropertyWithType
◆ Sgc_setBooleanValue()
int Sgc_setBooleanValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
unsigned int | value ) |
Set GenICam boolean value at camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
value | value to write ( 1 : true, 0: false) |
- Return values
-
0 | in case of success, <> 0: error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_setCameraPropertyWithType()
int Sgc_setCameraPropertyWithType |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | propertyName, |
|
|
const void * | value, |
|
|
unsigned int | propertyType, |
|
|
void * | additionalValue ) |
set camera or camera connection specific properties
This generic function allows to get various camera properties like current link speed, current stream packet size, state of connection etc. The available properties are defined at the CAM_PROP_XXX constants. Due to the variety of these parameters, the generic functions uses a void pointer to give access to any of these. The type of data (pointer to integer, pointer to double etc.) have to be passed at the property type parameter in order to allow a minimum check for data security. The available types are listed at the SGC_PROPERTY_TYPE_XXX constants. Some parameter need additional information to address the value correctly. In such cases, the pointer named value has to be used.
- Parameters
-
cameraHandle | camera handle instance |
propertyName | string containing the name of property to be accessed. For valid values see CAM_PROP_XXX constants |
value | pointer to data structure, where the result value should be used. Needs to be large enough to carry the data completely. |
propertyType | type of data given at parameter propertyValuePtr see SGC_PROPERTY_TYPE_XXX constants |
additionalValue | additional parameter to address the the property (multi-purpose) |
- Return values
-
0 | success ERR_SGC_INVALID_ARG : a needed data structure was not initialized or a data is not accepted ERR_SGC_INVALID_PROPERTY: tried to access an invalid property |
◆ Sgc_setEnumerationValue()
int Sgc_setEnumerationValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
const char * | value ) |
Set GenICam enumeration value at camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
value | enum value to write as text, e.g. "Mono8" |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_setFloatValue()
int Sgc_setFloatValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
double | value ) |
Set GenICam floating point value at camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
value | value to be set |
- Return values
-
0 | in case of success, <> 0: error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_setGenICamXML()
int Sgc_setGenICamXML |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | buffer, |
|
|
const size_t | bufferSize ) |
sets the currently GenICam-XML from a buffer
- Parameters
-
cameraHandle | camera handle instance |
buffer | the buffer containing the camera XML |
bufferSize | the size of the buffer |
- Return values
-
0 | in case of success, error code (defined in ERR_SGC_XXX) |
- See also
- Sgc_getErrorDescription
◆ Sgc_setIntegerValue()
int Sgc_setIntegerValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
int64_t | value ) |
Set GenICam Integer value at camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
value | value to be written |
- Return values
-
0:in | case of success, <> 0: error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML* |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_setStringValue()
int Sgc_setStringValue |
( |
SgcCameraHandle * | cameraHandle, |
|
|
const char * | featureName, |
|
|
const char * | value ) |
Set GenICam string value at camera.
- Parameters
-
cameraHandle | camera handle instance |
featureName | name of feature |
value | buffer containing a NULL terminated string to be written to the camera |
- Return values
-
0 | in case of success, <> 0: error code (defined in XXX_error.h) ERR_SGC_INVALID_FEATURE feature name cannot be found at the currently loaded GenICam XML |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_startAcquisition()
int Sgc_startAcquisition |
( |
SgcCameraHandle * | cameraHandle, |
|
|
unsigned int | startCamera ) |
activates the the data flow towards the applet and activates the image acquisition at the camera This function is used in combination with the Fg_StartAcquire() function of the standard frame grabber SDK. Acquisition needs to be started from both sides always: from the applet side (Fg_startAcquire()) and from the camera side (Sgc_startAcquisition()). The order or the commands should be:
- start grabbing at the applet side (fg_StartAcquire()) and
- at the camera side. This ensures a correct image transmission. If the sequence is changed, it cannot be guaranteed, that the transferred images are correctly aligned at the beginning of a frame.
- Parameters
-
cameraHandle | camera handle instance |
startCamera | send the according GenICam command to activate the image acquisition at the camera |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) |
- See also
- Sgc_connectCamera, Sgc_getErrorDescription
◆ Sgc_stopAcquisition()
int Sgc_stopAcquisition |
( |
SgcCameraHandle * | cameraHandle, |
|
|
unsigned int | stopCamera ) |
stops the the data flow towards the applet and stops the image acquisition at the camera (optionally)
- Parameters
-
cameraHandle | camera handle instance |
stopCamera | send the according GenICam command to stop the image acquisition at the camera |
- Return values
-
0 | in case of success, error code (defined in XXX_error.h) |
- See also
- Sgc_getErrorDescription
◆ Sgc_StoreLowLevelLinkProfile()
int Sgc_StoreLowLevelLinkProfile |
( |
SgcBoardHandle * | boardHandle, |
|
|
const char * | file ) |
store current low level link profile into file
This function stores the current low level link profile into a file in order to restore it on another (monitoring) board. This is only needed in a controlling/monitoring scenario. You will need a device, which is able to duplicate the data traffic between camera and board. Currently only CXP is supported.
- Parameters
-
boardHandle | a handle to the according board |
file | filename |
- Return values
-
0 | success, <> 0 see ERR_SGC_XXX constants |
- See also
- Sgc_RestoreLowLevelLinkProfile
◆ Sgc_stringReadFromCamera()
int Sgc_stringReadFromCamera |
( |
SgcCameraHandle * | cameraHandle, |
|
|
char * | data, |
|
|
uint64_t | address, |
|
|
unsigned int | length ) |
read a string value from a camera register This function can be used for a direct access to a camera without by bypassing the GenICam XML implementation and register name translations. It might be used, if the register address of the connected camera is known exactly.
The data will be copied to the buffer given at the data parameter. This buffer needs to be large enough to store the whole string. The number of bytes to be read have to be passed at the length parameter. The string is not necessarily 0 terminated.
- Parameters
-
cameraHandle | camera handle instance |
data | pointer to a buffer for the return value |
address | address of the camera register (example 0x00002020 "DeviceModelName") |
length | number of bytes to be read |
- Return values
-
0 | success, ERR_SGC_BUFFER_TOO_SMALL: Buffer too small |
◆ Sgc_UnloadConnectionProfile()
unload a connection profile
This function frees the resources allocated by a previous call to Sgc_LoadConnectionProfile function.
- Parameters
-
connectionProfile | address for the allocated connection profile structure |
- Return values
-
0 | success, ERR_SGC_INVALID_ARG : invalid connection profile address |
- See also
- Sgc_LoadConnectionProfile
◆ Sgc_updateCameraInfos()
update the informations of the camera handle
This function update informations like the device user id, device id without the need of a rediscovery.
- Parameters
-
cameraHandle | a handle to the according camera |
- Return values
-
0 | success, <> 0 see ERR_SGC_XXX constants |
|