Get in touch with us today and our team of imaging professionals will be pleased to assist you.
The eSDK API offers the following camera control and connection functions:
For information about other eSDK API functions, see the eSDK API Functions Overview.
EVT_CameraOpenDescription: Opens the EVT camera.
Prototype:
EVT_ERROR EVT_CameraOpen(
CEmergentCamera* camera,
GigEVisionDeviceInfo* deviceInfo,
const char* xmlFileName = NULL
);
Parameters:
camera: Camera handle.deviceInfo: Handle to a GigEVisionDeviceInfo structure.xmlFileName: Local camera XML file. Omit or pass NULL to use in-camera XML file.Return Values:
EVT_SUCCESSEVT_ERROR_DEVICE_CONNECTED_ALRDEVT_ERROR_INVALEVT_ERROR_NOMEMEVT_ERROR_SOCKEVT_ERROR_GVCP_ACKEVT_GENERAL_ERRORUsage Example:
EVT_CameraOpen(camera, deviceInfo, "camera.xml");Note: Always call EVT_CameraClose() to close the camera when finished.EVT_CameraCloseDescription: Closes the EVT camera.
Prototype:
EVT_ERROR EVT_CameraClose(
CEmergentCamera* camera
);
Parameters:
camera: Camera handle.Return Values:
EVT_SUCCESSEVT_ERROR_DEVICE_NOT_CONNECTEDEVT_ERROR_SRCHEVT_ERROR_GENICAM_ERROREVT_ERROR_SOCKEVT_ERROR_GVCP_ACKEVT_GENERAL_ERRORUsage Example:
EVT_CameraClose(camera);Note: Always open the camera using EVT_CameraOpen() before calling this function.EVT_CameraOpenStreamDescription: Opens a stream channel on the host side.
Prototype:
EVT_ERROR EVT_CameraOpenStream(
CEmergentCamera* camera
);
Parameters:
camera: Camera handle.Return Values:
EVT_SUCCESSEVT_ERROR_DEVICE_NOT_CONNECTEDEVT_ERROR_SOCKEVT_ERROR_GVCP_ACKEVT_ERROR_MYRICOM_INITEVT_ERROR_INVALEVT_GENERAL_ERRORUsage Example:
EVT_CameraOpenStream(camera);
EVT_CameraCloseStreamDescription: Closes the stream channel on the host side.
Prototype:
EVT_ERROR EVT_CameraCloseStream(
CEmergentCamera* camera
);
Parameters:
camera: Camera handle.Return Values:
EVT_SUCCESSEVT_GENERAL_ERRORUsage Example:
EVT_CameraCloseStream(camera);
EVT_CameraExecuteCommandDescription: Executes a command attribute.
Prototype:
EVT_ERROR EVT_CameraExecuteCommand(
CEmergentCamera* camera,
const char* name
);
Parameters:
camera: Camera handle.name: Command attribute to be executed.Return Values:
EVT_SUCCESSEVT_ERROR_DEVICE_NOT_CONNECTEDEVT_ERROR_SRCHEVT_ERROR_GENICAM_ERROREVT_ERROR_SOCKEVT_ERROR_GVCP_ACKEVT_GENERAL_ERRORUsage Example:
EVT_CameraExecuteCommand(camera, "AcquisitionStart");
EVT_ListDevicesDescription: Lists all devices connected to Ethernet ports and fills in deviceInfo for each.
Prototype:
EVT_ERROR EVT_ListDevices(
GigEVisionDeviceInfo* deviceInfo,
unsigned int* bufSize,
unsigned int* actualNum,
const ListDevicesSettings* settings = 0
);
Parameters:
deviceInfo: Pointer to an array of GigEVisionDeviceInfo objects.bufSize: Number of devices in the system.actualNum: Number of devices actually found.settings: Struct variable for discovery timeout settings.Return Values:
EVT_SUCCESSEVT_ERROR_OS_OBTAIN_ADAPTEREVT_GENERAL_ERRORUsage Example:
GigEVisionDeviceInfo deviceList[10];
unsigned int bufSize = 10;
unsigned int actualNum;
EVT_ListDevices(deviceList, &bufSize, &actualNum, &settings);
EVT_ForceRebootDescription: Reboots a specified camera by sending a force reboot command.
Prototype:
EVT_ERROR EVT_ForceReboot(
const char* macAddressSn,
const char* cameraIP = NULL
);
Parameters:
macAddressSn: Specifies the camera using its MAC address or serial number. A MAC address is a string of six hexadecimal pairs delimited by '-', such as e0-55-97-06-1a-fb. A serial number is a string of decimal digits, such as 400123.cameraIP (optional): Specifies the current IP address of the camera. If NULL, the reboot command is broadcast. If provided, the command is sent via unicast to the specified IP.Return Values:
EVT_SUCCESSEVT_ERROR_INVALEVT_ERROR_SOCKUsage Examples:
// Reboot a camera using its MAC address via broadcast
EVT_ForceReboot("e0-55-97-06-1a-fb", NULL);
// Reboot a camera using its MAC address via unicast to a specific IP
EVT_ForceReboot("e0-55-97-06-1a-fb", "192.168.1.100");
Get in touch with us today and our team of imaging professionals will be pleased to assist you.