siso_genicam.h File Reference

siso_genicam.h File Reference

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.

Data Structures

struct  SgcCameraInfo
 structure for camera information More...
 
struct  SgcConnectionProfile
 data structure representing the state of a loaded connection profile More...
 
union  SgcEventData
 
struct  SgcEventData_ConnectionLost
 
struct  SgcEventData_DiscoveryStateChanged
 
struct  SgcEventData_LinkConnectionStateChanged
 
struct  SgcEventInfo
 data structure for events received from the board callback functions More...
 

Macros

#define BOARD_PROP_CAMPORT   "CamPort"
 
#define BOARD_PROP_CL_CLP_SHARED_LIBRARY_PATH   "CLCLPSharedLibraryPath"
 
#define BOARD_PROP_CL_LOADED_CLP_SHARED_LIBRARY_PATH   "CLCLPLoadedSharedLibraryPath"
 
#define BOARD_PROP_CLHS_FEC_ENABLE   "CLHSFecEnable"
 
#define BOARD_PROP_CLHS_LINK_DETECTION_ENABLE   "CLHSLinkDetectionEnable"
 
#define BOARD_PROP_CLHS_LINK_STATE   "CLHSLinkState"
 
#define BOARD_PROP_CLHS_READ_MDIO   "CLHSReadMDIO"
 
#define BOARD_PROP_CLHS_SEND_REVISION_MESSAGE   "CLHSSendRevisionMessage"
 
#define BOARD_PROP_CLHS_WRITE_MDIO   "CLHSWriteMDIO"
 
#define BOARD_PROP_CXP_AUX_TEMP   "CxpPowerAdIn"
 
#define BOARD_PROP_CXP_POWERSENSE   "CxpPowerSense"
 board properties
 
#define BOARD_PROP_CXP_POWERSTATUS   "CxpPowerStatus"
 
#define BOARD_PROP_CXP_POWERVIN   "CxpPowerVin"
 
#define BOARD_PROP_CXP_TRANSCEIVER_DISPARITY_ERROR   "CxpTransceiverDisparityError"
 
#define BOARD_PROP_CXP_TRANSCEIVER_NOT_IN_TABLE   "CxpTransceiverNotInTable"
 
#define BOARD_PROP_GBE_ACTION_CMD   "GbeActionCmd"
 
#define BOARD_PROP_GBE_ACTION_SGN   "GbeActionSgn"
 
#define BOARD_PROP_GBE_AGGREG_TYPE   "GbeAggregLinks"
 
#define BOARD_PROP_GBE_ALGORITHM   "GbeAlgorithm"
 
#define BOARD_PROP_GBE_AUTO_IP   "GbeAutoIp"
 
#define BOARD_PROP_GBE_CL_SYNC_LEN   "GbeCLSyncLen"
 
#define BOARD_PROP_GBE_CONF_CUR   "GbeConfCur"
 
#define BOARD_PROP_GBE_CONF_OPT   "GbeConfOpt"
 
#define BOARD_PROP_GBE_DEVMODE   "GbeDevMode"
 
#define BOARD_PROP_GBE_DHCP   "GbeDHCP"
 
#define BOARD_PROP_GBE_EXTEND_ID   "GbeCLExtendID"
 
#define BOARD_PROP_GBE_GVCP_CONF   "GbeGvcpConf"
 
#define BOARD_PROP_GBE_GVCP_VER   "GbeGvcpVer"
 
#define BOARD_PROP_GBE_IP_DEST   "GbeIpDest"
 
#define BOARD_PROP_GBE_IP_SOURCE   "GbeIpSource"
 
#define BOARD_PROP_GBE_IP_STATIC   "GbeIpStatic"
 
#define BOARD_PROP_GBE_MAC_DEST   "GbeMacDest"
 
#define BOARD_PROP_GBE_MAC_SOURCE   "GbeMacSource"
 
#define BOARD_PROP_GBE_MASK_LINKS   "GbeMaskLinks"
 
#define BOARD_PROP_GBE_NR_LINKS   "GbeNrLinks"
 
#define BOARD_PROP_GBE_NR_MSG_CH   "GbeNrMsgCh"
 
#define BOARD_PROP_GBE_NR_NET_INTF   "GbeNrNetIntf"
 
#define BOARD_PROP_GBE_RESTART_IP   "GbeRestartIp"
 
#define BOARD_PROP_GBE_SET_CCP   "GbeCCP"
 
#define BOARD_PROP_GBE_STREAM_CH   "GbeStreamCh"
 
#define BOARD_PROP_GBE_STREAM_CHANNEL   "GbeStreamChannel"
 
#define BOARD_PROP_GBE_TIMEOUT   "GbeTimeOut"
 
#define BOARD_PROP_LINKCONFIG   "LinkConfig"
 
#define BOARD_PROP_MAGIC_VALUE   "MagicValue"
 
#define BOARD_PROP_NR_OF_CAMERAS   "NrOfCameras"
 
#define BOARD_PROP_NR_OF_PORTS   "NrOfPorts"
 
#define BOARD_PROP_REVISION   "CameraRevision"
 
#define BOARD_PROP_TRANSCEIVERS_LOCKED_MASK   "TransceiversLockedMask"
 
#define CAM_PROP_APPLETEXTENSIONID_S   "APPLETLINKORDERINDEX"
 
