Silicon Software Logo

siso_genicam.h Source File

siso_genicam.h
Go to the documentation of this file.
1 
15 #ifndef __SISO_GENICAM_H__
16 #define __SISO_GENICAM_H__
17 
18 #include "fgrab_struct.h"
19 #include "siso_genicam_error.h"
20 #include <sys/types.h>
21 
26 
27 #pragma pack(push)
28 #pragma pack(1)
29 
33 typedef struct SgcCameraInfo
34 {
35  const char* deviceVendorName;
36  const char* deviceModelName;
37  const char* deviceFamilyName;
38  const char* deviceVersion;
39  const char* deviceFirmwareVersion;
41  const char* deviceSerialNumber;
42  const char* deviceUserId;
44 
45 #pragma pack(pop)
46 
51 #define SGC_EVENT_DISCOVERY_CHANGE 100
52 
54 #define SGC_EVENT_NUMBER_OF_LINKS_CHANGED 101
55 
56 #define SGC_EVENT_CABLEDIAGNOSTIC_STATUS 110
57 
58 #define SGC_EVENT_TEMPERATURE_ALERT 120
59 
60 #define SGC_EVENT_PHY_IRQ 130
61 
62 #define SGC_EVENT_CAMERA_CONNECTION_LOST 200
63 
65 #define SGC_EVENT_LINK_CONNECTION_STATE_CHANGED 201
66 
67 #define SGC_EVENT_GEVEVENT 300
68 
69 #define SGC_EVENT_SGCEVENT 310
70 
71 #define SGC_EVENT_CORRUPTED_FRAME 400
72 
73 #define SGC_EVENT_EXTERNAL_FRAME_LOSS 401
74 
75 #define SGC_EVENT_LOST_FRAME 402
76 
77 #define SGC_EVENT_BROKEN_FRAME 403
78 
79 #define SGC_EVENT_DISCOVERY_STATE_CAMERA_ADDED 250
80 #define SGC_EVENT_DISCOVERY_STATE_CAMERA_LOST 251
81 #define SGC_EVENT_DISCOVERY_STATE_CAMERA_PROPERTY_CHANGE 252
82 
83 
87 #define SGC_ELCS_CONNECTED 1
88 #define SGC_ELCS_DISCONNECTED 2
93 #define SGC_PLS_UNDEFINED 0
94 #define SGC_PLS_CONNECTED 1
95 #define SGC_PLS_DISCONNECTED 2
96 #define SGC_PLS_CONNECTING 3
101 #define SGC_SP_FLAG_KEEP_PHYCONNECTION 0x0001
102 #define SGC_SP_FLAG_SKIP_AUTO_PORTADJUSTMENT 0x0002
103 #define SGC_SP_FLAG_SKIP_DEVICE_CONFIGURATION 0x0004
104 #define SGC_SP_FLAG_SKIP_MULTIFRAMEGRABBERSYNC 0x0008
105 #define SGC_SP_FLAG_USE_CAMERA_DEFAULT_SPEED 0x0010
106 #define SGC_SP_FLAG_UPDATE_DISCOVERY_INFOS_ONLY 0x0020
107 #define SGC_SP_FLAG_RESET_DISCOVERY_INFOS 0x0040
112 #define SGC_CP_CAMERA_STATE_INVALID 0
113 #define SGC_CP_CAMERA_STATE_NOT_CONNECTED 1
114 #define SGC_CP_CAMERA_STATE_LINK_ONLY_CONNECTED 2
115 #define SGC_CP_CAMERA_STATE_FULL_CONNECTED 3
117 #pragma pack(push)
118 #pragma pack(1)
119 
120 typedef struct {
121  uint32_t cameraIndex;
123 
124 typedef struct {
125  uint32_t phyIndex;
128 
129 typedef struct {
130  uint32_t id;
138 
139 typedef union {
143 } SgcEventData;
144 
156 typedef struct SgcEventInfo
157 {
158  uint16_t eventID;
161 } SgcEventInfo;
162 
169 typedef struct SgcConnectionProfile {
176 
177 #pragma pack(pop)
178 
182 #define SGC_FLAGS_NONE 0x0
183 #define SGC_FLAGS_STOPONERROR 0x1
188 #define SGC_PROPERTY_TYPE_UINT 0x1
189 #define SGC_PROPERTY_TYPE_DOUBLE 0x2
190 #define SGC_PROPERTY_TYPE_STRING 0x3
202 typedef int (*SgcEventCallback_t)(SgcBoardHandle* boardHandle, SgcCameraHandle* cameraHandle , const SgcEventInfo * const eventInfo, const void* userData);
203 
213 typedef int (*Sgc_BoardEventCallbackFunc_t)(SgcBoardHandle* boardHandle, const SgcEventInfo* eventInfo, void* userData);
214 
224 typedef int (*Sgc_CameraEventCallbackFunc_t)(SgcCameraHandle *cameraHandle, const SgcEventInfo * eventInfo, void* userData);
225 
229 #define PORTMASK0 1
230 #define PORTMASK1 2
231 #define PORTMASK2 4
232 #define PORTMASK3 8
237 #define LINK_SPEED_NONE 0
238 #define LINK_SPEED_1250 1250
239 #define LINK_SPEED_2500 2500
240 #define LINK_SPEED_3125 3125
241 #define LINK_SPEED_5000 5000
242 #define LINK_SPEED_6250 6250
243 #define LINK_SPEED_10000 10000
244 #define LINK_SPEED_12500 12500
249 #define CXP_SPEED_NONE LINK_SPEED_NONE
250 #define CXP_SPEED_1250 LINK_SPEED_1250
251 #define CXP_SPEED_2500 LINK_SPEED_2500
252 #define CXP_SPEED_3125 LINK_SPEED_3125
253 #define CXP_SPEED_5000 LINK_SPEED_5000
254 #define CXP_SPEED_6250 LINK_SPEED_6250
255 #define CXP_SPEED_10000 LINK_SPEED_10000
256 #define CXP_SPEED_12500 LINK_SPEED_12500
265 #define PROP_SET_LINK_CONFIG_FREQ_S "SET_LINK_CONFIG_FREQ"
266 #define PROP_SET_STREAM_PAKET_SIZE_S "SET_STREAM_PAKET_SIZE"
271 #define BOARD_PROP_CXP_POWERSENSE "CxpPowerSense"
272 #define BOARD_PROP_CXP_POWERVIN "CxpPowerVin"
273 #define BOARD_PROP_CXP_AUX_TEMP "CxpPowerAdIn"
274 #define BOARD_PROP_CXP_POWERSTATUS "CxpPowerStatus"
275 #define BOARD_PROP_CXP_TRANSCEIVER_NOT_IN_TABLE "CxpTransceiverNotInTable"
276 #define BOARD_PROP_CXP_TRANSCEIVER_DISPARITY_ERROR "CxpTransceiverDisparityError"
277 #define BOARD_PROP_CLHS_FEC_ENABLE "CLHSFecEnable"
278 #define BOARD_PROP_CLHS_SEND_REVISION_MESSAGE "CLHSSendRevisionMessage"
279 #define BOARD_PROP_CLHS_READ_MDIO "CLHSReadMDIO"
280 #define BOARD_PROP_CLHS_WRITE_MDIO "CLHSWriteMDIO"
281 #define BOARD_PROP_CLHS_LINK_STATE "CLHSLinkState"
282 #define BOARD_PROP_CLHS_LINK_DETECTION_ENABLE "CLHSLinkDetectionEnable"
283 #define BOARD_PROP_NR_OF_CAMERAS "NrOfCameras"
284 #define BOARD_PROP_TRANSCEIVERS_LOCKED_MASK "TransceiversLockedMask"
285 #define BOARD_PROP_NR_OF_PORTS "NrOfPorts"
286 #define BOARD_PROP_MAGIC_VALUE "MagicValue"
287 #define BOARD_PROP_REVISION "CameraRevision"
288 #define BOARD_PROP_LINKCONFIG "LinkConfig"
289 #define BOARD_PROP_CAMPORT "CamPort"
291 #define BOARD_PROP_GBE_NR_LINKS "GbeNrLinks"
292 #define BOARD_PROP_GBE_MASK_LINKS "GbeMaskLinks"
293 #define BOARD_PROP_GBE_AGGREG_TYPE "GbeAggregLinks"
294 #define BOARD_PROP_GBE_ALGORITHM "GbeAlgorithm"
295 #define BOARD_PROP_GBE_MAC_SOURCE "GbeMacSource"
296 #define BOARD_PROP_GBE_IP_SOURCE "GbeIpSource"
297 #define BOARD_PROP_GBE_IP_STATIC "GbeIpStatic"
298 #define BOARD_PROP_GBE_MAC_DEST "GbeMacDest"
299 #define BOARD_PROP_GBE_IP_DEST "GbeIpDest"
300 #define BOARD_PROP_GBE_DHCP "GbeDHCP"
301 #define BOARD_PROP_GBE_AUTO_IP "GbeAutoIp"
302 #define BOARD_PROP_GBE_RESTART_IP "GbeRestartIp"
303 #define BOARD_PROP_GBE_SET_CCP "GbeCCP"
305 #define BOARD_PROP_GBE_TIMEOUT "GbeTimeOut"
306 #define BOARD_PROP_GBE_DEVMODE "GbeDevMode"
307 #define BOARD_PROP_GBE_CONF_OPT "GbeConfOpt"
308 #define BOARD_PROP_GBE_CONF_CUR "GbeConfCur"
309 #define BOARD_PROP_GBE_GVCP_VER "GbeGvcpVer"
310 #define BOARD_PROP_GBE_ACTION_CMD "GbeActionCmd"
311 #define BOARD_PROP_GBE_NR_NET_INTF "GbeNrNetIntf"
312 #define BOARD_PROP_GBE_STREAM_CH "GbeStreamCh"
313 #define BOARD_PROP_GBE_NR_MSG_CH "GbeNrMsgCh"
314 #define BOARD_PROP_GBE_ACTION_SGN "GbeActionSgn"
315 #define BOARD_PROP_GBE_GVCP_CONF "GbeGvcpConf"
316 #define BOARD_PROP_GBE_STREAM_CHANNEL "GbeStreamChannel"
317 #define BOARD_PROP_GBE_CL_SYNC_LEN "GbeCLSyncLen"
318 #define BOARD_PROP_GBE_EXTEND_ID "GbeCLExtendID"
323 enum SgcPowerStatus {
335 };
336 
340 #define CAM_PROP_STREAMPACKETSIZE "StreamPacketSize"
341 #define CAM_PROP_CONTROLPACKETSIZE "ControlPacketSize"
342 #define CAM_PROP_LINKSPEED "LinkSpeed"
343 #define CAM_PROP_DISCOVERYSPEED "DiscoverySpeed"
344 #define CAM_PROP_ISCONNECTED "Connected"
345 #define CAM_PROP_NROFLINKS "NrOfLinks"
346 #define CAM_PROP_ISGENICAMCONNECTED "IsGenICamConnected"
347 #define CAM_PROP_MASTERLINK "MasterLink"
348 #define CAM_PROP_MASTERPORT "MasterPort"
349 #define CAM_PROP_MASTERID "MasterID"
350 #define CAM_PROP_FGPORT "FgPort"
351 #define CAM_PROP_APPLETPORT "AppletPort"
352 #define CAM_PROP_APPLETMASTERID "AppletMasterID"
353 #define CAM_PROP_APPLETOPERATORINDEX "AppletOperatorIndex"
354 #define CAM_PROP_APPLETOPERATORSIZE "AppletOperatorSize"
355 #define CAM_PROP_ISTRANSCEIVERLOCKED "IsTransceiverLocked"
356 #define CAM_PROP_LINKCONFIG "LinkConfig"
357 #define CAM_PROP_XML_DATA "XmlData"
358 #define CAM_PROP_VENDOR_NAME "VendorName"
359 #define CAM_PROP_MODEL_NAME "ModelName"
360 #define CAM_PROP_FAMILY_NAME "FamilyName"
361 #define CAM_PROP_VERSION "Version"
362 #define CAM_PROP_FIRMWARE_VERSION "FirmwareVersion"
363 #define CAM_PROP_MANUFACTURER_INFO "ManufacturerInfo"
364 #define CAM_PROP_SERIAL_NUMBER "SerialNumber"
365 #define CAM_PROP_USER_ID "UserID"
367 /* These defines are deprecated and kept for backwards code compatibility; use the defines without _S */
368 #define CAM_PROP_STREAMPACKET_SIZE_S CAM_PROP_STREAMPACKETSIZE
369 #define CAM_PROP_STREAMPACKETSIZE_S CAM_PROP_STREAMPACKETSIZE
370 #define CAM_PROP_CONTROLPACKETSIZE_S CAM_PROP_CONTROLPACKETSIZE
371 #define CAM_PROP_LINKSPEED_S CAM_PROP_LINKSPEED
372 #define CAM_PROP_DISCOVERYSPEED_S CAM_PROP_DISCOVERYSPEED
373 #define CAM_PROP_ISCONNECTED_S CAM_PROP_ISCONNECTED
374 #define CAM_PROP_NROFLINKS_S CAM_PROP_NROFLINKS
375 #define CAM_PROP_ISGENICAMCONNECTED_S CAM_PROP_ISGENICAMCONNECTED
376 #define CAM_PROP_MASTERPORT_S CAM_PROP_MASTERPORT
377 #define CAM_PROP_MASTERLINK_S CAM_PROP_MASTERLINK
378 #define CAM_PROP_EXTENSIONLINK_S "EXTENSIONLINK"
379 #define CAM_PROP_MASTERID_S CAM_PROP_MASTERID
380 #define CAM_PROP_LINKORDER_INDEX_S "LINKORDERINDEX"
381 #define CAM_PROP_FGPORT_S CAM_PROP_FGPORT
382 #define CAM_PROP_APPLETPORT_S CAM_PROP_APPLETPORT
383 #define CAM_PROP_APPLETMASTERID_S CAM_PROP_APPLETMASTERID
384 #define CAM_PROP_APPLETEXTENSIONID_S "APPLETLINKORDERINDEX"
385 #define CAM_PROP_ISTRANSCEIVERLOCKED_S CAM_PROP_ISTRANSCEIVERLOCKED
386 #define CAM_PROP_LINKCONFIG_S CAM_PROP_LINKCONFIG
387 
391 #define SGC_INIT_FLAG_FORCE_PHY_RESET 0x01
393 #ifdef __cplusplus
394 extern "C"
395 {
396 #endif
397 
413  int Sgc_initBoard(Fg_Struct* fg, unsigned int initFlag, SgcBoardHandle** boardHandle);
414 
433  int Sgc_initBoardEx(Fg_Struct* fg, unsigned int initFlag, SgcBoardHandle** boardHandle, unsigned int portMask, unsigned int slaveMode);
434 
440  void Sgc_freeBoard(SgcBoardHandle* boardHandle);
441 
463  int Sgc_scanPorts(SgcBoardHandle* boardHandle, const unsigned int portMask, const int discoveryTimeout, const int speed);
464 
487  int Sgc_scanPortsEx(SgcBoardHandle* boardHandle, const unsigned int portMask, const int discoveryTimeout, const int speed, const unsigned int flags);
488 
502  int Sgc_getCameraCount(SgcBoardHandle* boardHandle);
503 
510  unsigned int Sgc_isCameraAvailableAtIndex(SgcBoardHandle* boardHandle, const unsigned int index);
511 
532  int Sgc_getCameraByIndex(SgcBoardHandle* boardHandle, const unsigned int index, SgcCameraHandle** cameraHandle);
533 
540  unsigned int Sgc_isCameraAvailable(SgcBoardHandle* boardHandle, const unsigned int port);
541 
551  int Sgc_getCamera(SgcBoardHandle* boardHandle, const unsigned int port, SgcCameraHandle** cameraHandle);
552 
567 
584  int Sgc_loadCameraXml(SgcCameraHandle* cameraHandle);
585 
601  int Sgc_connectCamera(SgcCameraHandle* cameraHandle);
614  int Sgc_connectCameraWithExternalXml(SgcCameraHandle* cameraHandle, const char* filename);
615 
623  int Sgc_disconnectCamera(SgcCameraHandle* cameraHandle);
624 
645  int Sgc_powerSwitch(SgcBoardHandle* boardHandle, const unsigned int portMask);
646 
665  int Sgc_powerSwitchExt(SgcBoardHandle *boardHandle, const unsigned int portMask, const unsigned int command);
666 
680  int DEPRECATED(Sgc_RegisterEventCallback(SgcBoardHandle *boardHandle, SgcEventCallback_t eventHandler, void* userData));
681 
695  int Sgc_registerBoardEventCallback(SgcBoardHandle* board_handle, Sgc_BoardEventCallbackFunc_t eventHandler, void* userData);
696 
710  int Sgc_registerCameraEventCallback(SgcCameraHandle* camera_handle, Sgc_CameraEventCallbackFunc_t eventHandler, void* userData);
711 
728  int Sgc_setIntegerValue(SgcCameraHandle* cameraHandle, const char* featureName, int64_t value);
729 
746  int Sgc_getIntegerValue(SgcCameraHandle* cameraHandle, const char* featureName, int64_t* valuePtr);
747 
763  int Sgc_setBooleanValue(SgcCameraHandle* cameraHandle, const char* featureName, unsigned int value);
764 
780  int Sgc_getBooleanValue(SgcCameraHandle* cameraHandle, const char* featureName, unsigned int* valuePtr);
781 
795  int Sgc_setFloatValue(SgcCameraHandle* cameraHandle, const char* featureName, double value);
796 
810  int Sgc_getFloatValue(SgcCameraHandle* cameraHandle, const char* featureName, double* valuePtr);
811 
830  int Sgc_setStringValue(SgcCameraHandle* cameraHandle, const char* featureName, const char* value);
831 
848  int Sgc_getStringValue(SgcCameraHandle* cameraHandle, const char* featureName, const char** valuePtr);
849 
865  int Sgc_setEnumerationValue(SgcCameraHandle* cameraHandle, const char* featureName, const char* value);
866 
882  int Sgc_getEnumerationValue(SgcCameraHandle* cameraHandle, const char* featureName, int64_t* value);
883 
899  int Sgc_getEnumerationValueAsString(SgcCameraHandle* cameraHandle, const char* featureName, const char** valuePtr);
900 
913  int Sgc_clearStringCache(SgcCameraHandle* cameraHandle);
914 
926  int Sgc_executeCommand(SgcCameraHandle* cameraHandle, const char* featureName);
927 
940  int Sgc_isCommandDone(SgcCameraHandle* cameraHandle, const char* featureName, unsigned int* valuePtr);
941 
957  int Sgc_startAcquisition(SgcCameraHandle* cameraHandle, unsigned int startCamera);
958 
969  int Sgc_stopAcquisition(SgcCameraHandle* cameraHandle, unsigned int stopCamera);
970 
983  int Sgc_getGenICamXML(SgcCameraHandle* cameraHandle, char* buffer, size_t* bufferSize);
984 
997  int Sgc_setGenICamXML(SgcCameraHandle* cameraHandle, const char* buffer, const size_t bufferSize);
998 
1009  const char* Sgc_getErrorDescription(const int errorCode);
1010 
1027  int Sgc_registerReadFromCamera(SgcCameraHandle* cameraHandle, uint32_t* data, uint64_t address);
1028 
1045  int Sgc_registerWriteToCamera(SgcCameraHandle* cameraHandle, uint32_t data, uint64_t address);
1046 
1063  int Sgc_stringReadFromCamera(SgcCameraHandle* cameraHandle, char* data, uint64_t address, unsigned int length);
1064 
1070  int Sgc_memoryReadFromCamera(SgcCameraHandle* cameraHandle, void* buffer, uint64_t address, size_t length);
1071 
1077  int Sgc_memoryWriteToCamera(SgcCameraHandle* cameraHandle, const void* buffer, uint64_t address, size_t length);
1078 
1099  int Sgc_memoryReadFromCameraWithTimeout(SgcCameraHandle* cameraHandle, void* buffer, uint64_t address, size_t length, uint32_t timeoutInMilliseconds);
1100 
1119  int Sgc_memoryWriteToCameraWithTimeout(SgcCameraHandle* cameraHandle, const void* buffer, uint64_t address, size_t length, uint32_t timeoutInMilliseconds);
1120 
1147  int Sgc_getCameraPropertyWithType(SgcCameraHandle* cameraHandle, const char* propertyName, void* value, unsigned int* propertyType, void* additionalValue);
1148 
1175  int Sgc_setCameraPropertyWithType(SgcCameraHandle* cameraHandle, const char* propertyName, const void* value, unsigned int propertyType, void* additionalValue);
1176 
1201  int Sgc_setBoardPropertyWithType(SgcBoardHandle* boardHandle, const char* propertyName, const void* propertyValuePtr, unsigned int propertyType, void* additionalValue);
1202 
1228  int Sgc_getBoardPropertyWithType(SgcBoardHandle* boardHandle, const char* propertyName, const void* value, unsigned int propertyType, const void* additionalValue);
1229 
1237  int DEPRECATED(Sgc_CxpConnect(SgcBoardHandle* boardHandle, SgcCameraHandle* cameraHandle));
1238 
1246  int DEPRECATED(Sgc_CxpDisconnect(SgcCameraHandle* cameraHandle));
1247 
1266  int Sgc_LinkConnect(SgcBoardHandle* boardHandle, SgcCameraHandle* cameraHandle);
1267 
1279  int Sgc_LinkDisconnect(SgcCameraHandle* cameraHandle);
1280 
1288  int DEPRECATED(Sgc_DirectRegisterRead(SgcBoardHandle* boardHandle, const unsigned int port, const uint32_t address, uint32_t* data));
1289 
1304  int Sgc_DirectRegisterRead64(SgcBoardHandle* boardHandle, const unsigned int port, const uint64_t address, uint32_t* data);
1305 
1313  int DEPRECATED(Sgc_DirectRegisterWrite(SgcBoardHandle* boardHandle, const unsigned int port, const uint32_t address, const uint32_t data, const unsigned int switchByteOrder));
1314 
1331  int Sgc_DirectRegisterWrite64(SgcBoardHandle* boardHandle, const unsigned int port, const uint64_t address, const uint32_t data, const unsigned int switchByteOrder);
1332 
1340  int DEPRECATED(Sgc_DirectRegisterReadMem(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, unsigned char* data, uint32_t* buflen));
1341 
1358  int Sgc_DirectRegisterReadMem64(SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, unsigned char* data, uint32_t* buflen);
1359 
1367  int DEPRECATED(Sgc_DirectRegisterWriteMem(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, const unsigned char* data, const uint32_t buflen ));
1368 
1385  int Sgc_DirectRegisterWriteMem64(SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, const unsigned char* data, const uint32_t buflen );
1386 
1394  int DEPRECATED(Sgc_DirectRegisterReadMemWithTimeOut(SgcBoardHandle *boardHandle, const unsigned int port, const uint32_t address, unsigned char* data, uint32_t* buflen, uint32_t timeoutInMilliseconds));
1395 
1413  int Sgc_DirectRegisterReadMemWithTimeOut64(SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, unsigned char* data, uint32_t* buflen, uint32_t timeoutInMilliseconds);
1414 
1422  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));
1423 
1443  int Sgc_DirectRegisterWriteMemWithTimeOut64(SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, const unsigned char* data, const uint32_t buflen, uint32_t timeoutInMilliseconds);
1444 
1469  int Sgc_SaveBoardConfiguration(SgcBoardHandle* board_handle, const char* configFileName);
1470 
1494  int Sgc_LoadBoardConfiguration(SgcBoardHandle* board_handle, const char* configFileName);
1495 
1514  int Sgc_SaveCameraParameters(SgcCameraHandle* cameraHandle, const char* paramFileName, uint32_t flags);
1515 
1532  int Sgc_LoadCameraParameters(SgcCameraHandle* cameraHandle, const char* paramFileName, uint32_t flags);
1533 
1550 int Sgc_LoadConnectionProfile(Fg_Struct* fg, const char* boardConfigurationFilePath, SgcConnectionProfile** connectionProfilePtr);
1551 
1564 int Sgc_UnloadConnectionProfile(SgcConnectionProfile* connectionProfile);
1565 
1579 int Sgc_StoreLowLevelLinkProfile(SgcBoardHandle* boardHandle, const char* file);
1580 
1596 int Sgc_RestoreLowLevelLinkProfile(SgcBoardHandle* boardHandle, const char* file);
1597 
1609 int Sgc_updateCameraInfos(SgcCameraHandle* cameraHandle);
1610 
1611 /* INTERNAL FUNCTIONS*/
1616 int Sgc_callInternalFunction(int id, const void* const in, void* const out);
1617 
1619 #define SISO_INTERNAL_FUNCTION__RESET_PHY 1
1620 #define SISO_INTERNAL_FUNCTION__ENABLE_LOGGING 2
1621 #define SISO_INTERNAL_FUNCTION__ENABLE_PROFILING 3
1622 
1623 #ifdef __cplusplus
1624 }
1625 #endif
1626 #endif
int Sgc_getEnumerationValueAsString(SgcCameraHandle *cameraHandle, const char *featureName, const char **valuePtr)
Read GenICam string representation of enumeration value from camera.
struct SgcBoardHandle SgcBoardHandle
Definition: siso_genicam.h:23
Error codes returned by the library siso_genicam.
uint32_t properties_int_count
Definition: siso_genicam.h:131
data structure for events received from the board callback functions
Definition: siso_genicam.h:156
int Sgc_registerBoardEventCallback(SgcBoardHandle *board_handle, Sgc_BoardEventCallbackFunc_t eventHandler, void *userData)
Register an callback procedure for board event notifications.
int Sgc_connectCameraWithExternalXml(SgcCameraHandle *cameraHandle, const char *filename)
Connect to Camera by using a certain GenICam XML File from the hard disk.
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_getStringValue(SgcCameraHandle *cameraHandle, const char *featureName, const char **valuePtr)
Read GenICam string value from camera.
struct SgcCameraHandle SgcCameraHandle
Definition: siso_genicam.h:25
int Sgc_LoadConnectionProfile(Fg_Struct *fg, const char *boardConfigurationFilePath, SgcConnectionProfile **connectionProfilePtr)
load a connection profile
int Sgc_getFloatValue(SgcCameraHandle *cameraHandle, const char *featureName, double *valuePtr)
Read GenICam floating point value at camera.
Definition: siso_genicam.h:120
char ** properties_string_key
Definition: siso_genicam.h:135
structure for camera information
Definition: siso_genicam.h:33
unsigned int Sgc_isCameraAvailable(SgcBoardHandle *boardHandle, const unsigned int port)
Check for camera.
SgcEventData_ConnectionLost camera_connection_lost
Definition: siso_genicam.h:140
Definition: siso_genicam.h:325
const char * deviceModelName
Definition: siso_genicam.h:36
uint16_t eventID
Definition: siso_genicam.h:158
int DEPRECATED(Sgc_RegisterEventCallback(SgcBoardHandle *boardHandle, SgcEventCallback_t eventHandler, void *userData))
Register an callback procedure for event notifications.
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_clearStringCache(SgcCameraHandle *cameraHandle)
Clear the internal cache for GenICam string representations.
int Sgc_StoreLowLevelLinkProfile(SgcBoardHandle *boardHandle, const char *file)
store current low level link profile into file
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_getBooleanValue(SgcCameraHandle *cameraHandle, const char *featureName, unsigned int *valuePtr)
Read GenICam boolean value at camera.
struct SgcCameraInfo SgcCameraInfo
structure for camera information
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
Definition: siso_genicam.h:327
int Sgc_getEnumerationValue(SgcCameraHandle *cameraHandle, const char *featureName, int64_t *value)
Read GenICam integer representation of enumeration value from camera.
int Sgc_setIntegerValue(SgcCameraHandle *cameraHandle, const char *featureName, int64_t value)
Set GenICam Integer value at camera.
int Sgc_UnloadConnectionProfile(SgcConnectionProfile *connectionProfile)
unload a connection profile
Definition: siso_genicam.h:334
int Sgc_isCommandDone(SgcCameraHandle *cameraHandle, const char *featureName, unsigned int *valuePtr)
Check, if a GenICam command is performed completely.
Definition: siso_genicam.h:333
uint32_t * properties_int_value
Definition: siso_genicam.h:133
int Sgc_setBoardPropertyWithType(SgcBoardHandle *boardHandle, const char *propertyName, const void *propertyValuePtr, unsigned int propertyType, void *additionalValue)
set global board properties
Definition: siso_genicam.h:139
SgcCameraInfo * Sgc_getCameraInfo(SgcCameraHandle *cameraHandle)
get manufacturer information from connected 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_powerSwitch(SgcBoardHandle *boardHandle, const unsigned int portMask)
switch on Power over CoaxPress/CameraLink/...
int Sgc_LinkDisconnect(SgcCameraHandle *cameraHandle)
disconnects a camera handle from a GenICam capable camera
data structure representing the state of a loaded connection profile
Definition: siso_genicam.h:169
const char * Sgc_getErrorDescription(const int errorCode)
returns a descriptive text for the error code
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...
int Sgc_RestoreLowLevelLinkProfile(SgcBoardHandle *boardHandle, const char *file)
restore low level link profile from file to board
int Sgc_LinkConnect(SgcBoardHandle *boardHandle, SgcCameraHandle *cameraHandle)
connects a camera handle a GenICam capable camera
int Sgc_LoadBoardConfiguration(SgcBoardHandle *board_handle, const char *configFileName)
load connection parameters from a file
int Sgc_getBoardPropertyWithType(SgcBoardHandle *boardHandle, const char *propertyName, const void *value, unsigned int propertyType, const void *additionalValue)
get a global board property
unsigned int Sgc_isCameraAvailableAtIndex(SgcBoardHandle *boardHandle, const unsigned int index)
Check for camera.
char ** properties_int_key
Definition: siso_genicam.h:132
SgcEventData_LinkConnectionStateChanged link_connection_state_changed
Definition: siso_genicam.h:141
Definition: siso_genicam.h:129
int Sgc_setBooleanValue(SgcCameraHandle *cameraHandle, const char *featureName, unsigned int value)
Set GenICam boolean value at 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
Definition: siso_genicam.h:328
int Sgc_registerCameraEventCallback(SgcCameraHandle *camera_handle, Sgc_CameraEventCallbackFunc_t eventHandler, void *userData)
Register an callback procedure for camera event notifications.
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_SaveBoardConfiguration(SgcBoardHandle *board_handle, const char *configFileName)
save connection parameters of the board to a file
Definition: siso_genicam.h:329
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.
uint32_t properties_string_count
Definition: siso_genicam.h:134
int Sgc_loadCameraXml(SgcCameraHandle *cameraHandle)
Downloading the cameras internal GenICam XML file. A call of this function with a connectToGenAPI set...
SgcCameraHandle ** cameraHandles
Definition: siso_genicam.h:172
void Sgc_freeBoard(SgcBoardHandle *boardHandle)
Release resources allocated by Sgc_initBoard.
Definition: siso_genicam.h:330
int Sgc_setGenICamXML(SgcCameraHandle *cameraHandle, const char *buffer, const size_t bufferSize)
sets the currently GenICam-XML from a buffer
uint32_t id
Definition: siso_genicam.h:130
int Sgc_updateCameraInfos(SgcCameraHandle *cameraHandle)
update the informations of the camera handle
uint32_t cameraIndex
Definition: siso_genicam.h:121
int Sgc_getIntegerValue(SgcCameraHandle *cameraHandle, const char *featureName, int64_t *valuePtr)
Read GenICam Integer value from camera.
Definition: siso_genicam.h:324
SgcCameraInfo ** cameraInfos
Definition: siso_genicam.h:173
int Sgc_registerReadFromCamera(SgcCameraHandle *cameraHandle, uint32_t *data, uint64_t address)
read a 32 bit integer value from a camera register
Definition: siso_genicam.h:332
int Sgc_getCameraCount(SgcBoardHandle *boardHandle)
get number of the currently detected cameras
const char * deviceUserId
Definition: siso_genicam.h:42
int Sgc_powerSwitchExt(SgcBoardHandle *boardHandle, const unsigned int portMask, const unsigned int command)
switch on Power over CoaxPress
int Sgc_getCameraByIndex(SgcBoardHandle *boardHandle, const unsigned int index, SgcCameraHandle **cameraHandle)
get a handle of the currently detected cameras
int Sgc_connectCamera(SgcCameraHandle *cameraHandle)
Connect to camera by downloading the cameras internal GenICam XML file A call of this function is nec...
Definition: siso_genicam.h:326
const char * deviceFirmwareVersion
Definition: siso_genicam.h:39
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.
const char * deviceManufacturerInfo
Definition: siso_genicam.h:40
struct declarations.
int cameraCount
Definition: siso_genicam.h:171
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_setStringValue(SgcCameraHandle *cameraHandle, const char *featureName, const char *value)
Set GenICam string value at camera.
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_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_LoadCameraParameters(SgcCameraHandle *cameraHandle, const char *paramFileName, uint32_t flags)
load the current camera parameters from a 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 ...
int Sgc_getCameraPropertyWithType(SgcCameraHandle *cameraHandle, const char *propertyName, void *value, unsigned int *propertyType, void *additionalValue)
get camera specific properties
const char * deviceSerialNumber
Definition: siso_genicam.h:41
const char * deviceVersion
Definition: siso_genicam.h:38
SgcBoardHandle * boardHandle
Definition: siso_genicam.h:170
int(* Sgc_BoardEventCallbackFunc_t)(SgcBoardHandle *boardHandle, const SgcEventInfo *eventInfo, void *userData)
prototype of board event callback procedure
Definition: siso_genicam.h:213
struct SgcEventInfo SgcEventInfo
data structure for events received from the board callback functions
int Sgc_disconnectCamera(SgcCameraHandle *cameraHandle)
Disconnect from camera.
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_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
SgcEventData data
Definition: siso_genicam.h:160
int Sgc_executeCommand(SgcCameraHandle *cameraHandle, const char *featureName)
Execute a certain GenICam command at the camera.
int * cameraConnectionStates
Definition: siso_genicam.h:174
int Sgc_DirectRegisterRead64(SgcBoardHandle *boardHandle, const unsigned int port, const uint64_t address, uint32_t *data)
reads an integer value to the camera
struct SgcConnectionProfile SgcConnectionProfile
data structure representing the state of a loaded connection profile
Definition: siso_genicam.h:331
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.
char ** properties_string_value
Definition: siso_genicam.h:136
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_callInternalFunction(int id, const void *const in, void *const out)
int Sgc_SaveCameraParameters(SgcCameraHandle *cameraHandle, const char *paramFileName, uint32_t flags)
save the current camera parameters to a file
int Sgc_registerWriteToCamera(SgcCameraHandle *cameraHandle, uint32_t data, uint64_t address)
write a 32 bit integer value to a camera register
const char * deviceVendorName
Definition: siso_genicam.h:35
struct Fg_Struct_s Fg_Struct
The structure for a framegrabber.
Definition: fgrab_struct.h:152
int(* Sgc_CameraEventCallbackFunc_t)(SgcCameraHandle *cameraHandle, const SgcEventInfo *eventInfo, void *userData)
prototype of camera event callback procedure
Definition: siso_genicam.h:224
const char * deviceFamilyName
Definition: siso_genicam.h:37
int(* SgcEventCallback_t)(SgcBoardHandle *boardHandle, SgcCameraHandle *cameraHandle, const SgcEventInfo *const eventInfo, const void *userData)
prototype of event callback procedure
Definition: siso_genicam.h:202
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.
SgcEventData_DiscoveryStateChanged discovery_state
Definition: siso_genicam.h:142
int Sgc_getGenICamXML(SgcCameraHandle *cameraHandle, char *buffer, size_t *bufferSize)
returns the currently loaded GenICam-XML