#define CAM_PROP_APPLETMASTERID   "AppletMasterID"
 
#define CAM_PROP_APPLETMASTERID_S   CAM_PROP_APPLETMASTERID
 
#define CAM_PROP_APPLETOPERATORINDEX   "AppletOperatorIndex"
 
#define CAM_PROP_APPLETOPERATORSIZE   "AppletOperatorSize"
 
#define CAM_PROP_APPLETPORT   "AppletPort"
 
#define CAM_PROP_APPLETPORT_S   CAM_PROP_APPLETPORT
 
#define CAM_PROP_CONTROLPACKETSIZE   "ControlPacketSize"
 
#define CAM_PROP_CONTROLPACKETSIZE_S   CAM_PROP_CONTROLPACKETSIZE
 
#define CAM_PROP_DISCOVERYSPEED   "DiscoverySpeed"
 
#define CAM_PROP_DISCOVERYSPEED_S   CAM_PROP_DISCOVERYSPEED
 
#define CAM_PROP_EXTENSIONLINK_S   "EXTENSIONLINK"
 
#define CAM_PROP_FAMILY_NAME   "FamilyName"
 
#define CAM_PROP_FGPORT   "FgPort"
 
#define CAM_PROP_FGPORT_S   CAM_PROP_FGPORT
 
#define CAM_PROP_FIRMWARE_VERSION   "FirmwareVersion"
 
#define CAM_PROP_ISCONNECTED   "Connected"
 
#define CAM_PROP_ISCONNECTED_S   CAM_PROP_ISCONNECTED
 
#define CAM_PROP_ISGENICAMCONNECTED   "IsGenICamConnected"
 
#define CAM_PROP_ISGENICAMCONNECTED_S   CAM_PROP_ISGENICAMCONNECTED
 
#define CAM_PROP_ISTRANSCEIVERLOCKED   "IsTransceiverLocked"
 
#define CAM_PROP_ISTRANSCEIVERLOCKED_S   CAM_PROP_ISTRANSCEIVERLOCKED
 
#define CAM_PROP_LINKCONFIG   "LinkConfig"
 
#define CAM_PROP_LINKCONFIG_S   CAM_PROP_LINKCONFIG
 
#define CAM_PROP_LINKORDER_INDEX_S   "LINKORDERINDEX"
 
#define CAM_PROP_LINKSPEED   "LinkSpeed"
 
#define CAM_PROP_LINKSPEED_S   CAM_PROP_LINKSPEED
 
#define CAM_PROP_MANUFACTURER_INFO   "ManufacturerInfo"
 
#define CAM_PROP_MASTERID   "MasterID"
 
#define CAM_PROP_MASTERID_S   CAM_PROP_MASTERID
 
#define CAM_PROP_MASTERLINK   "MasterLink"
 
#define CAM_PROP_MASTERLINK_S   CAM_PROP_MASTERLINK
 
#define CAM_PROP_MASTERPORT   "MasterPort"
 
#define CAM_PROP_MASTERPORT_S   CAM_PROP_MASTERPORT
 
#define CAM_PROP_MODEL_NAME   "ModelName"
 
#define CAM_PROP_NROFLINKS   "NrOfLinks"
 
#define CAM_PROP_NROFLINKS_S   CAM_PROP_NROFLINKS
 
#define CAM_PROP_SERIAL_NUMBER   "SerialNumber"
 
#define CAM_PROP_STREAMPACKET_SIZE_S   CAM_PROP_STREAMPACKETSIZE
 
#define CAM_PROP_STREAMPACKETSIZE   "StreamPacketSize"
 camera properties
 
#define CAM_PROP_STREAMPACKETSIZE_S   CAM_PROP_STREAMPACKETSIZE
 
#define CAM_PROP_USER_ID   "UserID"
 
#define CAM_PROP_VENDOR_NAME   "VendorName"
 
#define CAM_PROP_VERSION   "Version"
 
#define CAM_PROP_XML_DATA   "XmlData"
 
#define CXP_SPEED_10000   LINK_SPEED_10000
 
#define CXP_SPEED_1250   LINK_SPEED_1250
 
#define CXP_SPEED_12500   LINK_SPEED_12500
 
#define CXP_SPEED_2500   LINK_SPEED_2500
 
#define CXP_SPEED_3125   LINK_SPEED_3125
 
#define CXP_SPEED_5000   LINK_SPEED_5000
 
#define CXP_SPEED_6250   LINK_SPEED_6250
 
#define CXP_SPEED_NONE   LINK_SPEED_NONE
 predefined link speeds according to CXP specs.
 
#define LINK_SPEED_10000   10000
 
#define LINK_SPEED_1250   1250
 
#define LINK_SPEED_12500   12500
 
#define LINK_SPEED_2500   2500
 
#define LINK_SPEED_3125   3125
 
#define LINK_SPEED_5000   5000
 
#define LINK_SPEED_6250   6250
 
#define LINK_SPEED_NONE   0
 predefined link speeds
 
#define PORTMASK0   1
 predefined port masks
 
#define PORTMASK1   2
 
#define PORTMASK2   4
 
#define PORTMASK3   8
 
#define PROP_SET_LINK_CONFIG_FREQ_S   "SET_LINK_CONFIG_FREQ"
 ErrorCodes.
 
#define PROP_SET_STREAM_PAKET_SIZE_S   "SET_STREAM_PAKET_SIZE"
 
#define SGC_CP_CAMERA_STATE_FULL_CONNECTED   3
 
#define SGC_CP_CAMERA_STATE_INVALID   0
 camera states for connection profiles
 
#define SGC_CP_CAMERA_STATE_LINK_ONLY_CONNECTED   2
 
#define SGC_CP_CAMERA_STATE_NOT_CONNECTED   1
 
#define SGC_ELCS_CONNECTED   1
 additional data for event SGC_EVENT_LINK_CONNECTION_STATE_CHANGED
 
#define SGC_ELCS_DISCONNECTED   2
 
#define SGC_EVENT_BROKEN_FRAME   403
 
#define SGC_EVENT_CABLEDIAGNOSTIC_STATUS   110
 
#define SGC_EVENT_CAMERA_CONNECTION_LOST   200
 
#define SGC_EVENT_CORRUPTED_FRAME   400
 
#define SGC_EVENT_DISCOVERY_CHANGE   100
 Event types handled by Sgc_RegisterEventCallback, Sgc_registerBoardEventCallback, Sgc_registerCameraEventCallback.
 
#define SGC_EVENT_DISCOVERY_STATE_CAMERA_ADDED   250
 
#define SGC_EVENT_DISCOVERY_STATE_CAMERA_LOST   251
 
#define SGC_EVENT_DISCOVERY_STATE_CAMERA_PROPERTY_CHANGE   252
 
#define SGC_EVENT_EXTERNAL_FRAME_LOSS   401
 
#define SGC_EVENT_GEVEVENT   300
 
#define SGC_EVENT_LINK_CONNECTION_STATE_CHANGED   201
 
#define SGC_EVENT_LOST_FRAME   402
 
#define SGC_EVENT_NUMBER_OF_LINKS_CHANGED   101
 
#define SGC_EVENT_PHY_IRQ   130
 
#define SGC_EVENT_SGCEVENT   310
 
#define SGC_EVENT_TEMPERATURE_ALERT   120
 
#define SGC_FLAGS_NONE   0x0
 Flags.
 
#define SGC_FLAGS_STOPONERROR   0x1
 
#define SGC_INIT_FLAG_FORCE_PHY_RESET   0x01
 flags for Sgc_initBoardEx
 
#define SGC_PLS_CONNECTED   1
 
#define SGC_PLS_CONNECTING   3
 
#define SGC_PLS_DISCONNECTED   2
 
#define SGC_PLS_UNDEFINED   0
 physical link states for frame grabber ports
 
#define SGC_PROPERTY_TYPE_DOUBLE   0x2
 
#define SGC_PROPERTY_TYPE_STRING   0x3
 
#define SGC_PROPERTY_TYPE_UINT   0x1
 possible data types for Sgc_getBoardPropertyWithType and Sgc_getCameraPropertyWithType
 
#define SGC_SP_FLAG_KEEP_PHYCONNECTION   0x0001
 flags for Sgc_ScanPortsEx() function
 
#define SGC_SP_FLAG_RESET_DISCOVERY_INFOS   0x0040
 
#define SGC_SP_FLAG_SKIP_AUTO_PORTADJUSTMENT   0x0002
 
#define SGC_SP_FLAG_SKIP_DEVICE_CONFIGURATION   0x0004
 
#define SGC_SP_FLAG_SKIP_MULTIFRAMEGRABBERSYNC   0x0008
 
#define SGC_SP_FLAG_UPDATE_DISCOVERY_INFOS_ONLY   0x0020
 
#define SGC_SP_FLAG_USE_CAMERA_DEFAULT_SPEED   0x0010
 
#define SISO_INTERNAL_FUNCTION__ENABLE_LOGGING   2
 
#define SISO_INTERNAL_FUNCTION__ENABLE_PROFILING   3
 
#define SISO_INTERNAL_FUNCTION__RESET_PHY   1
 

Typedefs

typedef int(* Sgc_BoardEventCallbackFunc_t) (SgcBoardHandle *boardHandle, const SgcEventInfo *eventInfo, void *userData)
 prototype of board event callback procedure
 
typedef int(* Sgc_CameraEventCallbackFunc_t) (SgcCameraHandle *cameraHandle, const SgcEventInfo *eventInfo, void *userData)
 prototype of camera event callback procedure
 
typedef struct SgcBoardHandle SgcBoardHandle
 
typedef struct SgcCameraHandle SgcCameraHandle
 
typedef struct SgcCameraInfo SgcCameraInfo
 structure for camera information
 
typedef struct SgcConnectionProfile SgcConnectionProfile
 data structure representing the state of a loaded connection profile
 
typedef int(* SgcEventCallback_t) (SgcBoardHandle *boardHandle, SgcCameraHandle *cameraHandle, const SgcEventInfo *const eventInfo, const void *userData)
 prototype of event callback procedure
 
typedef struct SgcEventInfo SgcEventInfo
 data structure for events received from the board callback functions
 

Enumerations

enum  SgcPowerStatus {
  SgcPowerStatusDisabled , SgcPowerStatusInitializing , SgcPowerStatusNoCable , SgcPowerStatusOff ,
  SgcPowerStatusOn , SgcPowerStatusErrorLowCurrent , SgcPowerStatusErrorHighCurrent , SgcPowerStatusErrorLowVoltage ,
  SgcPowerStatusErrorHighVoltage , SgcPowerStatusErrorAdcFault , SgcPowerStatusErrorInvalidValue
}
 power status values More...
 

Functions

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
 
SgcCameraInfoSgc_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
 

Detailed Description

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

Macro Definition Documentation

◆ BOARD_PROP_CAMPORT

#define BOARD_PROP_CAMPORT   "CamPort"

Camera Port.

◆ 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"

Returns algorithm GBE.

◆ 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"

Returns GBE device mode.

◆ 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"

Returns GBE set ExtendId

◆ 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"

Returns GBE GvcpVer.

◆ 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"

Restart IP of GBE.

◆ BOARD_PROP_GBE_SET_CCP

#define BOARD_PROP_GBE_SET_CCP   "GbeCCP"

Enable/disable CCP.

◆ 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"

Returns timeout of GBE.

◆ BOARD_PROP_LINKCONFIG

#define BOARD_PROP_LINKCONFIG   "LinkConfig"

Link Configuration.

◆ 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"

Returns camera revision.

◆ 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

#define CAM_PROP_APPLETMASTERID_S   CAM_PROP_APPLETMASTERID

◆ 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

#define CAM_PROP_APPLETPORT_S   CAM_PROP_APPLETPORT

◆ CAM_PROP_CONTROLPACKETSIZE

#define CAM_PROP_CONTROLPACKETSIZE   "ControlPacketSize"

max. size of CxP Control packages for that camera [out]

◆ CAM_PROP_CONTROLPACKETSIZE_S

#define CAM_PROP_CONTROLPACKETSIZE_S   CAM_PROP_CONTROLPACKETSIZE

◆ 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

#define CAM_PROP_DISCOVERYSPEED_S   CAM_PROP_DISCOVERYSPEED

◆ 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

#define CAM_PROP_FGPORT_S   CAM_PROP_FGPORT

◆ 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

#define CAM_PROP_ISCONNECTED_S   CAM_PROP_ISCONNECTED

◆ CAM_PROP_ISGENICAMCONNECTED

#define CAM_PROP_ISGENICAMCONNECTED   "IsGenICamConnected"

state of GenICam connection (true/false) [out]

◆ CAM_PROP_ISGENICAMCONNECTED_S

#define CAM_PROP_ISGENICAMCONNECTED_S   CAM_PROP_ISGENICAMCONNECTED

◆ CAM_PROP_ISTRANSCEIVERLOCKED

#define CAM_PROP_ISTRANSCEIVERLOCKED   "IsTransceiverLocked"

status of the transceiver lock [out]

◆ CAM_PROP_ISTRANSCEIVERLOCKED_S

#define CAM_PROP_ISTRANSCEIVERLOCKED_S   CAM_PROP_ISTRANSCEIVERLOCKED

◆ 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

#define CAM_PROP_LINKCONFIG_S   CAM_PROP_LINKCONFIG

◆ 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

#define CAM_PROP_LINKSPEED_S   CAM_PROP_LINKSPEED

◆ 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

#define CAM_PROP_MASTERID_S   CAM_PROP_MASTERID

◆ CAM_PROP_MASTERLINK

#define CAM_PROP_MASTERLINK   "MasterLink"

master-state of a certain link [out]

◆ CAM_PROP_MASTERLINK_S

#define CAM_PROP_MASTERLINK_S   CAM_PROP_MASTERLINK

◆ CAM_PROP_MASTERPORT

#define CAM_PROP_MASTERPORT   "MasterPort"

master-port of this camera [out]

◆ CAM_PROP_MASTERPORT_S

#define CAM_PROP_MASTERPORT_S   CAM_PROP_MASTERPORT

◆ 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

#define CAM_PROP_NROFLINKS_S   CAM_PROP_NROFLINKS

◆ CAM_PROP_SERIAL_NUMBER

#define CAM_PROP_SERIAL_NUMBER   "SerialNumber"

camera serial number as a zero-terminated string [out]

◆ CAM_PROP_STREAMPACKET_SIZE_S

#define CAM_PROP_STREAMPACKET_SIZE_S   CAM_PROP_STREAMPACKETSIZE

◆ CAM_PROP_STREAMPACKETSIZE

#define CAM_PROP_STREAMPACKETSIZE   "StreamPacketSize"

camera properties

max. size of stream packages [in/out]

◆ CAM_PROP_STREAMPACKETSIZE_S

#define CAM_PROP_STREAMPACKETSIZE_S   CAM_PROP_STREAMPACKETSIZE

◆ 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 CXP_SPEED_10000   LINK_SPEED_10000

define for link speed 10 Gbps

◆ CXP_SPEED_1250

#define CXP_SPEED_1250   LINK_SPEED_1250

define for link speed 1.25 Gbps

◆ CXP_SPEED_12500

#define CXP_SPEED_12500   LINK_SPEED_12500

define for link speed 12.5 Gbps

◆ CXP_SPEED_2500

#define CXP_SPEED_2500   LINK_SPEED_2500

define for link speed 2.5 Gbps

◆ CXP_SPEED_3125

#define CXP_SPEED_3125   LINK_SPEED_3125

define for link speed 3.125 Gbps

◆ CXP_SPEED_5000

#define CXP_SPEED_5000   LINK_SPEED_5000

define for link speed 5 Gbps

◆ CXP_SPEED_6250

#define CXP_SPEED_6250   LINK_SPEED_6250

define for link speed 6.25 Gbps

◆ CXP_SPEED_NONE

#define CXP_SPEED_NONE   LINK_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

#define PORTMASK0   1

predefined port masks

Bit of port mask for frame grabber port 0

◆ PORTMASK1

#define PORTMASK1   2

Bit of port mask for frame grabber port 1

◆ PORTMASK2

#define PORTMASK2   4

Bit of port mask for frame grabber port 2

◆ PORTMASK3

#define PORTMASK3   8

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"

Stream packet 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

camera is not connected

◆ 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

Flags.

flag: none

◆ SGC_FLAGS_STOPONERROR

#define SGC_FLAGS_STOPONERROR   0x1

flag: stop on error

◆ 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

property type: DOUBLE

◆ SGC_PROPERTY_TYPE_STRING

#define SGC_PROPERTY_TYPE_STRING   0x3

property type: String

◆ 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'

Typedef Documentation

◆ Sgc_BoardEventCallbackFunc_t

typedef int(* Sgc_BoardEventCallbackFunc_t) (SgcBoardHandle *boardHandle, const SgcEventInfo *eventInfo, void *userData)

prototype of board event callback procedure

reserved for later usage

Parameters
boardHandleboard handle, at which the event occurred
eventInfoevent details/data
userDataadditional payload passed from user at registration of event handler

◆ Sgc_CameraEventCallbackFunc_t

typedef int(* Sgc_CameraEventCallbackFunc_t) (SgcCameraHandle *cameraHandle, const SgcEventInfo *eventInfo, void *userData)

prototype of camera event callback procedure

reserved for later usage

Parameters
cameraHandlecamera handle, at which the event occurred
eventInfoevent details/data
userDataadditional 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

Remarks
SgcConnectionProfile, that gets filled by the the function Sgc_LoadConnectionProfile of siso_genicam. It stores the board handle and camera related data (camera count, camera handles, camera infos, camera connection states).

◆ SgcEventCallback_t

typedef int(* SgcEventCallback_t) (SgcBoardHandle *boardHandle, SgcCameraHandle *cameraHandle, const SgcEventInfo *const eventInfo, const void *userData)

prototype of event callback procedure

reserved for later usage

Parameters
boardHandleboard handle, at which the event occurred
cameraHandlecamera handle, at which the event occurred
eventInfoevent details/data
userDataadditional payload passed from user at registration of event handler

◆ SgcEventInfo

typedef struct SgcEventInfo SgcEventInfo

data structure for events received from the board callback functions

Remarks
SgcEventInfo is a structure, that gets filled by the callback interface of siso_genicam. Which event is notified can be determined by evaluating the member eventID (event type identifier). the event types correspond to the SGC_EVENT_CXXX constants (defines). Specific events types correspond to specific additional information. These information is represented as different components of the union. When evaluating the additional information, the member eventID needs to be determined first.

Enumeration Type Documentation

◆ SgcPowerStatus

power status values

Enumerator
SgcPowerStatusDisabled 
SgcPowerStatusInitializing 
SgcPowerStatusNoCable 
SgcPowerStatusOff 
SgcPowerStatusOn 
SgcPowerStatusErrorLowCurrent 
SgcPowerStatusErrorHighCurrent 
SgcPowerStatusErrorLowVoltage 
SgcPowerStatusErrorHighVoltage 
SgcPowerStatusErrorAdcFault 
SgcPowerStatusErrorInvalidValue 

Function Documentation

◆ DEPRECATED() [1/11]

int DEPRECATED ( Sgc_CxpConnect(SgcBoardHandle *boardHandle, SgcCameraHandle *cameraHandle) )

connects a camera handle to a CXP-GenICam camera

Deprecated
this function is replaced by Sgc_LinkConnect()
See also
Sgc_LinkConnect

◆ DEPRECATED() [2/11]

int DEPRECATED ( Sgc_CxpDisconnect(SgcCameraHandle *cameraHandle) )

disconnects a camera handle to a CXP - GenICam camera

Deprecated
this function is replaced by Sgc_LinkDisconnect()
See also
Sgc_LinkDisconnect

◆ DEPRECATED() [3/11]

int DEPRECATED ( Sgc_DirectRegisterRead(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, uint32_t *data) )

reads an integer value from the camera

Deprecated
this function is replaced by Sgc_DirectRegisterRead64()
See also
Sgc_DirectRegisterRead64

◆ DEPRECATED() [4/11]

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

Deprecated
Use Sgc_DirectRegisterReadMem64
See also
Sgc_DirectRegisterReadMem64

◆ 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) )

write a block of data to the camera

Deprecated
this function is replaced by Sgc_DirectRegisterReadMemWithTimeOut64()
See also
Sgc_DirectRegisterReadMemWithTimeOut64

◆ 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) )

write an integer value to the camera

Deprecated
this function is replaced by Sgc_DirectRegisterWrite64()
See also
Sgc_DirectRegisterWrite64

◆ 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) )

write a block of data to the camera

Deprecated
this function is replaced by Sgc_DirectRegisterWriteMem64()
See also
Sgc_DirectRegisterWriteMem64

◆ 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) )

write a block of data to the camera

Deprecated
this function is replaced by Sgc_DirectRegisterWriteMemWithTimeOut64
See also
Sgc_DirectRegisterWriteMemWithTimeOut64

◆ 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_handlea handle to the according board
configFileNamefilename
Return values
0success, 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]

int DEPRECATED ( Sgc_RegisterEventCallback(SgcBoardHandle *boardHandle, SgcEventCallback_t eventHandler, void *userData) )

Register an callback procedure for event notifications.

Parameters
boardHandlea handle for accessing the board
eventHandlerstructure containing the callback function
userDataadditional data, that gets passed at each callback
Return values
0:incase 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_handlea handle to the according board
configFileNamefilename
Return values
0success, 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 )

for internal use only

◆ Sgc_clearStringCache()

int Sgc_clearStringCache ( SgcCameraHandle * cameraHandle)

Clear the internal cache for GenICam string representations.

Parameters
cameraHandlecamera handle instance
Return values
0in case of success, error code (defined in XXX_error.h)
See also
Sgc_getStringValue, Sgc_getEnumerationValueAsString

◆ Sgc_connectCamera()

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.

Return values
0success, 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
cameraHandleCamera handle retrieved by calling
filenamefilename of the GenICam XML file for the camera
Return values
0success 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
boardHandlea handle to the according board
portport identifier
addresscamera register address
datadata to be written
Return values
0success, 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
boardHandlea handle to the according board
portport identifier
addresscamera register address
datadata read from the camera
buflenlength of the output buffer in bytes, after reading containing the number of bytes read
Return values
0success, 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
boardHandlea handle to the according board
portport identifier
addresscamera register address
datadata read from the camera
buflenlength of the output buffer in bytes, after reading containing the number of bytes read
timeoutInMillisecondstimeout in ms. 0 indicates infinite
Return values
0success, 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
boardHandlea handle to the according board
portport identifier
addresscamera register address
datadata read from the camera
switchByteOrderswitches the byte order of data before writing (endianess)
Return values
0success, 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
boardHandlea handle to the according board
portport identifier
addresscamera register address
datadata to be written
buflenlength of the input buffer
Return values
0success, 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
boardHandlea handle to the according board
portport identifier
addresscamera register address
datadata to be written
buflenlength of the input buffer
timeoutInMillisecondstimeout in ms. 0 indicates infinite
Return values
0success, ERR_SGC_INVALID_ARG: invalid out parameter

◆ Sgc_disconnectCamera()

int Sgc_disconnectCamera ( SgcCameraHandle * cameraHandle)

Disconnect from camera.

Parameters
cameraHandleCamera handle retrieved by calling

◆ Sgc_executeCommand()

int Sgc_executeCommand ( SgcCameraHandle * cameraHandle,
const char * featureName )

Execute a certain GenICam command at the camera.

Parameters
cameraHandlecamera handle instance
featureNamename of feature
Return values
0in 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()

void Sgc_freeBoard ( SgcBoardHandle * boardHandle)

Release resources allocated by Sgc_initBoard.

Parameters
boardHandleInterface 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
boardHandlea handle to the according board
propertyNameproperty identifier, see PROP_XXX
valuepointer to a buffer for returning the data
propertyTypedata type of the variable passed at the propertyValuePtr parameter
additionalValueadditional value for addressing a property, might be NULL
Return values
0in 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
cameraHandlecamera handle instance
featureNamename of feature
valuePtrbuffer for value to be read ( 1 : true, 0: false)
Return values
0in 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()

int Sgc_getCamera ( SgcBoardHandle * boardHandle,
const unsigned int port,
SgcCameraHandle ** cameraHandle )

get a camera object associated to a certain frame grabber port

Parameters
boardHandlehandle to frame grabber generated by Sgc_initBoard()
portport index (frame grabber port index)
cameraHandlereturn value of allocated interface resources, needs to be initialized by NULL pointer
Return values
0success, <> 0 see ERR_SGC_XXX constants
See also
Sgc_initBoard

◆ Sgc_getCameraByIndex()

int Sgc_getCameraByIndex ( SgcBoardHandle * boardHandle,
const unsigned int index,
SgcCameraHandle ** cameraHandle )

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
boardHandlea handle to the according board
cameraHandlereturn value as CameraHandle that can be used for further camera access NULL in case of an error
indexindex between 0 and Sgc_getCameraCount()-1
Return values
0success, ERR_SGC_INVALID_ARG : invalid out parameter
See also
Sgc_getCameraCount, Sgc_getErrorDescription

◆ Sgc_getCameraCount()

int Sgc_getCameraCount ( SgcBoardHandle * boardHandle)

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
boardHandlea 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()

SgcCameraInfo * Sgc_getCameraInfo ( SgcCameraHandle * cameraHandle)

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.

Remarks
The returned pointer to this structure valid as long as the camera handle passed as an argument to this function
Parameters
cameraHandlehandle to frame grabber generated by Sgc_initBoard()
Return values
camerainformation 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
cameraHandlecamera handle instance
propertyNamestring containing the name of property to be accessed, see CAM_PROP_XXX constants
valuepointer 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
propertyTypetype of data given at parameter propertyValuePtr (in / out parameter) see SGC_PROPERTY_TYPE_XXX constants
additionalValueadditional parameter to address the the property (multi-purpose)
Return values
0success 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
cameraHandlecamera handle instance
featureNamename of feature
valuebuffer for value to be read (value returned as number)
Return values
0in 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
cameraHandlecamera handle instance
featureNamename of feature
valuePtrreturn value
Return values
0in 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
errorCodeerror code to be decoded.
Return values
pointerto 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
cameraHandlecamera handle instance
featureNamename of feature
valuePtrbuffer for value to be read
Return values
0in 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
cameraHandlecamera handle instance
featureNamename of feature
min_valuePtrbuffer for minimum value to be read
max_valuePtrbuffer for maximum value to be read
step_valuePtrbuffer for step size value to be read
Return values
0in 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
Remarks
even if the functions prototype uses a 64 bit value as data, the library supports 32 bit integers only according to CoaxPress specification
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
cameraHandlecamera handle instance
bufferthe buffer, where to copy the data, if NULL, the required buffer size is returned
bufferSizethe fill level or required buffer size of the buffer
Return values
0in 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
cameraHandlecamera handle instance
featureNamename of feature
valuePtrbuffer for value to be read
Return values
0in 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
Remarks
even if the functions prototype uses a 64 bit value as data, the library supports 32 bit integers only according to CoaxPress specification
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
cameraHandlecamera handle instance
featureNamename of feature
min_valuePtrbuffer for minimum value to be read
max_valuePtrbuffer for maximum value to be read
step_valuePtrbuffer for step size value to be read
Return values
0in 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
Remarks
even if the functions prototype uses a 64 bit value as data, the library supports 32 bit integers only according to CoaxPress specification
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
cameraHandlecamera handle instance
featureNamename of feature
valuePtrreturn value
Return values
0in 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()

int Sgc_initBoard ( Fg_Struct * fg,
unsigned int initFlag,
SgcBoardHandle ** boardHandle )

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
fgframe grabber handle retrieved by FGLIB::fg_init(<APPLETNAME>)
initFlagreserved for later usage
boardHandlereturn value of allocated interface resources, needs to be initialized by NULL pointer
Return values
0success, <> 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
fgframe grabber handle retrieved by FGLIB::fg_init(<APPLETNAME>)
initFlagreserved for later usage
boardHandlereturn value of allocated interface resources, needs to be initialized by NULL pointer
portMaskbit mask, to enable specific frame grabber ports, that shall be used. Default value is 0xFFFF (all ports)
slaveModecurrently not used
Return values
0success, <> 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
boardHandleInterface object to be released. Retrieved by Sgc_initBoard
portport to check
Return values
truea 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
boardHandleInterface object to be released. Retrieved by Sgc_initBoard
indexport index to check
Return values
truea 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
cameraHandlecamera handle instance
featureNamename of feature
valuePtrreturned data read from the camera by using GenICam
Return values
0command 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()

int Sgc_LinkConnect ( SgcBoardHandle * boardHandle,
SgcCameraHandle * cameraHandle )

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
boardHandlea handle to the according board
cameraHandlecamera handle containing the necessary information for creating the connection
Return values
0success, ERR_SGC_INVALID_ARG : invalid out parameter
See also
Sgc_ScanPorts, Sgc_SetCameraProperty, Sgc_LoadBoardConfiguration, Sgc_LinkDisconnect

◆ Sgc_LinkDisconnect()

int Sgc_LinkDisconnect ( SgcCameraHandle * cameraHandle)

disconnects a camera handle from a GenICam capable camera

Parameters
cameraHandlecamera handle containing the necessary information for creating the connection
Return values
0success, 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
cameraHandlea handle to the according camera
paramFileNamefilename
flagsspecific flags see :
Return values
0success, ERR_SGC_INVALID_ARG : invalid out parameter
See also
Sgc_SaveCameraParameters, Sgc_connectCamera,

◆ Sgc_loadCameraXml()

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.

Return values
0success, 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()

int Sgc_LoadConnectionProfile ( Fg_Struct * fg,
const char * boardConfigurationFilePath,
SgcConnectionProfile ** connectionProfilePtr )

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
fgframe grabber handle retrieved by FGLIB::fg_init(<APPLETNAME>)
boardConfigurationFilePathpath to th board configuration file
connectionProfilePtrpointer address for the allocated connection profile structure
Return values
0success, <> 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 )

read a number of bytes from a camera register without a timeout

See also
Sgc_memoryReadFromCameraWithTimeout

◆ 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.

Remarks
The length of data transfer is checked against GenICam definition of the camera.
Parameters
cameraHandlecamera handle instance
addressaddress of the camera register (example 0x00002070 "Device version")
bufferpointer to a buffer for the return value
lengthnumber of bytes to be read
timeoutInMillisecondstimeout for camera response and data transfer. if set to 0 the timeout is disabled
Return values
0success, ERR_SGC_BUFFER_TOO_SMALL: Buffer too small

◆ Sgc_memoryWriteToCamera()

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

See also
Sgc_memoryWriteToCameraWithTimeout

◆ 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.

Remarks
The length of data transfer is checked against GenICam definition of the camera
Parameters
cameraHandlecamera handle instance
addressaddress of the camera register (example 0x00002070 "Device version")
bufferpointer to a buffer for the return value
lengthnumber of bytes to be read
timeoutInMillisecondstimeout for camera response and data transfer. if set to 0 the timeout is disbled
Return values
0success, 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
boardHandleInterface object to be released. Retrieved by Sgc_initBoard
portMaskbit 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
boardHandleInterface object to be released. Retrieved by Sgc_initBoard
portMaskbit mask containing the frame grabber ports to access
commandcommand, how to switch power. values: 0 power off, 1: power on, 2: tear down power for a certain duration

◆ Sgc_registerBoardEventCallback()

int Sgc_registerBoardEventCallback ( SgcBoardHandle * board_handle,
Sgc_BoardEventCallbackFunc_t eventHandler,
void * userData )

Register an callback procedure for board event notifications.

Parameters
board_handlea handle for accessing the board
eventHandlerstructure containing the callback function
userDataadditional data, that gets passed at each callback
Return values
0:incase of success, <> 0: error code (defined in XXX_error.h)
See also
Sgc_getErrorDescription,

◆ Sgc_registerCameraEventCallback()

int Sgc_registerCameraEventCallback ( SgcCameraHandle * camera_handle,
Sgc_CameraEventCallbackFunc_t eventHandler,
void * userData )

Register an callback procedure for camera event notifications.

Parameters
camera_handlea handle for accessing the camera
eventHandlerstructure containing the callback function
userDataadditional data, that gets passed at each callback
Return values
0:incase 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
cameraHandlecamera handle instance
addressaddress of the camera register (example 0x00002070 "Device version")
datapointer to a buffer for the return value
Return values
0success 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
cameraHandlecamera handle instance
addressaddress of the camera register (example 0x00002070 "Device version")
datavalue to write
Return values
0success 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
boardHandlea handle to the according board
filefilename
Return values
0success, <> 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
cameraHandlea handle to the according camera
paramFileNamefilename, where to save the data
flagsspecific flags see :
Return values
0success, 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
boardHandleInterface object to be released. Retrieved by Sgc_initBoard
portMaskbit mask representing the physical frame grabber ports to be scanned; currently, only a full scan is supported
discoveryTimeouttimeout in milliseconds,
speedpreferred link speed, set to 0 in case of automatic detection at highest speed.
Return values
0in 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
boardHandleInterface object to be released. Retrieved by Sgc_initBoard
portMaskbit mask representing the physical frame grabber ports to be scanned; currently, only a full scan is supported
discoveryTimeouttimeout in milliseconds,
speedpreferred link speed, set to 0 in case of automatic detection at highest speed.
flagsBit mask representing specific options, see SGC_SP_FLAG_XXXX
Return values
0in 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
boardHandlea handle to the according board
propertyNameproperty identifier, see PROP_XXX
propertyValuePtrpointer to data structure containing the data to be set e.g.
propertyTypedata type of the variable passed at the propertyValuePtr parameter
additionalValueadditional value for addressing a property, might be NULL
Return values
0in 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
cameraHandlecamera handle instance
featureNamename of feature
valuevalue to write ( 1 : true, 0: false)
Return values
0in 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
cameraHandlecamera handle instance
propertyNamestring containing the name of property to be accessed. For valid values see CAM_PROP_XXX constants
valuepointer to data structure, where the result value should be used. Needs to be large enough to carry the data completely.
propertyTypetype of data given at parameter propertyValuePtr see SGC_PROPERTY_TYPE_XXX constants
additionalValueadditional parameter to address the the property (multi-purpose)
Return values
0success 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
cameraHandlecamera handle instance
featureNamename of feature
valueenum value to write as text, e.g. "Mono8"
Return values
0in 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
cameraHandlecamera handle instance
featureNamename of feature
valuevalue to be set
Return values
0in 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
cameraHandlecamera handle instance
bufferthe buffer containing the camera XML
bufferSizethe size of the buffer
Return values
0in 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
cameraHandlecamera handle instance
featureNamename of feature
valuevalue to be written
Return values
0:incase 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*
Remarks
even if the functions prototype uses a 64 bit value as data, the library supports 32 bit integers only according to CoaxPress specification
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
cameraHandlecamera handle instance
featureNamename of feature
valuebuffer containing a NULL terminated string to be written to the camera
Return values
0in 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
Remarks
i.g. the string features at a camera are limited to a specific size. The Sgc_setStringValue does not do a check for this size. It is up to the caller to check the length before passing the string to this function.
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:

  1. start grabbing at the applet side (fg_StartAcquire()) and
  2. 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
    cameraHandlecamera handle instance
    startCamerasend the according GenICam command to activate the image acquisition at the camera
    Return values
    0in 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
cameraHandlecamera handle instance
stopCamerasend the according GenICam command to stop the image acquisition at the camera
Return values
0in 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
boardHandlea handle to the according board
filefilename
Return values
0success, <> 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
cameraHandlecamera handle instance
datapointer to a buffer for the return value
addressaddress of the camera register (example 0x00002020 "DeviceModelName")
lengthnumber of bytes to be read
Return values
0success, ERR_SGC_BUFFER_TOO_SMALL: Buffer too small

◆ Sgc_UnloadConnectionProfile()

int Sgc_UnloadConnectionProfile ( SgcConnectionProfile * connectionProfile)

unload a connection profile

This function frees the resources allocated by a previous call to Sgc_LoadConnectionProfile function.

Parameters
connectionProfileaddress for the allocated connection profile structure
Return values
0success, ERR_SGC_INVALID_ARG : invalid connection profile address
See also
Sgc_LoadConnectionProfile

◆ Sgc_updateCameraInfos()

int Sgc_updateCameraInfos ( SgcCameraHandle * cameraHandle)

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
cameraHandlea handle to the according camera
Return values
0success, <> 0 see ERR_SGC_XXX constants