检测流程跑通

master
bob.pan 5 years ago
parent 13785f3d5a
commit 6a06b4a876

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigFile VendorName="Baumer" MajorVersion="2" MinorVersion="2" SubMinorVersion="0">
<FileVersion>2.2.0.0</FileVersion>
<Resend>
<Version>1</Version>
<Version1>
<!--Set the maximum number of resend requests per image (default 500)-->
<MaxResendsPerImage>500</MaxResendsPerImage>
<!--Set the maximum number of resend requests per packet (default 3)-->
<MaxResendsPerPacket>3</MaxResendsPerPacket>
<!--Set the number of packets to wait befor sending the first resend requests (default 0)-->
<FirstResendWaitPackets>0</FirstResendWaitPackets>
<!--Set the number of packets to wait befor sending the first resend requests if the camera sends the data over two physical links (default 20)-->
<FirstResendWaitPacketsDualLink>20</FirstResendWaitPacketsDualLink>
<!--Set the time in ms to wait befor sending the first resend requests (default 150)-->
<FirstResendWaitTime>150</FirstResendWaitTime>
<!--Set the number of packets to wait befor sending the next resend requests (default 20)-->
<NextResendWaitPackets>20</NextResendWaitPackets>
<!--Set the number of packets to wait befor sending the next resend requests if the camera sends the data over two physical links (default 20)-->
<NextResendWaitPacketsDualLink>20</NextResendWaitPacketsDualLink>
<!--Set the time in ms to wait befor sending the next resend requests (default 100)-->
<NextResendWaitTime>100</NextResendWaitTime>
</Version1>
</Resend>
<GVCP>
<!--Set Timeout (in ms) and number of retrys for control channel
0 = the pending timeout register of camera is used for control channel timeout (default)
1..60000 = timeout value
-->
<ControlChannelTimeout>0</ControlChannelTimeout>
<!--The number of retries of commands on the control channel before the GigE Producer stops sending any further commands
valid values: 0..4294967295 (0xffffffff)
default value: 3
-->
<ControlChannelRetries>3</ControlChannelRetries>
<!--After a failed command the control channel is locked, that means no further commands were transmitted. This feature controls this locking mechanism.
valid values: 1 - the GigE Producer locks the control channel after a failing command. No further command were transmitted.
0 - the GigE Producer doesn't lock the control channel after a failing command. All further commands were transmitted.
default value: 1
-->
<UseControlChannelLocking>1</UseControlChannelLocking>
<!--Set Timeout(in ms) and number of retrys for asynchron messages from the camera (if supported) -->
<MessageChannelTimeout>100</MessageChannelTimeout>
<MessageChannelRetries>2</MessageChannelRetries>
</GVCP>
<GEV>
<!--Maximum packet size for GigE transmission. This value is used as upper limitation for
automatic MTU (maximum transmission unit) detection. Set this value to 0 the MTU detection
uses the preferred maximum of 9000. The smallest possible value is 576 and the higest value is 16380.
If you set a value outside this range the preferred maximum of 9000 is used. (default 9000)
-->
<DeviceStreamChannelPacketSizeMax>9000</DeviceStreamChannelPacketSizeMax>
<!--
0 means enable automatic MTU (maximum transmission unit) detection. If you specify this value the
MTU detection is disabled and the value DeviceStreamChannelPacketSizeMax is ignored.
The specified value is used directly as packet size.
The smallest possible value is 576 and the higest value is 16380. If you set a value outside the range
the minimum packet size of 576 is used.
-->
<DeviceStreamChannelPacketSizeFix>0</DeviceStreamChannelPacketSizeFix>
</GEV>
<SYSTEM>
<IncreaseThreadPriority>0</IncreaseThreadPriority>
<IncreasePriorityClass>0</IncreasePriorityClass>
</SYSTEM>
</ConfigFile>
<!-- EOF -->

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigFile VendorName="Baumer" MajorVersion="2" MinorVersion="2" SubMinorVersion="0">
<FileVersion>2.2.0.0</FileVersion>
<U3V>
<!-- image buffer size for USB transmission -->
<U3VImageBufferSize>0x10000</U3VImageBufferSize>
<U3VMaxResponseDefaultTime>500</U3VMaxResponseDefaultTime>
<U3VMaxFifoSize>1024</U3VMaxFifoSize>
</U3V>
<SYSTEM>
<IncreaseThreadPriority>0</IncreaseThreadPriority>
<IncreasePriorityClass>0</IncreasePriorityClass>
</SYSTEM>
</ConfigFile>
<!-- EOF -->

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigFile VendorName="Baumer" MajorVersion="2" MinorVersion="2" SubMinorVersion="0">
<FileVersion>2.2.0.0</FileVersion>
<Resend>
<Version>1</Version>
<Version1>
<!--Set the maximum number of resend requests per image (default 500)-->
<MaxResendsPerImage>500</MaxResendsPerImage>
<!--Set the maximum number of resend requests per packet (default 3)-->
<MaxResendsPerPacket>3</MaxResendsPerPacket>
<!--Set the number of packets to wait befor sending the first resend requests (default 0)-->
<FirstResendWaitPackets>0</FirstResendWaitPackets>
<!--Set the number of packets to wait befor sending the first resend requests if the camera sends the data over two physical links (default 20)-->
<FirstResendWaitPacketsDualLink>20</FirstResendWaitPacketsDualLink>
<!--Set the time in ms to wait befor sending the first resend requests (default 150)-->
<FirstResendWaitTime>150</FirstResendWaitTime>
<!--Set the number of packets to wait befor sending the next resend requests (default 20)-->
<NextResendWaitPackets>20</NextResendWaitPackets>
<!--Set the number of packets to wait befor sending the next resend requests if the camera sends the data over two physical links (default 20)-->
<NextResendWaitPacketsDualLink>20</NextResendWaitPacketsDualLink>
<!--Set the time in ms to wait befor sending the next resend requests (default 100)-->
<NextResendWaitTime>100</NextResendWaitTime>
</Version1>
</Resend>
<GVCP>
<!--Set Timeout (in ms) and number of retrys for control channel
0 = the pending timeout register of camera is used for control channel timeout (default)
1..60000 = timeout value
-->
<ControlChannelTimeout>0</ControlChannelTimeout>
<!--The number of retries of commands on the control channel before the GigE Producer stops sending any further commands
valid values: 0..4294967295 (0xffffffff)
default value: 3
-->
<ControlChannelRetries>3</ControlChannelRetries>
<!--After a failed command the control channel is locked, that means no further commands were transmitted. This feature controls this locking mechanism.
valid values: 1 - the GigE Producer locks the control channel after a failing command. No further command were transmitted.
0 - the GigE Producer doesn't lock the control channel after a failing command. All further commands were transmitted.
default value: 1
-->
<UseControlChannelLocking>1</UseControlChannelLocking>
<!--Set Timeout(in ms) and number of retrys for asynchron messages from the camera (if supported) -->
<MessageChannelTimeout>100</MessageChannelTimeout>
<MessageChannelRetries>2</MessageChannelRetries>
</GVCP>
<GEV>
<!--Maximum packet size for GigE transmission. This value is used as upper limitation for
automatic MTU (maximum transmission unit) detection. Set this value to 0 the MTU detection
uses the preferred maximum of 9000. The smallest possible value is 576 and the higest value is 16380.
If you set a value outside this range the preferred maximum of 9000 is used. (default 9000)
-->
<DeviceStreamChannelPacketSizeMax>9000</DeviceStreamChannelPacketSizeMax>
<!--
0 means enable automatic MTU (maximum transmission unit) detection. If you specify this value the
MTU detection is disabled and the value DeviceStreamChannelPacketSizeMax is ignored.
The specified value is used directly as packet size.
The smallest possible value is 576 and the higest value is 16380. If you set a value outside the range
the minimum packet size of 576 is used.
-->
<DeviceStreamChannelPacketSizeFix>0</DeviceStreamChannelPacketSizeFix>
</GEV>
<SYSTEM>
<IncreaseThreadPriority>0</IncreaseThreadPriority>
<IncreasePriorityClass>0</IncreasePriorityClass>
</SYSTEM>
</ConfigFile>
<!-- EOF -->

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigFile VendorName="Baumer" MajorVersion="2" MinorVersion="2" SubMinorVersion="0">
<FileVersion>2.2.0.0</FileVersion>
<U3V>
<!-- image buffer size for USB transmission -->
<U3VImageBufferSize>0x10000</U3VImageBufferSize>
<U3VMaxResponseDefaultTime>500</U3VMaxResponseDefaultTime>
<U3VMaxFifoSize>1024</U3VMaxFifoSize>
</U3V>
<SYSTEM>
<IncreaseThreadPriority>0</IncreaseThreadPriority>
<IncreasePriorityClass>0</IncreasePriorityClass>
</SYSTEM>
</ConfigFile>
<!-- EOF -->

@ -0,0 +1,338 @@
/*****************************************************************************\
* Program: bgapi2 - Baumer GenTL consumer
* Purpose: Baumer GenTL consumer definitions
*
* Created: 13.04.2011
* Author: Silvio Voitzsch
* Copyright: Baumer Optronic GmbH, Radeberg
\*****************************************************************************/
#ifndef __BGAPI2_DEF_H__
#define __BGAPI2_DEF_H__
#if !defined(_GNULINUX)
#ifdef BGAPI2_GENICAM_EXPORTS
#define BGAPI2_DECL __declspec(dllexport)
#else
#define BGAPI2_DECL __declspec(dllimport)
#endif
#else
#define BGAPI2_DECL
#endif
#if defined(__BORLANDC__) || (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define BGAPI2CALL __stdcall
#else
#define BGAPI2CALL
#endif
#include "bgapi2_featurenames.h"
#ifndef _GNULINUX
typedef __int64 bo_int64;
typedef unsigned __int64 bo_uint64;
typedef __int32 bo_int;
typedef unsigned __int32 bo_uint;
typedef __int16 bo_short;
typedef unsigned __int16 bo_ushort;
typedef __int8 bo_char;
typedef unsigned __int8 bo_uchar;
typedef unsigned __int16 bo_uint16;
#else
#include <iostream>
#include <inttypes.h>
/* workaround for g++-64bit int64_t == long int and not long long int !!! */
typedef long long int bo_int64;
typedef unsigned long long int bo_uint64;
//typedef int64_t bo_int64;
//typedef uint64_t bo_uint64;
typedef long long int bo_int64;
typedef unsigned long long int bo_uint64;
typedef int32_t bo_int;
typedef uint32_t bo_uint;
typedef int16_t bo_short;
typedef uint16_t bo_ushort;
typedef int8_t bo_char;
typedef uint8_t bo_uchar;
#endif
typedef char* bo_string;
#ifdef __cplusplus
typedef bool bo_bool;
#else
typedef bo_uchar bo_bool;
#endif
typedef double bo_double;
class CEventPnPObj;
class CEventDeviceEventObj;
#ifdef __cplusplus
namespace BGAPI2
{
struct _sSystemListData;
typedef struct BGAPI2::_sSystemListData tSystemListData, *ptSystemListData;
struct _sInterfaceListData;
typedef struct BGAPI2::_sInterfaceListData tInterfaceListData, *ptInterfaceListData;
struct _sSystemData;
typedef struct BGAPI2::_sSystemData tSystemData, *ptSystemData;
struct _sDeviceListData;
typedef struct BGAPI2::_sDeviceListData tDeviceListData, *ptDeviceListData;
struct _sDataStreamListData;
typedef struct BGAPI2::_sDataStreamListData tDataStreamListData, *ptDataStreamListData;
struct _sBufferListData;
typedef struct BGAPI2::_sBufferListData tBufferListData, *ptBufferListData;
struct _sBufferData;
typedef struct BGAPI2::_sBufferData tBufferData, *ptBufferData;
struct _sDataStreamData;
typedef struct BGAPI2::_sDataStreamData tDataStreamData, *ptDataStreamData;
struct _sDeviceData;
typedef struct BGAPI2::_sDeviceData tDeviceData, *ptDeviceData;
struct _sInterfaceData;
typedef struct BGAPI2::_sInterfaceData tInterfaceData, *ptInterfaceData;
struct _sImageData;
typedef struct BGAPI2::_sImageData tImageData, *ptImageData;
struct _sImageProcessorData;
typedef struct BGAPI2::_sImageProcessorData tImageProcessorData, *ptImageProcessorData;
class BGAPI2_DECL String
{
public:
String();
String( const char * text );
String( const char * text, int length );
String( const char & ch, int length );
String( const String & Obj );
String( const char & ch );
~String();
operator char *();
operator const char *();
bool operator == (const char * text);
bool operator == ( String & ExStr ) const;
bool operator != (const char * text);
bool operator != ( const String & ExStr );
bool operator < ( const String & ExStr ) const;
const String & operator = (char &);
const String & operator = (const char *);
const String & operator = ( const String & ExStr );
#ifdef _GNULINUX
friend std::ostream& operator << ( std::ostream& out, BGAPI2::String const &ExStr );
#endif
const char* get() const;
// const char* get();
void set( const char * text );
int size();
private:
void* data;
};
#ifdef _GNULINUX
std::ostream& operator << ( std::ostream& out, BGAPI2::String const &ExStr );
#endif
class System;
class BGAPI2_DECL _pairs
{
public:
String first;
System* second;
};
class Interface;
class BGAPI2_DECL _pairi
{
public:
String first;
Interface* second;
};
class Device;
class BGAPI2_DECL _paird
{
public:
String first;
Device* second;
};
class DataStream;
class BGAPI2_DECL _pairds
{
public:
String first;
DataStream* second;
};
class Buffer;
class BGAPI2_DECL _pairb
{
public:
String first;
Buffer* second;
};
class Node;
class BGAPI2_DECL _pairn
{
public:
bo_int64 first;
Node* second;
};
class BGAPI2_DECL _pairnm
{
public:
String first;
_pairn second;
};
#ifndef _GNULINUX
#pragma pack (push, 8)
typedef struct {
bo_ushort *pcRed; // pointer to hist array offered by user, can be zero
bo_ushort *pcGreen; // pointer to hist array offered by user, can be zero
bo_ushort *pcBlue; // pointer to hist array offered by user, can be zero
bo_ushort *pcLuma; // pointer to hist array offered by user, can be zero
int length;
int * pSizeFilled; // pointer to fill info for user
bool ThresEnable;
int ThresMin;
int ThresMax;
int* red_under;
int* red_over;
int* green_under;
int* green_over;
int* blue_under;
int* blue_over;
} bo_tHistRecords;
/**
\struct tRGB16QUAD
\brief The tRGB16QUAD structure specifies the information for one color look up table entry
\brief according to RGBQUAD of WinGdi
*/
typedef struct {
bo_ushort rgbBlue;
bo_ushort rgbGreen;
bo_ushort rgbRed;
bo_ushort rgbReserved;
} bo_tRGB16QUAD;
#pragma pack (pop)
#else
// TODO Linux packed
typedef struct {
bo_ushort *pcRed; // pointer to hist array offered by user, can be zero
bo_ushort *pcGreen; // pointer to hist array offered by user, can be zero
bo_ushort *pcBlue; // pointer to hist array offered by user, can be zero
bo_ushort *pcLuma; // pointer to hist array offered by user, can be zero
int length;
int * pSizeFilled; // pointer to fill info for user
bool ThresEnable;
int ThresMin;
int ThresMax;
int* red_under;
int* red_over;
int* green_under;
int* green_over;
int* blue_under;
int* blue_over;
} bo_tHistRecords;
/**
\struct tRGB16QUAD
\brief The tRGB16QUAD structure specifies the information for one color look up table entry
\brief according to RGBQUAD of WinGdi
*/
typedef struct {
bo_ushort rgbBlue;
bo_ushort rgbGreen;
bo_ushort rgbRed;
bo_ushort rgbReserved;
} bo_tRGB16QUAD;
#endif
}
#endif
enum BGAPI2_RESULT_LIST
{
BGAPI2_RESULT_SUCCESS = 0,
BGAPI2_RESULT_ERROR = -1001,
BGAPI2_RESULT_NOT_INITIALIZED = -1002,
BGAPI2_RESULT_NOT_IMPLEMENTED = -1003,
BGAPI2_RESULT_RESOURCE_IN_USE = -1004,
BGAPI2_RESULT_ACCESS_DENIED = -1005,
BGAPI2_RESULT_INVALID_HANDLE = -1006,
BGAPI2_RESULT_NO_DATA = -1008,
BGAPI2_RESULT_INVALID_PARAMETER = -1009,
// GC_ERR_IO = -1010,
BGAPI2_RESULT_TIMEOUT = -1011,
BGAPI2_RESULT_ABORT = -1012,
BGAPI2_RESULT_INVALID_BUFFER = -1013,
BGAPI2_RESULT_NOT_AVAILABLE = -1014,
// GC_ERR_INVALID_ADDRESS = -1015, /* GenTL v1.3 */
// GC_ERR_BUFFER_TOO_SMALL = -1016, /* GenTL v1.4 */
// GC_ERR_INVALID_INDEX = -1017, /* GenTL v1.4 */
// GC_ERR_PARSING_CHUNK_DATA = -1018, /* GenTL v1.4 */
BGAPI2_RESULT_OBJECT_INVALID = -1098,
BGAPI2_RESULT_LOWLEVEL_ERROR = -1099
};
typedef bo_int BGAPI2_RESULT;
#define BGAPI2_PAYLOADTYPE_UNKNOWN "Unknown"
#define BGAPI2_PAYLOADTYPE_IMAGE "Image"
#define BGAPI2_PAYLOADTYPE_RAW_DATA "RawData"
#define BGAPI2_PAYLOADTYPE_FILE "File"
#define BGAPI2_PAYLOADTYPE_CHUNK_DATA "ChunkData"
#define BGAPI2_PAYLOADTYPE_CUSTOM_ID "CustomID_1000"
#define BGAPI2_PAYLOADTYPE_IMAGE_EXT "ImageExt" /* PAYLOADTYPE_IMAGE_EXT */
//other custom id's were delivered in the following format CustomID_xxxx starting with CustomID_1000
#define BGAPI2_NODEINTERFACE_CATEGORY "ICategory"
#define BGAPI2_NODEINTERFACE_INTEGER "IInteger"
#define BGAPI2_NODEINTERFACE_REGISTER "IRegister"
#define BGAPI2_NODEINTERFACE_BOOLEAN "IBoolean"
#define BGAPI2_NODEINTERFACE_COMMAND "ICommand"
#define BGAPI2_NODEINTERFACE_FLOAT "IFloat"
#define BGAPI2_NODEINTERFACE_ENUMERATION "IEnumeration"
#define BGAPI2_NODEINTERFACE_STRING "IString"
#define BGAPI2_NODEINTERFACE_PORT "IPort"
#define BGAPI2_NODEVISIBILITY_BEGINNER "Beginner"
#define BGAPI2_NODEVISIBILITY_EXPERT "Expert"
#define BGAPI2_NODEVISIBILITY_GURU "Guru"
#define BGAPI2_NODEVISIBILITY_INVISIBLE "Invisible"
#define BGAPI2_NODEACCESS_READWRITE "RW"
#define BGAPI2_NODEACCESS_READONLY "RO"
#define BGAPI2_NODEACCESS_WRITEONLY "WO"
#define BGAPI2_NODEACCESS_NOTAVAILABLE "NA"
#define BGAPI2_NODEACCESS_NOTIMPLEMENTED "NI"
#define BGAPI2_NODEREPRESENTATION_LINEAR "Linear" //valid for BGAPI2_NODEINTERFACE_INTEGER, BGAPI2_NODEINTERFACE_FLOAT
#define BGAPI2_NODEREPRESENTATION_LOGARITHMIC "Logarithmic" //valid for BGAPI2_NODEINTERFACE_INTEGER, BGAPI2_NODEINTERFACE_FLOAT
#define BGAPI2_NODEREPRESENTATION_PURENUMBER "PureNumber" //valid for BGAPI2_NODEINTERFACE_INTEGER, BGAPI2_NODEINTERFACE_FLOAT
#define BGAPI2_NODEREPRESENTATION_BOOLEAN "Boolean" //valid for BGAPI2_NODEINTERFACE_INTEGER
#define BGAPI2_NODEREPRESENTATION_HEXNUMBER "HexNumber" //valid for BGAPI2_NODEINTERFACE_INTEGER
#define BGAPI2_NODEREPRESENTATION_IPV4ADDRESS "IPV4Address" //valid for BGAPI2_NODEINTERFACE_INTEGER
#define BGAPI2_NODEREPRESENTATION_MACADDRESS "MACAddress" //valid for BGAPI2_NODEINTERFACE_INTEGER
#endif //__BGAPI2_DEF_H__

@ -0,0 +1,856 @@
/*****************************************************************************\
* Program: bgapi2 - Baumer GenTL consumer
* Purpose: global definitions of common feature names
*
* Created: 19.09.2011
* Author: Thomas Oelschlaeger
* Copyright: Baumer Optronic GmbH, Radeberg
\*****************************************************************************/
#ifndef _BGAPI2_FEATURENAMES_H__
#define _BGAPI2_FEATURENAMES_H__
#define SFNCVERSION 1.5
#define SFNC_DEVICECONTROL "DeviceControl"
#define SFNC_DEVICE_VENDORNAME "DeviceVendorName"
#define SFNC_DEVICE_MODELNAME "DeviceModelName"
#define SFNC_DEVICE_MANUFACTURERINFO "DeviceManufacturerInfo"
#define SFNC_DEVICE_VERSION "DeviceVersion"
#define SFNC_DEVICE_FIRMWAREVERSION "DeviceFirmwareVersion"
#define SFNC_DEVICE_SFNCVERSIONMAJOR "DeviceSFNCVersionMajor"
#define SFNC_DEVICE_SFNCVERSIONMINOR "DeviceSFNCVersionMinor"
#define SFNC_DEVICE_SFNCVERSIONSUBMINOR "DeviceSFNCVersionSubMinor"
#define SFNC_DEVICE_MANIFESTENTRYSELECTOR "DeviceManifestEntrySelector"
#define SFNC_DEVICE_MANIFESTXMLMAJORVERSION "DeviceManifestXMLMajorVersion"
#define SFNC_DEVICE_MANIFESTXMLMINORVERSION "DeviceManifestXMLMinorVersion"
#define SFNC_DEVICE_MANIFESTXMLSUBMINORVERSION "DeviceManifestXMLSubMinorVersion"
#define SFNC_DEVICE_MANIFESTSCHEMAMAJORVERSION "DeviceManifestSchemaMajorVersion"
#define SFNC_DEVICE_MANIFESTSCHEMAMINORVERSION "DeviceManifestSchemaMinorVersion"
#define SFNC_DEVICE_MANIFESTPRIMARYURL "DeviceManifestPrimaryURL"
#define SFNC_DEVICE_MANIFESTSECONDARYURL "DeviceManifestSecondaryURL"
#define SFNC_DEVICE_ID "DeviceID" //depreciated SFNC2.0, replaced with "DeviceSerialNumber"
#define SFNC_DEVICE_SERIALNUMBER "DeviceSerialNumber" //starting with SFNC2.0
#define SFNC_DEVICE_USERID "DeviceUserID"
#define SFNC_DEVICE_RESET "DeviceReset"
#define SFNC_DEVICE_REGISTERSSTREAMINGSTART "DeviceRegistersStreamingStart"
#define SFNC_DEVICE_REGISTERSSTREAMINGEND "DeviceRegistersStreamingEnd"
#define SFNC_DEVICE_REGISTERSCHECK "DeviceRegistersCheck"
#define SFNC_DEVICE_REGISTERSVALID "DeviceRegistersValid"
#define SFNC_DEVICE_MAXTHROUGHPUT "DeviceMaxThroughput"
#define SFNC_DEVICE_TEMERATURESELECTOR "DeviceTemperatureSelector"
#define SFNC_DEVICE_TEMPERATURE "DeviceTemperature"
#define SFNC_DEVICE_CLOCKSELECTOR "DeviceClockSelector"
#define SFNC_DEVICE_CLOCKFREQUENCY "DeviceClockFrequency"
#define SFNC_DEVICE_SERIALPORTSELECTOR "DeviceSerialPortSelector"
#define SFNC_IMAGEFORMATCONTROL "ImageFormatControl"
#define SFNC_SENSORWIDTH "SensorWidth"
#define SFNC_SENSORHEIGHT "SensorHeight"
#define SFNC_SENSORTABS "SensorTaps"
#define SFNC_SENSORDIGITIZATIONTABS "SensorDigitizationTaps"
#define SFNC_WIDTHMAX "WidthMax"
#define SFNC_HEIGHTMAX "HeightMax"
#define SFNC_WIDTH "Width"
#define SFNC_HEIGHT "Height"
#define SFNC_OFFSETX "OffsetX"
#define SFNC_OFFSETY "OffsetY"
#define SFNC_LINEPITCH "LinePitch"
#define SFNC_BINNINGHORIZONTAL "BinningHorizontal"
#define SFNC_BINNINGVERTICAL "BinningVertical"
#define SFNC_DECIMATIONHORIZONTAL "DecimationHorizontal"
#define SFNC_DECIMATIONVERTICAL "DecimationVertical"
#define SFNC_REVERSEX "ReverseX"
#define SFNC_REVERSEY "ReverseY"
#define SFNC_PIXELFORMAT "PixelFormat"
#define SFNC_PIXELCODING "PixelCoding"
#define SFNC_PIXELSIZE "PixelSize"
#define SFNC_PIXELCOLORFILTER "PixelColorFilter"
#define SFNC_PIXELDYNAMICRANGEMIN "PixelDynamicRangeMin"
#define SFNC_PIXELDYNAMICRANGEMAX "PixelDynamicRangeMax"
#define SFNC_TESTIMAGESELECTOR "TestImageSelector"
#define SFNC_ACQUISITIONCONTROL "AcquisitionControl"
#define SFNC_ACQUISITION_MODE "AcquisitionMode"
#define SFNC_ACQUISITION_START "AcquisitionStart"
#define SFNC_ACQUISITION_STOP "AcquisitionStop"
#define SFNC_ACQUISITION_ABORT "AcquisitionAbort"
#define SFNC_ACQUISITION_ARM "AcquisitionArm"
#define SFNC_ACQUISITION_FRAMECOUNT "AcquisitionFrameCount"
#define SFNC_ACQUISITION_FRAMERATE "AcquisitionFrameRate"
#define SFNC_ACQUISITION_FRAMERATEABS "AcquisitionFrameRateAbs"
#define SFNC_ACQUISITION_FRAMERATERAW "AcquisitionFrameRateRaw"
#define SFNC_ACQUISITION_LINERATE "AcquisitionLineRate"
#define SFNC_ACQUISITION_LINERATEABS "AcquisitionLineRateAbs"
#define SFNC_ACQUISITION_LINERATERAW "AcquisitionLineRateRaw"
#define SFNC_ACQUISITION_STATUSSELECTOR "AcquisitionStatusSelector"
#define SFNC_ACQUISITION_STATUS "AcquisitionStatus"
#define SFNC_TRIGGERSELECTOR "TriggerSelector"
#define SFNC_TRIGGERMODE "TriggerMode"
#define SFNC_TRIGGERSOFTWARE "TriggerSoftware"
#define SFNC_TRIGGERSOURCE "TriggerSource"
#define SFNC_TRIGGERACTIVATION "TriggerActivation"
#define SFNC_TRIGGEROVERLAP "TriggerOverlap"
#define SFNC_TRIGGERDELAY "TriggerDelay"
#define SFNC_TRIGGERDELAYABS "TriggerDelayAbs"
#define SFNC_TRIGGERDELAYRAW "TriggerDelayRaw"
#define SFNC_TRIGGERDIVIDER "TriggerDivider"
#define SFNC_TRIGGERMULTIPLIER "TriggerMultiplier"
#define SFNC_EXPOSUREMODE "ExposureMode"
#define SFNC_EXPOSURETIME "ExposureTime"
#define SFNC_EXPOSURETIMEABS "ExposureTimeAbs"
#define SFNC_EXPOSURETIMERAW "ExposureTimeRaw"
#define SFNC_EXPOSUREAUTO "ExposureAuto"
#define SFNC_DIGITALIOCONTROL "DigitalIOControl"
#define SFNC_LINESELECTOR "LineSelector"
#define SFNC_LINEMODE "LineMode"
#define SFNC_LINEINVERTER "LineInverter"
#define SFNC_LINESTATUS "LineStatus"
#define SFNC_LINESTATUSALL "LineStatusAll"
#define SFNC_LINESOURCE "LineSource"
#define SFNC_LINEFORMAT "LineFormat"
#define SFNC_USEROUTPUTSELECTOR "UserOutputSelector"
#define SFNC_USEROUTPUTVALUE "UserOutputValue"
#define SFNC_USEROUTPUTVALUEALL "UserOutputValueAll"
#define SFNC_USEROUTPUTVALUEALLMASK "UserOutputValueAllMask"
#define SFNC_COUNTERANDTIMERCONTROL "CounterAndTimerControl"
#define SFNC_COUNTERSELECTOR "CounterSelector"
#define SFNC_COUNTEREVENTSOURCE "CounterEventSource"
#define SFNC_COUNTEREVENTACTIVATION "CounterEventActivation"
#define SFNC_COUNTERRESETSOURCE "CounterResetSource"
#define SFNC_COUNTERRESETACTIVATION "CounterResetActivation"
#define SFNC_COUNTERRESET "CounterReset"
#define SFNC_COUNTERVALUE "CounterValue"
#define SFNC_COUNTERVALUEATRESET "CounterValueAtReset"
#define SFNC_COUNTERDURATION "CounterDuration"
#define SFNC_COUNTERSTATUS "CounterStatus"
#define SFNC_COUNTERTRIGGERSOURCE "CounterTriggerSource"
#define SFNC_COUNTERTRIGGERACTIVATION "CounterTriggerActivation"
#define SFNC_TIMERSELECTOR "TimerSelector"
#define SFNC_TIMERDURATION "TimerDuration"
#define SFNC_TIMERDURATIONABS "TimerDurationAbs"
#define SFNC_TIMERDURATIONRAW "TimerDurationRaw"
#define SFNC_TIMERDELAY "TimerDelay"
#define SFNC_TIMERDELAYABS "TimerDelayAbs"
#define SFNC_TIMERDELAYRAW "TimerDelayRaw"
#define SFNC_TIMERRESET "TimerReset"
#define SFNC_TIMERVALUE "TimerValue"
#define SFNC_TIMERVALUEABS "TimerValueAbs"
#define SFNC_TIMERVALUERAW "TimerValueRaw"
#define SFNC_TIMERSTATUS "TimerStatus"
#define SFNC_TIMERTRIGGERSOURCE "TimerTriggerSource"
#define SFNC_TIMERTRIGGERACTIVATION "TimerTriggerActivation"
#define SFNC_EVENTCONTROL "EventControl"
#define SFNC_EVENTSELECTOR "EventSelector"
#define SFNC_EVENTNOTIFICATION "EventNotification"
#define SFNC_EVENT_FRAMETRIGGERDATA "EventFrameTriggerData"
#define SFNC_EVENT_FRAMETRIGGER "EventFrameTrigger"
#define SFNC_EVENT_FRAMETRIGGERTIMESTAMP "EventFrameTriggerTimestamp"
#define SFNC_EVENT_FRAMETRIGGERFRAMEID "EventFrameTriggerFrameID"
#define SFNC_EVENT_EXPOSUREENDDATA "EventExposureEndData"
#define SFNC_EVENT_EXPOSUREEND "EventExposureEnd"
#define SFNC_EVENT_EXPOSUREENDTIMESTAMP "EventExposureEndTimestamp"
#define SFNC_EVENT_EXPOSUREENDFRAMEID "EventExposureEndFrameID"
#define SFNC_EVENT_ERRORDATA "EventErrorData"
#define SFNC_EVENT_ERROR "EventError"
#define SFNC_EVENT_ERRORTIMESTAMP "EventErrorTimestamp"
#define SFNC_EVENT_ERRORFRAMEID "EventErrorFrameID"
#define SFNC_EVENT_ERRORCODE "EventErrorCode"
#define SFNC_ANALOGCONTROL "AnalogControl"
#define SFNC_GAINSELECTOR "GainSelector"
#define SFNC_GAIN "Gain"
#define SFNC_GAINRAW "GainRaw"
#define SFNC_GAINABS "GainAbs"
#define SFNC_GAINAUTO "GainAuto"
#define SFNC_GAINAUTOBALANCE "GainAutoBalance"
#define SFNC_BLACKLEVELSELECTOR "BlackLevelSelector"
#define SFNC_BLACKLEVEL "BlackLevel"
#define SFNC_BLACKLEVELRAW "BlackLevelRaw"
#define SFNC_BLACKLEVELABS "BlackLevelAbs"
#define SFNC_BLACKLEVELAUTO "BlackLevelAuto"
#define SFNC_BLACKLEVELAUTOBALANCE "BlackLevelAutoBalance"
#define SFNC_WHITECLIPSELECTOR "WhiteClipSelector"
#define SFNC_WHITECLIP "WhiteClip"
#define SFNC_WHITECLIPRAW "WhiteClipRaw"
#define SFNC_WHITECLIPABS "WhiteClipAbs"
#define SFNC_BALANCERATIOSELECTOR "BalanceRatioSelector"
#define SFNC_BALANCERATIO "BalanceRatio"
#define SFNC_BALANCERATIOABS "BalanceRatioAbs"
#define SFNC_BALANCEWHITEAUTO "BalanceWhiteAuto"
#define SFNC_GAMMA "Gamma"
#define SFNC_LUTCONTROL "LUTControl"
#define SFNC_LUTSELECTOR "LUTSelector"
#define SFNC_LUTENABLE "LUTEnable"
#define SFNC_LUTINDEX "LUTIndex"
#define SFNC_LUTVALUE "LUTValue"
#define SFNC_LUTVALUEALL "LUTValueAll"
#define SFNC_ROOT "Root"
#define SFNC_DEVICE "Device"
#define SFNC_TLPARAMSLOCKED "TLParamsLocked"
#define SFNC_TRANSPORTLAYERCONTROL "TransportLayerControl"
#define SFNC_PAYLOADSIZE "PayloadSize"
#define SFNC_GEV_VERSIONMAJOR "GevVersionMajor"
#define SFNC_GEV_VERSIONMINOR "GevVersionMinor"
#define SFNC_GEV_DEVICEMODEISBIGENDIAN "GevDeviceModeIsBigEndian"
#define SFNC_GEV_DEVICECALSS "GevDeviceClass"
#define SFNC_GEV_DEVICEMODECHARACTERSET "GevDeviceModeCharacterSet"
#define SFNC_GEV_INTERFACESELECTOR "GevInterfaceSelector"
#define SFNC_GEV_MACADDRESS "GevMACAddress"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTOR "GevSupportedOptionSelector"
#define SFNC_GEV_SUPPORTEDOPTION "GevSupportedOption"
#define SFNC_GEV_SUPPORTEDIPCONFIGURATIONLLA "GevSupportedIPConfigurationLLA"
#define SFNC_GEV_SUPPORTEDIPCONFIGURATIONDHCP "GevSupportedIPConfigurationDHCP"
#define SFNC_GEV_SUPPORTEDIPCONFIGURATIONPERSISTENTIP "GevSupportedIPConfigurationPersistentIP"
#define SFNC_GEV_CURRENTIPCONFIGURATION "GevCurrentIPConfiguration"
#define SFNC_GEV_CURRENTIPCONFIGURATIONLLA "GevCurrentIPConfigurationLLA"
#define SFNC_GEV_CURRENTIPCONFIGURATIONDHCP "GevCurrentIPConfigurationDHCP"
#define SFNC_GEV_CURRENTIPCONFIGURATIONPERSISTENTIP "GevCurrentIPConfigurationPersistentIP"
#define SFNC_GEV_CURRENTIPADDRESS "GevCurrentIPAddress"
#define SFNC_GEV_CURRENTSUBNETMASK "GevCurrentSubnetMask"
#define SFNC_GEV_CURRENTDEFAULTGATEWAY "GevCurrentDefaultGateway"
#define SFNC_GEV_IPCONFIGURATIONSTATUS "GevIPConfigurationStatus"
#define SFNC_GEV_FIRSTURL "GevFirstURL"
#define SFNC_GEV_SECONDURL "GevSecondURL"
#define SFNC_GEV_NUMBEROFINTERFACES "GevNumberOfInterfaces"
#define SFNC_GEV_PERSISTENTIPADDRESS "GevPersistentIPAddress"
#define SFNC_GEV_PERSISTENTSUBNETMASK "GevPersistentSubnetMask"
#define SFNC_GEV_PERSISTENTDEFAULTGATEWAY "GevPersistentDefaultGateway"
#define SFNC_GEV_GEVLINKSPEED "GevLinkSpeed"
#define SFNC_GEV_MESSAGECHANNELCOUNT "GevMessageChannelCount"
#define SFNC_GEV_STREAMCHANNELCOUNT "GevStreamChannelCount"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSUSERDEFINEDNAME "GevSupportedOptionalCommandsUserDefinedName"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSSERIALNUMBER "GevSupportedOptionalCommandsSerialNumber"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSEVENTDATA "GevSupportedOptionalCommandsEVENTDATA"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSEVENT "GevSupportedOptionalCommandsEVENT"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSPACKETRESEND "GevSupportedOptionalCommandsPACKETRESEND"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSWRITEMEM "GevSupportedOptionalCommandsWRITEMEM"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSCONCATENATION "GevSupportedOptionalCommandsConcatenation"
#define SFNC_GEV_HEARTBEATTIMEOUT "GevHeartbeatTimeout"
#define SFNC_GEV_TIMESTAMPTICKFREQUENCY "GevTimestampTickFrequency"
#define SFNC_GEV_TIMESTAMPCONTROLLATCH "GevTimestampControlLatch"
#define SFNC_GEV_TIMESTAMPCONTROLRESET "GevTimestampControlReset"
#define SFNC_GEV_TIMESTAMPVALUE "GevTimestampValue"
#define SFNC_GEV_DISCOVERYACKDELAY "GevDiscoveryAckDelay"
#define SFNC_GEV_GVCPEXTENDEDSTATUSCODES "GevGVCPExtendedStatusCodes"
#define SFNC_GEV_GVCPPENDINGACK "GevGVCPPendingAck"
#define SFNC_GEV_GVCPHEARTBEATDISABLE "GevGVCPHeartbeatDisable"
#define SFNC_GEV_GVCPPENDINGTIMEOUT "GevGVCPPendingTimeout"
#define SFNC_GEV_PRIMARYAPPLICATIONSWITCHOVERKEY "GevPrimaryApplicationSwitchoverKey"
#define SFNC_GEV_CCP "GevCCP"
#define SFNC_GEV_PRIMARYAPPLICATIONSOCKET "GevPrimaryApplicationSocket"
#define SFNC_GEV_PRIMARYAPPLICATIONIPADDRESS "GevPrimaryApplicationIPAddress"
#define SFNC_GEV_MCPHOSTPORT "GevMCPHostPort"
#define SFNC_GEV_MCDA "GevMCDA"
#define SFNC_GEV_MCTT "GevMCTT"
#define SFNC_GEV_MCRC "GevMCRC"
#define SFNC_GEV_MCSP "GevMCSP"
#define SFNC_GEV_STREAMCHANNELSELECTOR "GevStreamChannelSelector"
#define SFNC_GEV_SCCFGUNCONDITIONALSTREAMING "GevSCCFGUnconditionalStreaming"
#define SFNC_GEV_SCCFGEXTENDEDCHUNKDATA "GevSCCFGExtendedChunkData"
#define SFNC_GEV_SCPDIRECTION "GevSCPDirection"
#define SFNC_GEV_SCPINTERFACEINDEX "GevSCPInterfaceIndex"
#define SFNC_GEV_SCPHOSTPORT "GevSCPHostPort"
#define SFNC_GEV_SCPSFIRETESTPACKET "GevSCPSFireTestPacket"
#define SFNC_GEV_SCPSDONOTFRAGMENT "GevSCPSDoNotFragment"
#define SFNC_GEV_SCPSBIGENDIAN "GevSCPSBigEndian"
#define SFNC_GEV_SCPSPACKETSIZE "GevSCPSPacketSize"
#define SFNC_GEV_SCPD "GevSCPD"
#define SFNC_GEV_SCDA "GevSCDA"
#define SFNC_GEV_SCSP "GevSCSP"
#define SFNC_GEV_MANIFESTENTRYSELECTOR "GevManifestEntrySelector"
#define SFNC_GEV_MANIFESTXMLMAJORVERSION "GevManifestXMLMajorVersion"
#define SFNC_GEV_MANIFESTXMLMINORVERSION "GevManifestXMLMinorVersion"
#define SFNC_GEV_MANIFESTXMLSUBMINORVERSION "GevManifestXMLSubMinorVersion"
#define SFNC_GEV_MANIFESTSCHEMAMAJORVERSION "GevManifestSchemaMajorVersion"
#define SFNC_GEV_MANIFESTSCHEMAMINORVERSION "GevManifestSchemaMinorVersion"
#define SFNC_GEV_MANIFESTPRIMARYURL "GevManifestPrimaryURL"
#define SFNC_GEV_MANIFESTSECONDARYURL "GevManifestSecondaryURL"
#define SFNC_CL_CONFIGURATION "ClConfiguration"
#define SFNC_CL_TIMESLOTSCOUNT "ClTimeSlotsCount"
#define SFNC_DEVICETAPGEOMETRY "DeviceTapGeometry"
#define SFNC_USERSETCONTROL "UserSetControl"
#define SFNC_USERSETSELECTOR "UserSetSelector"
#define SFNC_USERSETLOAD "UserSetLoad"
#define SFNC_USERSETSAVE "UserSetSave"
#define SFNC_USERSETDEFAULTSELECTOR "UserSetDefaultSelector"
#define SFNC_CHUNKDATACONTROL "ChunkDataControl"
#define SFNC_CHUNKMODEACTIVE "ChunkModeActive"
#define SFNC_CHUNKSELECTOR "ChunkSelector"
#define SFNC_CHUNKENABLE "ChunkEnable"
#define SFNC_CHUNKIMAGE "ChunkImage"
#define SFNC_CHUNKOFFSETX "ChunkOffsetX"
#define SFNC_CHUNKOFFSETY "ChunkOffsetY"
#define SFNC_CHUNKWIDTH "ChunkWidth"
#define SFNC_CHUNKHEIGHT "ChunkHeight"
#define SFNC_CHUNKPIXELFORMAT "ChunkPixelFormat"
#define SFNC_CHUNKPIXELDYNAMICRANGEMIN "ChunkPixelDynamicRangeMin"
#define SFNC_CHUNKPIXELDYNAMICRANGEMAX "ChunkPixelDynamicRangeMax"
#define SFNC_CHUNKDYNAMICRANGEMIN "ChunkDynamicRangeMin"
#define SFNC_CHUNKDYNAMICRANGEMAX "ChunkDynamicRangeMax"
#define SFNC_CHUNKTIMESTAMP "ChunkTimestamp"
#define SFNC_CHUNKLINESTATUSALL "ChunkLineStatusAll"
#define SFNC_CHUNKCOUNTERSELECTOR "ChunkCounterSelector"
#define SFNC_CHUNKCOUNTERVALUE "ChunkCounterValue"
#define SFNC_CHUNKCOUNTER "ChunkCounter"
#define SFNC_CHUNKTIMERSELECTOR "ChunkTimerSelector"
#define SFNC_CHUNKTIMERVALUE "ChunkTimerValue"
#define SFNC_CHUNKTIMER "ChunkTimer"
#define SFNC_CHUNKEXPOSURETIME "ChunkExposureTime"
#define SFNC_CHUNKGAINSELECTOR "ChunkGainSelector"
#define SFNC_CHUNKGAIN "ChunkGain"
#define SFNC_CHUNKBLACKLEVELSELECTOR "ChunkBlackLevelSelector"
#define SFNC_CHUNKBLACKLEVEL "ChunkBlackLevel"
#define SFNC_CHUNKLINEPITCH "ChunkLinePitch"
#define SFNC_CHUNKFRAMEID "ChunkFrameID"
#define SFNC_FILEACCESSCONTROL "FileAccessControl"
#define SFNC_FILESELECTOR "FileSelector"
#define SFNC_FILEOPERATIONSELECTOR "FileOperationSelector"
#define SFNC_FILEOPERATIONEXECUTE "FileOperationExecute"
#define SFNC_FILEOPENMODE "FileOpenMode"
#define SFNC_FILEACCESSBUFFER "FileAccessBuffer"
#define SFNC_FILEACCESSOFFSET "FileAccessOffset"
#define SFNC_FILEACCESSLENGTH "FileAccessLength"
#define SFNC_FILEOPERATIONSTATUS "FileOperationStatus"
#define SFNC_FILEOPERATIONRESULT "FileOperationResult"
#define SFNC_FILESIZE "FileSize"
#define SFNC_COLORTRANSFORMATIONCONTROL "ColorTransformationControl"
#define SFNC_COLORTRANSFORMATIONSELECTOR "ColorTransformationSelector"
#define SFNC_COLORTRANSFORMATIONENABLE "ColorTransformationEnable"
#define SFNC_COLORTRANSFORMATIONVALUESELECTOR "ColorTransformationValueSelector"
#define SFNC_COLORTRANSFORMATIONVALUE "ColorTransformationValue"
#define SFNC_ACTIONCONTROL "ActionControl"
#define SFNC_ACTIONDEVICEKEY "ActionDeviceKey"
#define SFNC_ACTIONSELECTOR "ActionSelector"
#define SFNC_ACTIONGROUPMASK "ActionGroupMask"
#define SFNC_ACTIONGROUPKEY "ActionGroupKey"
#define GENTL_SFNC_TLPORT "TLPort"
#define GENTL_SFNC_TLVENDORNAME "TLVendorName"
#define GENTL_SFNC_TLMODELNAME "TLModelName"
#define GENTL_SFNC_TLID "TLID"
#define GENTL_SFNC_TLVERSION "TLVersion"
#define GENTL_SFNC_TLPATH "TLPath"
#define GENTL_SFNC_TLTYPE "TLType"
#define GENTL_SFNC_GENTLVERSIONMAJOR "GenTLVersionMajor"
#define GENTL_SFNC_GENTLVERSIONMINOR "GenTLVersionMinor"
#define GENTL_SFNC_GENTLINTERFACEUPDATELIST "InterfaceUpdateList"
#define GENTL_SFNC_GENTLINTERFACESELECTOR "InterfaceSelector"
#define GENTL_SFNC_GENTLINTERFACEID "InterfaceID"
#define GENTL_SFNC_GEVVERSIONMAJOR "GevVersionMajor"
#define GENTL_SFNC_GEVVERSIONMINOR "GevVersionMinor"
#define GENTL_SFNC_GEVINTERFACEMACADDRESS "GevInterfaceMACAddress"
#define GENTL_SFNC_GEVINTERFACEDEFAULTIPADDRESS "GevInterfaceDefaultIPAddress"
#define GENTL_SFNC_GEVINTERFACEDEFAULTSUBNETMASK "GevInterfaceDefaultSubnetMask"
#define GENTL_SFNC_GEVINTERFACEDEFAULTGATEWAY "GevInterfaceDefaultGateway"
#define GENTL_SFNC_INTERFACEPORT "InterfacePort"
#define GENTL_SFNC_INTERFACEID "InterfaceID"
#define GENTL_SFNC_INTERFACETYPE "InterfaceType"
#define GENTL_SFNC_DEVICEUPDATELIST "DeviceUpdateList"
#define GENTL_SFNC_DEVICESELECTOR "DeviceSelector"
#define GENTL_SFNC_DEVICEID "DeviceID"
#define GENTL_SFNC_DEVICEVENDORNAME "DeviceVendorName"
#define GENTL_SFNC_DEVICEMODELNAME "DeviceModelName"
#define GENTL_SFNC_DEVICEACCESSSTATUS "DeviceAccessStatus"
#define GENTL_SFNC_GEVINTERFACEGATEWAYSELECTOR "GevInterfaceGatewaySelector"
#define GENTL_SFNC_GEVINTERFACEGATEWAY "GevInterfaceGateway"
#define GENTL_SFNC_GEVINTERFACEMACADDRESS "GevInterfaceMACAddress"
#define GENTL_SFNC_GEVINTERFACESUBNETSELECTOR "GevInterfaceSubnetSelector"
#define GENTL_SFNC_GEVINTERFACESUBNETIPADDRESS "GevInterfaceSubnetIPAddress"
#define GENTL_SFNC_GEVINTERFACESUBNETMASK "GevInterfaceSubnetMask"
#define GENTL_SFNC_DEVICEPORT "DevicePort"
#define GENTL_SFNC_DEVICEID "DeviceID"
#define GENTL_SFNC_DEVICEVENDORNAME "DeviceVendorName"
#define GENTL_SFNC_DEVICEMODELNAME "DeviceModelName"
#define GENTL_SFNC_DEVICETYPE "DeviceType"
#define GENTL_SFNC_STREAMSELECTOR "StreamSelector"
#define GENTL_SFNC_STREAMID "StreamID"
#define GENTL_SFNC_GEVDEVICEIPADDRESS "GevDeviceIPAddress"
#define GENTL_SFNC_GEVDEVICESUBNETMASK "GevDeviceSubnetMask"
#define GENTL_SFNC_GEVDEVICEMACADDRESS "GevDeviceMACAddress"
#define GENTL_SFNC_GEVDEVICEGATEWAY "GevDeviceGateway"
#define GENTL_SFNC_DEVICEENDIANESSMECHANISM "DeviceEndianessMechanism"
#define GENTL_SFNC_STREAMPORT "StreamPort"
#define GENTL_SFNC_STREAMID "StreamID"
#define GENTL_SFNC_STREAMANNOUNCEDBUFFERCOUNT "StreamAnnouncedBufferCount"
#define GENTL_SFNC_STREAMACQUISITIONMODESELECTOR "StreamAcquisitionModeSelector"
#define GENTL_SFNC_STREAMANNOUNCEBUFFERMINIMUM "StreamAnnounceBufferMinimum"
#define GENTL_SFNC_STREAMTYPE "StreamType"
#define GENTL_SFNC_BUFFERPORT "BufferPort"
#define GENTL_SFNC_BUFFERDATA "BufferData"
#define GENTL_SFNC_BUFFERUSERDATA "BufferUserData"
// selector values
#define SFNC_CHUNKSELECTORVALUE_IMAGE "Image"
#define SFNC_CHUNKSELECTORVALUE_OFFSETX "OffsetX"
#define SFNC_CHUNKSELECTORVALUE_OFFSETY "OffsetY"
#define SFNC_CHUNKSELECTORVALUE_WIDTH "Width"
#define SFNC_CHUNKSELECTORVALUE_HEIGHT "Height"
#define SFNC_CHUNKSELECTORVALUE_PIXELFORMAT "PixelFormat"
#define SFNC_CHUNKSELECTORVALUE_DYNAMICRANGEMAX "DynamicRangeMax"
#define SFNC_CHUNKSELECTORVALUE_DYNAMICRANGEMIN "DynamicRangeMin"
#define SFNC_CHUNKSELECTORVALUE_PIXELDYNAMICRANGEMAX "PixelDynamicRangeMax"
#define SFNC_CHUNKSELECTORVALUE_PIXELDYNAMICRANGEMIN "PixelDynamicRangeMin"
#define SFNC_CHUNKSELECTORVALUE_TIMESTAMP "Timestamp"
#define SFNC_CHUNKSELECTORVALUE_LINESTATUSALL "LineStatusAll"
#define SFNC_CHUNKSELECTORVALUE_COUNTERVALUE "CounterValue"
#define SFNC_CHUNKSELECTORVALUE_TIMERVALUE "TimerValue"
#define SFNC_CHUNKSELECTORVALUE_EXPOSURETIME "ExposureTime"
#define SFNC_CHUNKSELECTORVALUE_GAIN "Gain"
#define SFNC_CHUNKSELECTORVALUE_BLACKLEVEL "BlackLevel"
#define SFNC_CHUNKSELECTORVALUE_LINEPITCH "LinePitch"
#define SFNC_CHUNKSELECTORVALUE_FRAMEID "FrameID"
#define SFNC_DEVICE_TEMERATURESELECTORVALUE_SENSOR "Sensor"
#define SFNC_DEVICE_TEMERATURESELECTORVALUE_MAINBOARD "Mainboard"
#define SFNC_DEVICE_CLOCKSELECTORVALUE_SENSOR "Sensor"
#define SFNC_DEVICE_CLOCKSELECTORVALUE_SENSORDIGITIZATION "SensorDigitization"
#define SFNC_DEVICE_CLOCKSELECTORVALUE_CAMERALINK "CameraLink"
#define SFNC_DEVICE_SERIALPORTSELECTORVALUE_CAMERALINK "CameraLink"
#define SFNC_TESTIMAGESELECTORVALUE_OFF "Off"
#define SFNC_TESTIMAGESELECTORVALUE_BLACK "Black"
#define SFNC_TESTIMAGESELECTORVALUE_WHITE "White"
#define SFNC_TESTIMAGESELECTORVALUE_GREYHORIZONTALRAMP "GreyHorizontalRamp"
#define SFNC_TESTIMAGESELECTORVALUE_GREYVERTICALRAMP "GreyVerticalRamp"
#define SFNC_TESTIMAGESELECTORVALUE_GREYHORIZONTALRAMPMOVING "GreyHorizontalRampMoving"
#define SFNC_TESTIMAGESELECTORVALUE_GREYVERTICALRAMPMOVING "GreyVerticalRampMoving"
#define SFNC_TESTIMAGESELECTORVALUE_HORIZONTALLINEMOVING "HorzontalLineMoving"
#define SFNC_TESTIMAGESELECTORVALUE_VERTICALLINEMOVING "VerticalLineMoving"
#define SFNC_TESTIMAGESELECTORVALUE_COLORBAR "ColorBar"
#define SFNC_TESTIMAGESELECTORVALUE_FRAMECOUNTER "FrameCounter"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_ACQUISITIONTRIGGERWAIT "AcquisitionTriggerWait"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_ACQUISITIONACTIVE "AcquisitionActive"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_ACQUISITIONTRANSFER "AcquisitionTransfer"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_FRAMETRIGGERWAIT "FrameTriggerWait"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_FRAMEACTIVE "FrameActive"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_FRAMETRANSFER "FrameTransfer"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_EXPOSUREACTIVE "ExposureActive"
#define SFNC_TRIGGERSELECTORVALUE_ACQUISITIONSTART "AcquisitionStart"
#define SFNC_TRIGGERSELECTORVALUE_ACQUISITIONEND "AcquisitionEnd"
#define SFNC_TRIGGERSELECTORVALUE_ACQUISITIONACTIVE "AcquisitionActive"
#define SFNC_TRIGGERSELECTORVALUE_FRAMESTART "FrameStart"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEEND "FrameEnd"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEACTIVE "FrameActive"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEBURSTSTART "FrameBurstStart"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEBURSTEND "FrameBurstEnd"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEBURSTACTIVE "FrameBurstActive"
#define SFNC_TRIGGERSELECTORVALUE_LINESTART "LineStart"
#define SFNC_TRIGGERSELECTORVALUE_EXPOSURESTART "ExposureStart"
#define SFNC_TRIGGERSELECTORVALUE_EXPOSUREEND "ExposureEnd"
#define SFNC_TRIGGERSELECTORVALUE_EXPOSUREACTIVE "ExposureActive"
#define SFNC_LINESELECTORVALUE_LINE0 "Line0"
#define SFNC_LINESELECTORVALUE_LINE1 "Line1"
#define SFNC_LINESELECTORVALUE_LINE2 "Line2"
#define SFNC_LINESELECTORVALUE_LINE3 "Line3"
#define SFNC_LINESELECTORVALUE_LINE4 "Line4"
#define SFNC_LINESELECTORVALUE_LINE5 "Line5"
#define SFNC_LINESELECTORVALUE_LINE6 "Line6"
#define SFNC_LINESELECTORVALUE_LINE7 "Line7"
#define SFNC_LINESELECTORVALUE_CC1 "CC1"
#define SFNC_LINESELECTORVALUE_CC2 "CC2"
#define SFNC_LINESELECTORVALUE_CC3 "CC3"
#define SFNC_LINESELECTORVALUE_CC4 "CC4"
#define SFNC_USEROUTPUTSELECTORVALUE_USEROUTPUT0 "UserOutput0"
#define SFNC_USEROUTPUTSELECTORVALUE_USEROUTPUT1 "UserOutput1"
#define SFNC_USEROUTPUTSELECTORVALUE_USEROUTPUT2 "UserOutput2"
#define SFNC_USEROUTPUTSELECTORVALUE_USEROUTPUT3 "UserOutput3"
#define SFNC_COUNTERSELECTORVALUE_COUNTER1 "Counter1"
#define SFNC_COUNTERSELECTORVALUE_COUNTER2 "Counter2"
#define SFNC_COUNTERSELECTORVALUE_COUNTER3 "Counter3"
#define SFNC_COUNTERSELECTORVALUE_COUNTER4 "Counter4"
#define SFNC_COUNTERSELECTORVALUE_COUNTER5 "Counter5"
#define SFNC_COUNTERSELECTORVALUE_COUNTER6 "Counter6"
#define SFNC_COUNTERSELECTORVALUE_COUNTER7 "Counter7"
#define SFNC_COUNTERSELECTORVALUE_COUNTER8 "Counter8"
#define SFNC_TIMERSELECTORVALUE_TIMER1 "Timer1"
#define SFNC_TIMERSELECTORVALUE_TIMER2 "Timer2"
#define SFNC_TIMERSELECTORVALUE_TIMER3 "Timer3"
#define SFNC_TIMERSELECTORVALUE_TIMER4 "Timer4"
#define SFNC_TIMERSELECTORVALUE_TIMER5 "Timer5"
#define SFNC_TIMERSELECTORVALUE_TIMER6 "Timer6"
#define SFNC_TIMERSELECTORVALUE_TIMER7 "Timer7"
#define SFNC_TIMERSELECTORVALUE_TIMER8 "Timer8"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONTRIGGER "AcquisitionTrigger"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONSTART "AcquisitionStart"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONEND "AcquisitionEnd"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONTRANSFERSTART "AcquisitionTransferStart"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONTRANSFEREND "AcquisitionTransferEnd"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONERROR "AcquisitionError"
#define SFNC_EVENTSELECTORVALUE_FRAMETRIGGER "FrameTrigger"
#define SFNC_EVENTSELECTORVALUE_FRAMESTART "FrameStart"
#define SFNC_EVENTSELECTORVALUE_FRAMEEND "FrameEnd"
#define SFNC_EVENTSELECTORVALUE_FRAMEBURSTSTART "FrameBurstStart"
#define SFNC_EVENTSELECTORVALUE_FRAMEBURSTEND "FrameBurstEnd"
#define SFNC_EVENTSELECTORVALUE_FRAMETRANSFERSTART "FrameTransferStart"
#define SFNC_EVENTSELECTORVALUE_FRAMETRANSFEREND "FrameTransferEnd"
#define SFNC_EVENTSELECTORVALUE_EXPOSURESTART "ExposureStart"
#define SFNC_EVENTSELECTORVALUE_EXPOSUREEND "ExposureEnd"
#define SFNC_EVENTSELECTORVALUE_COUNTER1START "Counter1Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER2START "Counter2Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER3START "Counter3Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER4START "Counter4Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER5START "Counter5Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER6START "Counter6Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER7START "Counter7Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER8START "Counter8Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER1END "Counter1End"
#define SFNC_EVENTSELECTORVALUE_COUNTER2END "Counter2End"
#define SFNC_EVENTSELECTORVALUE_COUNTER3END "Counter3End"
#define SFNC_EVENTSELECTORVALUE_COUNTER4END "Counter4End"
#define SFNC_EVENTSELECTORVALUE_COUNTER5END "Counter5End"
#define SFNC_EVENTSELECTORVALUE_COUNTER6END "Counter6End"
#define SFNC_EVENTSELECTORVALUE_COUNTER7END "Counter7End"
#define SFNC_EVENTSELECTORVALUE_COUNTER8END "Counter8End"
#define SFNC_EVENTSELECTORVALUE_TIMER1START "Timer1Start"
#define SFNC_EVENTSELECTORVALUE_TIMER2START "Timer2Start"
#define SFNC_EVENTSELECTORVALUE_TIMER3START "Timer3Start"
#define SFNC_EVENTSELECTORVALUE_TIMER4START "Timer4Start"
#define SFNC_EVENTSELECTORVALUE_TIMER5START "Timer5Start"
#define SFNC_EVENTSELECTORVALUE_TIMER6START "Timer6Start"
#define SFNC_EVENTSELECTORVALUE_TIMER7START "Timer7Start"
#define SFNC_EVENTSELECTORVALUE_TIMER8START "Timer8Start"
#define SFNC_EVENTSELECTORVALUE_TIMER1END "Timer1End"
#define SFNC_EVENTSELECTORVALUE_TIMER2END "Timer2End"
#define SFNC_EVENTSELECTORVALUE_TIMER3END "Timer3End"
#define SFNC_EVENTSELECTORVALUE_TIMER4END "Timer4End"
#define SFNC_EVENTSELECTORVALUE_TIMER5END "Timer5End"
#define SFNC_EVENTSELECTORVALUE_TIMER6END "Timer6End"
#define SFNC_EVENTSELECTORVALUE_TIMER7END "Timer7End"
#define SFNC_EVENTSELECTORVALUE_TIMER8END "Timer8End"
#define SFNC_EVENTSELECTORVALUE_LINE0RISINGEDGE "Line0RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE1RISINGEDGE "Line1RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE2RISINGEDGE "Line2RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE3RISINGEDGE "Line3RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE4RISINGEDGE "Line4RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE5RISINGEDGE "Line5RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE6RISINGEDGE "Line6RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE7RISINGEDGE "Line7RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE0FALLINGEDGE "Line0FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE1FALLINGEDGE "Line1FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE2FALLINGEDGE "Line2FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE3FALLINGEDGE "Line3FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE4FALLINGEDGE "Line4FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE5FALLINGEDGE "Line5FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE6FALLINGEDGE "Line6FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE7FALLINGEDGE "Line7FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE0ANYEDGE "Line0AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE1ANYEDGE "Line1AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE2ANYEDGE "Line2AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE3ANYEDGE "Line3AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE4ANYEDGE "Line4AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE5ANYEDGE "Line5AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE6ANYEDGE "Line6AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE7ANYEDGE "Line7AnyEdge"
#define SFNC_EVENTSELECTORVALUE_ERROR "Error"
#define SFNC_EVENTSELECTORVALUE_ERRORS "Errors"
#define SFNC_GAINSELECTORVALUE_ALL "All"
#define SFNC_GAINSELECTORVALUE_RED "Red"
#define SFNC_GAINSELECTORVALUE_GREEN "Green"
#define SFNC_GAINSELECTORVALUE_BLUE "Blue"
#define SFNC_GAINSELECTORVALUE_Y "Y"
#define SFNC_GAINSELECTORVALUE_U "U"
#define SFNC_GAINSELECTORVALUE_V "V"
#define SFNC_GAINSELECTORVALUE_TAP1 "Tap1"
#define SFNC_GAINSELECTORVALUE_TAP2 "Tap2"
#define SFNC_GAINSELECTORVALUE_TAP3 "Tap3"
#define SFNC_GAINSELECTORVALUE_TAP4 "Tap4"
#define SFNC_GAINSELECTORVALUE_TAP5 "Tap5"
#define SFNC_GAINSELECTORVALUE_TAP6 "Tap6"
#define SFNC_GAINSELECTORVALUE_TAP7 "Tap7"
#define SFNC_GAINSELECTORVALUE_TAP8 "Tap8"
#define SFNC_GAINSELECTORVALUE_ANALOGALL "AnalogAll"
#define SFNC_GAINSELECTORVALUE_ANALOGRED "AnalogRed"
#define SFNC_GAINSELECTORVALUE_ANALOGGREEN "AnalogGreen"
#define SFNC_GAINSELECTORVALUE_ANALOGBLUE "AnalogBlue"
#define SFNC_GAINSELECTORVALUE_ANALOGY "AnalogY"
#define SFNC_GAINSELECTORVALUE_ANALOGU "AnalogU"
#define SFNC_GAINSELECTORVALUE_ANALOGV "AnalogV"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP1 "AnalogTap1"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP2 "AnalogTap2"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP3 "AnalogTap3"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP4 "AnalogTap4"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP5 "AnalogTap5"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP6 "AnalogTap6"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP7 "AnalogTap7"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP8 "AnalogTap8"
#define SFNC_GAINSELECTORVALUE_DIGITALALL "DigitalAll"
#define SFNC_GAINSELECTORVALUE_DIGITALRED "DigitalRed"
#define SFNC_GAINSELECTORVALUE_DIGITALGREEN "DigitalGreen"
#define SFNC_GAINSELECTORVALUE_DIGITALBLUE "DigitalBlue"
#define SFNC_GAINSELECTORVALUE_DIGITALY "DigitalY"
#define SFNC_GAINSELECTORVALUE_DIGITALU "DigitalU"
#define SFNC_GAINSELECTORVALUE_DIGITALV "DigitalV"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP1 "DigitalTap1"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP2 "DigitalTap2"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP3 "DigitalTap3"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP4 "DigitalTap4"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP5 "DigitalTap5"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP6 "DigitalTap6"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP7 "DigitalTap7"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP8 "DigitalTap8"
#define SFNC_BLACKLEVELSELECTORVALUE_ALL "All"
#define SFNC_BLACKLEVELSELECTORVALUE_RED "Red"
#define SFNC_BLACKLEVELSELECTORVALUE_GREEN "Green"
#define SFNC_BLACKLEVELSELECTORVALUE_BLUE "Blue"
#define SFNC_BLACKLEVELSELECTORVALUE_Y "Y"
#define SFNC_BLACKLEVELSELECTORVALUE_U "U"
#define SFNC_BLACKLEVELSELECTORVALUE_V "V"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP1 "Tap1"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP2 "Tap2"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP3 "Tap3"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP4 "Tap4"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP5 "Tap5"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP6 "Tap6"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP7 "Tap7"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP8 "Tap8"
#define SFNC_WHITECLIPSELECTORVALUE_ALL "All"
#define SFNC_WHITECLIPSELECTORVALUE_RED "Red"
#define SFNC_WHITECLIPSELECTORVALUE_GREEN "Green"
#define SFNC_WHITECLIPSELECTORVALUE_BLUE "Blue"
#define SFNC_WHITECLIPSELECTORVALUE_Y "Y"
#define SFNC_WHITECLIPSELECTORVALUE_U "U"
#define SFNC_WHITECLIPSELECTORVALUE_V "V"
#define SFNC_WHITECLIPSELECTORVALUE_TAP1 "Tap1"
#define SFNC_WHITECLIPSELECTORVALUE_TAP2 "Tap2"
#define SFNC_WHITECLIPSELECTORVALUE_TAP3 "Tap3"
#define SFNC_WHITECLIPSELECTORVALUE_TAP4 "Tap4"
#define SFNC_WHITECLIPSELECTORVALUE_TAP5 "Tap5"
#define SFNC_WHITECLIPSELECTORVALUE_TAP6 "Tap6"
#define SFNC_WHITECLIPSELECTORVALUE_TAP7 "Tap7"
#define SFNC_WHITECLIPSELECTORVALUE_TAP8 "Tap8"
#define SFNC_BALANCERATIOSELECTORVALUE_ALL "All"
#define SFNC_BALANCERATIOSELECTORVALUE_RED "Red"
#define SFNC_BALANCERATIOSELECTORVALUE_GREEN "Green"
#define SFNC_BALANCERATIOSELECTORVALUE_BLUE "Blue"
#define SFNC_BALANCERATIOSELECTORVALUE_Y "Y"
#define SFNC_BALANCERATIOSELECTORVALUE_U "U"
#define SFNC_BALANCERATIOSELECTORVALUE_V "V"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP1 "Tap1"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP2 "Tap2"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP3 "Tap3"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP4 "Tap4"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP5 "Tap5"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP6 "Tap6"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP7 "Tap7"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP8 "Tap8"
#define SFNC_LUTSELECTORVALUE_LUMINANCE "Luminance"
#define SFNC_LUTSELECTORVALUE_RED "Red"
#define SFNC_LUTSELECTORVALUE_GREEN "Green"
#define SFNC_LUTSELECTORVALUE_BLUE "Blue"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_IPCONFIGURATIONLLA "IPConfigurationLLA"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_IPCONFIGURATIONDHCP "IPConfigurationDHCP"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_IPCONFIGURATIONPERSISTENTIP "IPConfigurationPersistentIP"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNELSOURCESOCKET "StreamChannelSourceSocket"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_MESSAGECHANNELSOURCESOCKET "MessageChannelSourceSocket"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_COMMANDSCONCATENATION "CommandsConcatenation"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_WRITEMEM "WriteMem"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_PACKETRESEND "PacketResend"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_EVENT "Event"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_EVENTDATA "EventData"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_PENDINGACK "PendingAck"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_ACTION "Action"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_PRIMARYAPPLICATIONSWITCHOVER "PrimaryApplicationSwitchover"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_EXTENDEDSTATUSCODES "ExtendedStatusCodes"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_DISCOVERYACKDELAY "DiscoveryAckDelay"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_DISCOVERYACKDELAYWRITABLE "DiscoveryAckDelayWritable"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_TESTDATA "TestData"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_MANIFESTTABLE "ManifestTable"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_CCPAPPLICATIONSOCKET "CCPApplicationSocket"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_LINKSPEED "LinkSpeed"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_HEARTBEATDISABLE "HeartbeatDisable"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_SERIALNUMBER "SerialNumber"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_USERDEFINEDNAME "UserDefinedName"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL0BIGANDLITTLEENDIAN "StreamChannel0BigAndLittleEndian"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL0IPREASSEMBLY "StreamChannel0IPReassembly"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL0UNCONDITIONALSTREAMING "StreamChannel0UnconditionalStreaming"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL0EXTENDEDCHUNKDATA "StreamChannel0ExtendedChunkData"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL1BIGANDLITTLEENDIAN "StreamChannel1BigAndLittleEndian"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL1IPREASSEMBLY "StreamChannel1IPReassembly"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL1UNCONDITIONALSTREAMING "StreamChannel1UnconditionalStreaming"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL1EXTENDEDCHUNKDATA "StreamChannel1ExtendedChunkData"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL2BIGANDLITTLEENDIAN "StreamChannel2BigAndLittleEndian"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL2IPREASSEMBLY "StreamChannel2IPReassembly"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL2UNCONDITIONALSTREAMING "StreamChannel2UnconditionalStreaming"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL2EXTENDEDCHUNKDATA "StreamChannel2ExtendedChunkData"
#define SFNC_USERSETSELECTORVALUE_DEFAULT "Default"
#define SFNC_USERSETSELECTORVALUE_USERSET1 "UserSet1"
#define SFNC_USERSETSELECTORVALUE_USERSET2 "UserSet2"
#define SFNC_USERSETSELECTORVALUE_USERSET3 "UserSet3"
#define SFNC_USERSETSELECTORVALUE_USERSET4 "UserSet4"
#define SFNC_USERSETDEFAULTSELECTORVALUE_DEFAULT "Default"
#define SFNC_USERSETDEFAULTSELECTORVALUE_USERSET1 "UserSet1"
#define SFNC_USERSETDEFAULTSELECTORVALUE_USERSET2 "UserSet2"
#define SFNC_USERSETDEFAULTSELECTORVALUE_USERSET3 "UserSet3"
#define SFNC_USERSETDEFAULTSELECTORVALUE_USERSET4 "UserSet4"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER1 "Counter1"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER2 "Counter2"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER3 "Counter3"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER4 "Counter4"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER5 "Counter5"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER6 "Counter6"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER7 "Counter7"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER8 "Counter8"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER1 "Timer1"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER2 "Timer2"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER3 "Timer3"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER4 "Timer4"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER5 "Timer5"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER6 "Timer6"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER7 "Timer7"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER8 "Timer8"
#define SFNC_CHUNKGAINSELECTORVALUE_ALL "All"
#define SFNC_CHUNKGAINSELECTORVALUE_RED "Red"
#define SFNC_CHUNKGAINSELECTORVALUE_GREEN "Green"
#define SFNC_CHUNKGAINSELECTORVALUE_BLUE "Blue"
#define SFNC_CHUNKGAINSELECTORVALUE_Y "Y"
#define SFNC_CHUNKGAINSELECTORVALUE_U "U"
#define SFNC_CHUNKGAINSELECTORVALUE_V "V"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP1 "Tap1"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP2 "Tap2"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP3 "Tap3"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP4 "Tap4"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP5 "Tap5"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP6 "Tap6"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP7 "Tap7"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP8 "Tap8"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGALL "AnalogAll"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGRED "AnalogRed"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGGREEN "AnalogGreen"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGBLUE "AnalogBlue"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGY "AnalogY"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGU "AnalogU"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGV "AnalogV"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP1 "AnalogTap1"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP2 "AnalogTap2"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP3 "AnalogTap3"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP4 "AnalogTap4"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP5 "AnalogTap5"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP6 "AnalogTap6"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP7 "AnalogTap7"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP8 "AnalogTap8"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALALL "DigitalAll"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALRED "DigitalRed"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALGREEN "DigitalGreen"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALBLUE "DigitalBlue"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALY "DigitalY"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALU "DigitalU"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALV "DigitalV"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP1 "DigitalTap1"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP2 "DigitalTap2"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP3 "DigitalTap3"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP4 "DigitalTap4"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP5 "DigitalTap5"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP6 "DigitalTap6"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP7 "DigitalTap7"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP8 "DigitalTap8"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_ALL "All"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_RED "Red"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_GREEN "Green"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_BLUE "Blue"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_Y "Y"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_U "U"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_V "V"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP1 "Tap1"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP2 "Tap2"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP3 "Tap3"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP4 "Tap4"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP5 "Tap5"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP6 "Tap6"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP7 "Tap7"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP8 "Tap8"
#define SFNC_FILESELECTORVALUE_USERSETDEFAULT "UserSetDefault"
#define SFNC_FILESELECTORVALUE_USERSET1 "UserSet1"
#define SFNC_FILESELECTORVALUE_USERSET2 "UserSet2"
#define SFNC_FILESELECTORVALUE_USERSET3 "UserSet3"
#define SFNC_FILESELECTORVALUE_USERSET4 "UserSet4"
#define SFNC_FILESELECTORVALUE_LUTLUMINANCE "LUTLuminance"
#define SFNC_FILESELECTORVALUE_LUTRED "LUTRed"
#define SFNC_FILESELECTORVALUE_LUTGREEN "LUTGreen"
#define SFNC_FILESELECTORVALUE_LUTBLUE "LUTBlue"
#define SFNC_FILEOPERATIONSELECTORVALUE_OPEN "Open"
#define SFNC_FILEOPERATIONSELECTORVALUE_CLOSE "Close"
#define SFNC_FILEOPERATIONSELECTORVALUE_READ "Read"
#define SFNC_FILEOPERATIONSELECTORVALUE_WRITE "Write"
#define SFNC_FILEOPERATIONSELECTORVALUE_DELETE "Delete"
#define SFNC_COLORTRANSFORMATIONSELECTORVALUE_RGBTORGB "RGBtoRGB"
#define SFNC_COLORTRANSFORMATIONSELECTORVALUE_RGBTOYUV "RGBtoYUV"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain00 "Gain00"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain01 "Gain01"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain02 "Gain02"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain10 "Gain10"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain11 "Gain11"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain12 "Gain12"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain20 "Gain20"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain21 "Gain21"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain22 "Gain22"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Offset0 "Offset0"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Offset1 "Offset1"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Offset2 "Offset2"
#endif //_BGAPI2_FEATURENAMES_H__

File diff suppressed because it is too large Load Diff

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigFile VendorName="Baumer" MajorVersion="2" MinorVersion="2" SubMinorVersion="0">
<FileVersion>2.3.0.0</FileVersion>
<Resend>
<Version>1</Version>
<Version1>
<!--Set the maximum number of resend requests per packet (default 3)-->
<MaxResendsPerPacket>3</MaxResendsPerPacket>
<ResendRetryThreshold>20</ResendRetryThreshold>
<ResendHostTimeout>1000</ResendHostTimeout>
<ThroughputCalculationEntrys>25</ThroughputCalculationEntrys>
<!--Set the maximum number of resend requests per image (default 500)-->
<MaxResendsPerImage>500</MaxResendsPerImage>
<!--Set the number of packets to wait before sending the first resend requests (default 0)-->
<FirstResendWaitPackets>0</FirstResendWaitPackets>
<!--Set the number of packets to wait before sending the first resend requests if the camera sends the data over two physical links (default 20)-->
<FirstResendWaitPacketsDualLink>20</FirstResendWaitPacketsDualLink>
<!--Set the time in ms to wait before sending the first resend requests (default 150)-->
<FirstResendWaitTime>150</FirstResendWaitTime>
<!--Set the number of packets to wait before sending the next resend requests (default 20)-->
<NextResendWaitPackets>20</NextResendWaitPackets>
<!--Set the number of packets to wait before sending the next resend requests if the camera sends the data over two physical links (default 20)-->
<NextResendWaitPacketsDualLink>20</NextResendWaitPacketsDualLink>
<!--Set the time in ms to wait before sending the next resend requests (default 100)-->
<NextResendWaitTime>100</NextResendWaitTime>
<!--Set socket read timeout, prevent cpu load, 0 not allowed and set to 1 (default 50)-->
<SocketReadTimeout>100</SocketReadTimeout>
<!--Packet dropper enable with 1, disable with 0(default 0)-->
<PacketDropperEnable>0</PacketDropperEnable>
</Version1>
</Resend>
<GVCP>
<!--Set Timeout (in ms) and number of retries for control channel
0 = the pending timeout register of camera is used for control channel timeout (default)
1..60000 = timeout value
-->
<ControlChannelTimeout>0</ControlChannelTimeout>
<!--The number of retries of commands on the control channel before the GigE Producer stops sending any further commands
valid values: 0..4294967295 (0xffffffff)
default value: 3
-->
<ControlChannelRetries>3</ControlChannelRetries>
<!--After a failed command the control channel is locked, that means no further commands were transmitted. This feature controls this locking mechanism.
valid values: 1 - the GigE Producer locks the control channel after a failing command. No further command were transmitted.
0 - the GigE Producer doesn't lock the control channel after a failing command. All further commands were transmitted.
default value: 1
-->
<UseControlChannelLocking>1</UseControlChannelLocking>
<!--Set Timeout(in ms) and number of retries for asynchronous messages from the camera (if supported) -->
<MessageChannelTimeout>100</MessageChannelTimeout>
<MessageChannelRetries>2</MessageChannelRetries>
</GVCP>
<GEV>
<!--Maximum packet size for GigE transmission. This value is used as upper limitation for
automatic MTU (maximum transmission unit) detection. Set this value to 0 the MTU detection
uses the preferred maximum of 9000. The smallest possible value is 576 and the highest value is 16380.
If you set a value outside this range the preferred maximum of 9000 is used. (default 9000)
-->
<DeviceStreamChannelPacketSizeMax>9000</DeviceStreamChannelPacketSizeMax>
<!--
0 means enable automatic MTU (maximum transmission unit) detection. If you specify this value the
MTU detection is disabled and the value DeviceStreamChannelPacketSizeMax is ignored.
The specified value is used directly as packet size.
The smallest possible value is 576 and the highest value is 16380. If you set a value outside the range
the minimum packet size of 576 is used.
-->
<DeviceStreamChannelPacketSizeFix>0</DeviceStreamChannelPacketSizeFix>
<!--
This value controls the size of socket buffer for the control sockets. The memory is calculated by 2^n.
The smallest possible value is 14 for 16384 bytes and the higest value is 26 for 67108864 bytes. If you
set a value outside the range the minimum or maximum value is used.
-->
<ControlSocketBufferSize>21</ControlSocketBufferSize>
<!--
This value controls the size of socket buffer for the stream sockets. The memory is calculated by 2^n.
The smallest possible value is 14 for 16384 bytes and the higest value is 26 for 67108864 bytes. If you
set a value outside the range the minimum or maximum value is used.
-->
<StreamSocketBufferSize>25</StreamSocketBufferSize>
<!--
This value controls the size of socket buffer for the message sockets. The memory is calculated by 2^n.
The smallest possible value is 14 for 16384 bytes and the higest value is 26 for 67108864 bytes. If you
set a value outside the range the minimum or maximum value is used.
-->
<MessageStreamSocketBufferSize>21</MessageStreamSocketBufferSize>
<!--
This value controls the size of the filter driver packet queue. Choose a value between 10 and 100,000 or
the defaut value of 5000 will be used.
-->
<FilterDriverBufferCount>5000</FilterDriverBufferCount>
<!--
This value controls the interval for sending packets on the stream channnel. This behavior is used to allow stream data to bypass firewalls.
Setting this value to 0 will stop sending packets on the stream channel.
-->
<StreamChannelSendInterval>30</StreamChannelSendInterval>
<!--
This value controls the interval for sending packets on the message channnel. This behavior is used to allow event data to bypass firewalls.
Setting this value to 0 will stop sending packets on the message channel.
-->
<MessageChannelSendInterval>30</MessageChannelSendInterval>
</GEV>
<SYSTEM>
<IncreaseThreadPriority>0</IncreaseThreadPriority>
<IncreasePriorityClass>0</IncreasePriorityClass>
</SYSTEM>
</ConfigFile>
<!-- EOF -->

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigFile VendorName="Baumer" MajorVersion="2" MinorVersion="2" SubMinorVersion="0">
<FileVersion>2.2.0.0</FileVersion>
<U3V>
<!-- image buffer size for USB transmission -->
<U3VImageBufferSize>0x10000</U3VImageBufferSize>
<U3VMaxResponseDefaultTime>500</U3VMaxResponseDefaultTime>
<U3VMaxFifoSize>1024</U3VMaxFifoSize>
</U3V>
<SYSTEM>
<IncreaseThreadPriority>0</IncreaseThreadPriority>
<IncreasePriorityClass>0</IncreasePriorityClass>
</SYSTEM>
</ConfigFile>
<!-- EOF -->

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigFile VendorName="Baumer" MajorVersion="2" MinorVersion="2" SubMinorVersion="0">
<FileVersion>2.3.0.0</FileVersion>
<Resend>
<Version>1</Version>
<Version1>
<!--Set the maximum number of resend requests per packet (default 3)-->
<MaxResendsPerPacket>3</MaxResendsPerPacket>
<ResendRetryThreshold>20</ResendRetryThreshold>
<ResendHostTimeout>1000</ResendHostTimeout>
<ThroughputCalculationEntrys>25</ThroughputCalculationEntrys>
<!--Set the maximum number of resend requests per image (default 500)-->
<MaxResendsPerImage>500</MaxResendsPerImage>
<!--Set the number of packets to wait before sending the first resend requests (default 0)-->
<FirstResendWaitPackets>0</FirstResendWaitPackets>
<!--Set the number of packets to wait before sending the first resend requests if the camera sends the data over two physical links (default 20)-->
<FirstResendWaitPacketsDualLink>20</FirstResendWaitPacketsDualLink>
<!--Set the time in ms to wait before sending the first resend requests (default 150)-->
<FirstResendWaitTime>150</FirstResendWaitTime>
<!--Set the number of packets to wait before sending the next resend requests (default 20)-->
<NextResendWaitPackets>20</NextResendWaitPackets>
<!--Set the number of packets to wait before sending the next resend requests if the camera sends the data over two physical links (default 20)-->
<NextResendWaitPacketsDualLink>20</NextResendWaitPacketsDualLink>
<!--Set the time in ms to wait before sending the next resend requests (default 100)-->
<NextResendWaitTime>100</NextResendWaitTime>
<!--Set socket read timeout, prevent cpu load, 0 not allowed and set to 1 (default 50)-->
<SocketReadTimeout>100</SocketReadTimeout>
<!--Packet dropper enable with 1, disable with 0(default 0)-->
<PacketDropperEnable>0</PacketDropperEnable>
</Version1>
</Resend>
<GVCP>
<!--Set Timeout (in ms) and number of retries for control channel
0 = the pending timeout register of camera is used for control channel timeout (default)
1..60000 = timeout value
-->
<ControlChannelTimeout>0</ControlChannelTimeout>
<!--The number of retries of commands on the control channel before the GigE Producer stops sending any further commands
valid values: 0..4294967295 (0xffffffff)
default value: 3
-->
<ControlChannelRetries>3</ControlChannelRetries>
<!--After a failed command the control channel is locked, that means no further commands were transmitted. This feature controls this locking mechanism.
valid values: 1 - the GigE Producer locks the control channel after a failing command. No further command were transmitted.
0 - the GigE Producer doesn't lock the control channel after a failing command. All further commands were transmitted.
default value: 1
-->
<UseControlChannelLocking>1</UseControlChannelLocking>
<!--Set Timeout(in ms) and number of retries for asynchronous messages from the camera (if supported) -->
<MessageChannelTimeout>100</MessageChannelTimeout>
<MessageChannelRetries>2</MessageChannelRetries>
</GVCP>
<GEV>
<!--Maximum packet size for GigE transmission. This value is used as upper limitation for
automatic MTU (maximum transmission unit) detection. Set this value to 0 the MTU detection
uses the preferred maximum of 9000. The smallest possible value is 576 and the highest value is 16380.
If you set a value outside this range the preferred maximum of 9000 is used. (default 9000)
-->
<DeviceStreamChannelPacketSizeMax>9000</DeviceStreamChannelPacketSizeMax>
<!--
0 means enable automatic MTU (maximum transmission unit) detection. If you specify this value the
MTU detection is disabled and the value DeviceStreamChannelPacketSizeMax is ignored.
The specified value is used directly as packet size.
The smallest possible value is 576 and the highest value is 16380. If you set a value outside the range
the minimum packet size of 576 is used.
-->
<DeviceStreamChannelPacketSizeFix>0</DeviceStreamChannelPacketSizeFix>
<!--
This value controls the size of socket buffer for the control sockets. The memory is calculated by 2^n.
The smallest possible value is 14 for 16384 bytes and the higest value is 26 for 67108864 bytes. If you
set a value outside the range the minimum or maximum value is used.
-->
<ControlSocketBufferSize>21</ControlSocketBufferSize>
<!--
This value controls the size of socket buffer for the stream sockets. The memory is calculated by 2^n.
The smallest possible value is 14 for 16384 bytes and the higest value is 26 for 67108864 bytes. If you
set a value outside the range the minimum or maximum value is used.
-->
<StreamSocketBufferSize>25</StreamSocketBufferSize>
<!--
This value controls the size of socket buffer for the message sockets. The memory is calculated by 2^n.
The smallest possible value is 14 for 16384 bytes and the higest value is 26 for 67108864 bytes. If you
set a value outside the range the minimum or maximum value is used.
-->
<MessageStreamSocketBufferSize>21</MessageStreamSocketBufferSize>
<!--
This value controls the size of the filter driver packet queue. Choose a value between 10 and 100,000 or
the defaut value of 5000 will be used.
-->
<FilterDriverBufferCount>5000</FilterDriverBufferCount>
<!--
This value controls the interval for sending packets on the stream channnel. This behavior is used to allow stream data to bypass firewalls.
Setting this value to 0 will stop sending packets on the stream channel.
-->
<StreamChannelSendInterval>30</StreamChannelSendInterval>
<!--
This value controls the interval for sending packets on the message channnel. This behavior is used to allow event data to bypass firewalls.
Setting this value to 0 will stop sending packets on the message channel.
-->
<MessageChannelSendInterval>30</MessageChannelSendInterval>
</GEV>
<SYSTEM>
<IncreaseThreadPriority>0</IncreaseThreadPriority>
<IncreasePriorityClass>0</IncreasePriorityClass>
</SYSTEM>
</ConfigFile>
<!-- EOF -->

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<ConfigFile VendorName="Baumer" MajorVersion="2" MinorVersion="2" SubMinorVersion="0">
<FileVersion>2.2.0.0</FileVersion>
<U3V>
<!-- image buffer size for USB transmission -->
<U3VImageBufferSize>0x10000</U3VImageBufferSize>
<U3VMaxResponseDefaultTime>500</U3VMaxResponseDefaultTime>
<U3VMaxFifoSize>1024</U3VMaxFifoSize>
</U3V>
<SYSTEM>
<IncreaseThreadPriority>0</IncreaseThreadPriority>
<IncreasePriorityClass>0</IncreasePriorityClass>
</SYSTEM>
</ConfigFile>
<!-- EOF -->

@ -0,0 +1,347 @@
/*****************************************************************************\
* Program: bgapi2 - Baumer GenTL consumer
* Purpose: Baumer GenTL consumer definitions
*
* Created: 13.04.2011
* Author: Silvio Voitzsch
* Copyright: Baumer Optronic GmbH, Radeberg
\*****************************************************************************/
#ifndef __BGAPI2_DEF_H__
#define __BGAPI2_DEF_H__
#if !defined(_GNULINUX)
#ifdef BGAPI2_GENICAM_EXPORTS
#define BGAPI2_DECL __declspec(dllexport)
#else
#define BGAPI2_DECL __declspec(dllimport)
#endif
#else
#define BGAPI2_DECL
#endif
#if defined(__BORLANDC__) || (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
#define BGAPI2CALL __stdcall
#else
#define BGAPI2CALL
#endif
#include "bgapi2_featurenames.h"
// #ifdef _GNULINUX
#if !defined(UNREFERENCED_PARAMETER) && !defined(_MSC_VER)
# define UNREFERENCED_PARAMETER(x) (x)=(x)
#endif // UNREFERENCED_PARAMETER
// #endif //_GNULINUX
#ifndef _GNULINUX
typedef __int64 bo_int64;
typedef unsigned __int64 bo_uint64;
typedef __int32 bo_int;
typedef unsigned __int32 bo_uint;
typedef __int16 bo_short;
typedef unsigned __int16 bo_ushort;
typedef __int8 bo_char;
typedef unsigned __int8 bo_uchar;
typedef unsigned __int16 bo_uint16;
#else
#ifdef __cplusplus
#include <iostream>
#endif /* #ifdef __cplusplus */
#include <inttypes.h>
/* workaround for g++-64bit int64_t == long int and not long long int !!! */
typedef long long int bo_int64;
typedef unsigned long long int bo_uint64;
//typedef int64_t bo_int64;
//typedef uint64_t bo_uint64;
typedef long long int bo_int64;
typedef unsigned long long int bo_uint64;
typedef int32_t bo_int;
typedef uint32_t bo_uint;
typedef int16_t bo_short;
typedef uint16_t bo_ushort;
typedef int8_t bo_char;
typedef uint8_t bo_uchar;
#endif
typedef char* bo_string;
#ifdef __cplusplus
typedef bool bo_bool;
#else
typedef bo_uchar bo_bool;
#endif
typedef double bo_double;
#ifdef __cplusplus
class CEventPnPObj;
class CEventDeviceEventObj;
namespace BGAPI2
{
struct _sSystemListData;
typedef struct BGAPI2::_sSystemListData tSystemListData, *ptSystemListData;
struct _sInterfaceListData;
typedef struct BGAPI2::_sInterfaceListData tInterfaceListData, *ptInterfaceListData;
struct _sSystemData;
typedef struct BGAPI2::_sSystemData tSystemData, *ptSystemData;
struct _sDeviceListData;
typedef struct BGAPI2::_sDeviceListData tDeviceListData, *ptDeviceListData;
struct _sDataStreamListData;
typedef struct BGAPI2::_sDataStreamListData tDataStreamListData, *ptDataStreamListData;
struct _sBufferListData;
typedef struct BGAPI2::_sBufferListData tBufferListData, *ptBufferListData;
struct _sBufferData;
typedef struct BGAPI2::_sBufferData tBufferData, *ptBufferData;
struct _sDataStreamData;
typedef struct BGAPI2::_sDataStreamData tDataStreamData, *ptDataStreamData;
struct _sDeviceData;
typedef struct BGAPI2::_sDeviceData tDeviceData, *ptDeviceData;
struct _sInterfaceData;
typedef struct BGAPI2::_sInterfaceData tInterfaceData, *ptInterfaceData;
struct _sImageData;
typedef struct BGAPI2::_sImageData tImageData, *ptImageData;
struct _sImageProcessorData;
typedef struct BGAPI2::_sImageProcessorData tImageProcessorData, *ptImageProcessorData;
class BGAPI2_DECL String
{
public:
String();
String( const char * text );
String( const char * text, int length );
String( const char & ch, int length );
String( const String & Obj );
String( const char & ch );
~String();
operator char *();
operator const char *();
bool operator == (const char * text);
bool operator == ( String & ExStr ) const;
bool operator != (const char * text);
bool operator != ( const String & ExStr );
bool operator < ( const String & ExStr ) const;
const String & operator = (char &);
const String & operator = (const char *);
const String & operator = ( const String & ExStr );
#ifdef _GNULINUX
friend std::ostream& operator << ( std::ostream& out, BGAPI2::String const &ExStr );
#endif
const char* get() const;
// const char* get();
void set( const char * text );
int size();
private:
void* data;
};
#ifdef _GNULINUX
std::ostream& operator << ( std::ostream& out, BGAPI2::String const &ExStr );
#endif
class System;
class BGAPI2_DECL _pairs
{
public:
String first;
System* second;
};
class Interface;
class BGAPI2_DECL _pairi
{
public:
String first;
Interface* second;
};
class Device;
class BGAPI2_DECL _paird
{
public:
String first;
Device* second;
};
class DataStream;
class BGAPI2_DECL _pairds
{
public:
String first;
DataStream* second;
};
class Buffer;
class BGAPI2_DECL _pairb
{
public:
String first;
Buffer* second;
};
class Node;
class BGAPI2_DECL _pairn
{
public:
bo_int64 first;
Node* second;
};
class BGAPI2_DECL _pairnm
{
public:
String first;
_pairn second;
};
#ifndef _GNULINUX
#pragma pack (push, 8)
typedef struct {
bo_ushort *pcRed; // pointer to hist array offered by user, can be zero
bo_ushort *pcGreen; // pointer to hist array offered by user, can be zero
bo_ushort *pcBlue; // pointer to hist array offered by user, can be zero
bo_ushort *pcLuma; // pointer to hist array offered by user, can be zero
int length;
int * pSizeFilled; // pointer to fill info for user
bool ThresEnable;
int ThresMin;
int ThresMax;
int* red_under;
int* red_over;
int* green_under;
int* green_over;
int* blue_under;
int* blue_over;
} bo_tHistRecords;
/**
\struct tRGB16QUAD
\brief The tRGB16QUAD structure specifies the information for one color look up table entry
\brief according to RGBQUAD of WinGdi
*/
typedef struct {
bo_ushort rgbBlue;
bo_ushort rgbGreen;
bo_ushort rgbRed;
bo_ushort rgbReserved;
} bo_tRGB16QUAD;
#pragma pack (pop)
#else
// TODO Linux packed
typedef struct {
bo_ushort *pcRed; // pointer to hist array offered by user, can be zero
bo_ushort *pcGreen; // pointer to hist array offered by user, can be zero
bo_ushort *pcBlue; // pointer to hist array offered by user, can be zero
bo_ushort *pcLuma; // pointer to hist array offered by user, can be zero
int length;
int * pSizeFilled; // pointer to fill info for user
bool ThresEnable;
int ThresMin;
int ThresMax;
int* red_under;
int* red_over;
int* green_under;
int* green_over;
int* blue_under;
int* blue_over;
} bo_tHistRecords;
/**
\struct tRGB16QUAD
\brief The tRGB16QUAD structure specifies the information for one color look up table entry
\brief according to RGBQUAD of WinGdi
*/
typedef struct {
bo_ushort rgbBlue;
bo_ushort rgbGreen;
bo_ushort rgbRed;
bo_ushort rgbReserved;
} bo_tRGB16QUAD;
#endif
}
#endif
enum BGAPI2_RESULT_LIST
{
BGAPI2_RESULT_SUCCESS = 0,
BGAPI2_RESULT_ERROR = -1001,
BGAPI2_RESULT_NOT_INITIALIZED = -1002,
BGAPI2_RESULT_NOT_IMPLEMENTED = -1003,
BGAPI2_RESULT_RESOURCE_IN_USE = -1004,
BGAPI2_RESULT_ACCESS_DENIED = -1005,
BGAPI2_RESULT_INVALID_HANDLE = -1006,
BGAPI2_RESULT_NO_DATA = -1008,
BGAPI2_RESULT_INVALID_PARAMETER = -1009,
// GC_ERR_IO = -1010,
BGAPI2_RESULT_TIMEOUT = -1011,
BGAPI2_RESULT_ABORT = -1012,
BGAPI2_RESULT_INVALID_BUFFER = -1013,
BGAPI2_RESULT_NOT_AVAILABLE = -1014,
// GC_ERR_INVALID_ADDRESS = -1015, /* GenTL v1.3 */
// GC_ERR_BUFFER_TOO_SMALL = -1016, /* GenTL v1.4 */
// GC_ERR_INVALID_INDEX = -1017, /* GenTL v1.4 */
// GC_ERR_PARSING_CHUNK_DATA = -1018, /* GenTL v1.4 */
BGAPI2_RESULT_OBJECT_INVALID = -1098,
BGAPI2_RESULT_LOWLEVEL_ERROR = -1099
};
typedef bo_int BGAPI2_RESULT;
#define BGAPI2_PAYLOADTYPE_UNKNOWN "Unknown"
#define BGAPI2_PAYLOADTYPE_IMAGE "Image"
#define BGAPI2_PAYLOADTYPE_RAW_DATA "RawData"
#define BGAPI2_PAYLOADTYPE_FILE "File"
#define BGAPI2_PAYLOADTYPE_CHUNK_DATA "ChunkData"
#define BGAPI2_PAYLOADTYPE_CUSTOM_ID "CustomID_1000"
#define BGAPI2_PAYLOADTYPE_IMAGE_EXT "ImageExt" /* PAYLOADTYPE_IMAGE_EXT */
//other custom id's were delivered in the following format CustomID_xxxx starting with CustomID_1000
#define BGAPI2_NODEINTERFACE_CATEGORY "ICategory"
#define BGAPI2_NODEINTERFACE_INTEGER "IInteger"
#define BGAPI2_NODEINTERFACE_REGISTER "IRegister"
#define BGAPI2_NODEINTERFACE_BOOLEAN "IBoolean"
#define BGAPI2_NODEINTERFACE_COMMAND "ICommand"
#define BGAPI2_NODEINTERFACE_FLOAT "IFloat"
#define BGAPI2_NODEINTERFACE_ENUMERATION "IEnumeration"
#define BGAPI2_NODEINTERFACE_STRING "IString"
#define BGAPI2_NODEINTERFACE_PORT "IPort"
#define BGAPI2_NODEVISIBILITY_BEGINNER "Beginner"
#define BGAPI2_NODEVISIBILITY_EXPERT "Expert"
#define BGAPI2_NODEVISIBILITY_GURU "Guru"
#define BGAPI2_NODEVISIBILITY_INVISIBLE "Invisible"
#define BGAPI2_NODEACCESS_READWRITE "RW"
#define BGAPI2_NODEACCESS_READONLY "RO"
#define BGAPI2_NODEACCESS_WRITEONLY "WO"
#define BGAPI2_NODEACCESS_NOTAVAILABLE "NA"
#define BGAPI2_NODEACCESS_NOTIMPLEMENTED "NI"
#define BGAPI2_NODEREPRESENTATION_LINEAR "Linear" //valid for BGAPI2_NODEINTERFACE_INTEGER, BGAPI2_NODEINTERFACE_FLOAT
#define BGAPI2_NODEREPRESENTATION_LOGARITHMIC "Logarithmic" //valid for BGAPI2_NODEINTERFACE_INTEGER, BGAPI2_NODEINTERFACE_FLOAT
#define BGAPI2_NODEREPRESENTATION_PURENUMBER "PureNumber" //valid for BGAPI2_NODEINTERFACE_INTEGER, BGAPI2_NODEINTERFACE_FLOAT
#define BGAPI2_NODEREPRESENTATION_BOOLEAN "Boolean" //valid for BGAPI2_NODEINTERFACE_INTEGER
#define BGAPI2_NODEREPRESENTATION_HEXNUMBER "HexNumber" //valid for BGAPI2_NODEINTERFACE_INTEGER
#define BGAPI2_NODEREPRESENTATION_IPV4ADDRESS "IPV4Address" //valid for BGAPI2_NODEINTERFACE_INTEGER
#define BGAPI2_NODEREPRESENTATION_MACADDRESS "MACAddress" //valid for BGAPI2_NODEINTERFACE_INTEGER
#endif //__BGAPI2_DEF_H__

@ -0,0 +1,856 @@
/*****************************************************************************\
* Program: bgapi2 - Baumer GenTL consumer
* Purpose: global definitions of common feature names
*
* Created: 19.09.2011
* Author: Thomas Oelschlaeger
* Copyright: Baumer Optronic GmbH, Radeberg
\*****************************************************************************/
#ifndef _BGAPI2_FEATURENAMES_H__
#define _BGAPI2_FEATURENAMES_H__
#define SFNCVERSION 1.5
#define SFNC_DEVICECONTROL "DeviceControl"
#define SFNC_DEVICE_VENDORNAME "DeviceVendorName"
#define SFNC_DEVICE_MODELNAME "DeviceModelName"
#define SFNC_DEVICE_MANUFACTURERINFO "DeviceManufacturerInfo"
#define SFNC_DEVICE_VERSION "DeviceVersion"
#define SFNC_DEVICE_FIRMWAREVERSION "DeviceFirmwareVersion"
#define SFNC_DEVICE_SFNCVERSIONMAJOR "DeviceSFNCVersionMajor"
#define SFNC_DEVICE_SFNCVERSIONMINOR "DeviceSFNCVersionMinor"
#define SFNC_DEVICE_SFNCVERSIONSUBMINOR "DeviceSFNCVersionSubMinor"
#define SFNC_DEVICE_MANIFESTENTRYSELECTOR "DeviceManifestEntrySelector"
#define SFNC_DEVICE_MANIFESTXMLMAJORVERSION "DeviceManifestXMLMajorVersion"
#define SFNC_DEVICE_MANIFESTXMLMINORVERSION "DeviceManifestXMLMinorVersion"
#define SFNC_DEVICE_MANIFESTXMLSUBMINORVERSION "DeviceManifestXMLSubMinorVersion"
#define SFNC_DEVICE_MANIFESTSCHEMAMAJORVERSION "DeviceManifestSchemaMajorVersion"
#define SFNC_DEVICE_MANIFESTSCHEMAMINORVERSION "DeviceManifestSchemaMinorVersion"
#define SFNC_DEVICE_MANIFESTPRIMARYURL "DeviceManifestPrimaryURL"
#define SFNC_DEVICE_MANIFESTSECONDARYURL "DeviceManifestSecondaryURL"
#define SFNC_DEVICE_ID "DeviceID" // depreciated SFNC2.0, replaced with "DeviceSerialNumber"
#define SFNC_DEVICE_SERIALNUMBER "DeviceSerialNumber" // starting with SFNC2.0
#define SFNC_DEVICE_USERID "DeviceUserID"
#define SFNC_DEVICE_RESET "DeviceReset"
#define SFNC_DEVICE_REGISTERSSTREAMINGSTART "DeviceRegistersStreamingStart"
#define SFNC_DEVICE_REGISTERSSTREAMINGEND "DeviceRegistersStreamingEnd"
#define SFNC_DEVICE_REGISTERSCHECK "DeviceRegistersCheck"
#define SFNC_DEVICE_REGISTERSVALID "DeviceRegistersValid"
#define SFNC_DEVICE_MAXTHROUGHPUT "DeviceMaxThroughput"
#define SFNC_DEVICE_TEMERATURESELECTOR "DeviceTemperatureSelector"
#define SFNC_DEVICE_TEMPERATURE "DeviceTemperature"
#define SFNC_DEVICE_CLOCKSELECTOR "DeviceClockSelector"
#define SFNC_DEVICE_CLOCKFREQUENCY "DeviceClockFrequency"
#define SFNC_DEVICE_SERIALPORTSELECTOR "DeviceSerialPortSelector"
#define SFNC_IMAGEFORMATCONTROL "ImageFormatControl"
#define SFNC_SENSORWIDTH "SensorWidth"
#define SFNC_SENSORHEIGHT "SensorHeight"
#define SFNC_SENSORTABS "SensorTaps"
#define SFNC_SENSORDIGITIZATIONTABS "SensorDigitizationTaps"
#define SFNC_WIDTHMAX "WidthMax"
#define SFNC_HEIGHTMAX "HeightMax"
#define SFNC_WIDTH "Width"
#define SFNC_HEIGHT "Height"
#define SFNC_OFFSETX "OffsetX"
#define SFNC_OFFSETY "OffsetY"
#define SFNC_LINEPITCH "LinePitch"
#define SFNC_BINNINGHORIZONTAL "BinningHorizontal"
#define SFNC_BINNINGVERTICAL "BinningVertical"
#define SFNC_DECIMATIONHORIZONTAL "DecimationHorizontal"
#define SFNC_DECIMATIONVERTICAL "DecimationVertical"
#define SFNC_REVERSEX "ReverseX"
#define SFNC_REVERSEY "ReverseY"
#define SFNC_PIXELFORMAT "PixelFormat"
#define SFNC_PIXELCODING "PixelCoding"
#define SFNC_PIXELSIZE "PixelSize"
#define SFNC_PIXELCOLORFILTER "PixelColorFilter"
#define SFNC_PIXELDYNAMICRANGEMIN "PixelDynamicRangeMin"
#define SFNC_PIXELDYNAMICRANGEMAX "PixelDynamicRangeMax"
#define SFNC_TESTIMAGESELECTOR "TestImageSelector"
#define SFNC_ACQUISITIONCONTROL "AcquisitionControl"
#define SFNC_ACQUISITION_MODE "AcquisitionMode"
#define SFNC_ACQUISITION_START "AcquisitionStart"
#define SFNC_ACQUISITION_STOP "AcquisitionStop"
#define SFNC_ACQUISITION_ABORT "AcquisitionAbort"
#define SFNC_ACQUISITION_ARM "AcquisitionArm"
#define SFNC_ACQUISITION_FRAMECOUNT "AcquisitionFrameCount"
#define SFNC_ACQUISITION_FRAMERATE "AcquisitionFrameRate"
#define SFNC_ACQUISITION_FRAMERATEABS "AcquisitionFrameRateAbs"
#define SFNC_ACQUISITION_FRAMERATERAW "AcquisitionFrameRateRaw"
#define SFNC_ACQUISITION_LINERATE "AcquisitionLineRate"
#define SFNC_ACQUISITION_LINERATEABS "AcquisitionLineRateAbs"
#define SFNC_ACQUISITION_LINERATERAW "AcquisitionLineRateRaw"
#define SFNC_ACQUISITION_STATUSSELECTOR "AcquisitionStatusSelector"
#define SFNC_ACQUISITION_STATUS "AcquisitionStatus"
#define SFNC_TRIGGERSELECTOR "TriggerSelector"
#define SFNC_TRIGGERMODE "TriggerMode"
#define SFNC_TRIGGERSOFTWARE "TriggerSoftware"
#define SFNC_TRIGGERSOURCE "TriggerSource"
#define SFNC_TRIGGERACTIVATION "TriggerActivation"
#define SFNC_TRIGGEROVERLAP "TriggerOverlap"
#define SFNC_TRIGGERDELAY "TriggerDelay"
#define SFNC_TRIGGERDELAYABS "TriggerDelayAbs"
#define SFNC_TRIGGERDELAYRAW "TriggerDelayRaw"
#define SFNC_TRIGGERDIVIDER "TriggerDivider"
#define SFNC_TRIGGERMULTIPLIER "TriggerMultiplier"
#define SFNC_EXPOSUREMODE "ExposureMode"
#define SFNC_EXPOSURETIME "ExposureTime"
#define SFNC_EXPOSURETIMEABS "ExposureTimeAbs"
#define SFNC_EXPOSURETIMERAW "ExposureTimeRaw"
#define SFNC_EXPOSUREAUTO "ExposureAuto"
#define SFNC_DIGITALIOCONTROL "DigitalIOControl"
#define SFNC_LINESELECTOR "LineSelector"
#define SFNC_LINEMODE "LineMode"
#define SFNC_LINEINVERTER "LineInverter"
#define SFNC_LINESTATUS "LineStatus"
#define SFNC_LINESTATUSALL "LineStatusAll"
#define SFNC_LINESOURCE "LineSource"
#define SFNC_LINEFORMAT "LineFormat"
#define SFNC_USEROUTPUTSELECTOR "UserOutputSelector"
#define SFNC_USEROUTPUTVALUE "UserOutputValue"
#define SFNC_USEROUTPUTVALUEALL "UserOutputValueAll"
#define SFNC_USEROUTPUTVALUEALLMASK "UserOutputValueAllMask"
#define SFNC_COUNTERANDTIMERCONTROL "CounterAndTimerControl"
#define SFNC_COUNTERSELECTOR "CounterSelector"
#define SFNC_COUNTEREVENTSOURCE "CounterEventSource"
#define SFNC_COUNTEREVENTACTIVATION "CounterEventActivation"
#define SFNC_COUNTERRESETSOURCE "CounterResetSource"
#define SFNC_COUNTERRESETACTIVATION "CounterResetActivation"
#define SFNC_COUNTERRESET "CounterReset"
#define SFNC_COUNTERVALUE "CounterValue"
#define SFNC_COUNTERVALUEATRESET "CounterValueAtReset"
#define SFNC_COUNTERDURATION "CounterDuration"
#define SFNC_COUNTERSTATUS "CounterStatus"
#define SFNC_COUNTERTRIGGERSOURCE "CounterTriggerSource"
#define SFNC_COUNTERTRIGGERACTIVATION "CounterTriggerActivation"
#define SFNC_TIMERSELECTOR "TimerSelector"
#define SFNC_TIMERDURATION "TimerDuration"
#define SFNC_TIMERDURATIONABS "TimerDurationAbs"
#define SFNC_TIMERDURATIONRAW "TimerDurationRaw"
#define SFNC_TIMERDELAY "TimerDelay"
#define SFNC_TIMERDELAYABS "TimerDelayAbs"
#define SFNC_TIMERDELAYRAW "TimerDelayRaw"
#define SFNC_TIMERRESET "TimerReset"
#define SFNC_TIMERVALUE "TimerValue"
#define SFNC_TIMERVALUEABS "TimerValueAbs"
#define SFNC_TIMERVALUERAW "TimerValueRaw"
#define SFNC_TIMERSTATUS "TimerStatus"
#define SFNC_TIMERTRIGGERSOURCE "TimerTriggerSource"
#define SFNC_TIMERTRIGGERACTIVATION "TimerTriggerActivation"
#define SFNC_EVENTCONTROL "EventControl"
#define SFNC_EVENTSELECTOR "EventSelector"
#define SFNC_EVENTNOTIFICATION "EventNotification"
#define SFNC_EVENT_FRAMETRIGGERDATA "EventFrameTriggerData"
#define SFNC_EVENT_FRAMETRIGGER "EventFrameTrigger"
#define SFNC_EVENT_FRAMETRIGGERTIMESTAMP "EventFrameTriggerTimestamp"
#define SFNC_EVENT_FRAMETRIGGERFRAMEID "EventFrameTriggerFrameID"
#define SFNC_EVENT_EXPOSUREENDDATA "EventExposureEndData"
#define SFNC_EVENT_EXPOSUREEND "EventExposureEnd"
#define SFNC_EVENT_EXPOSUREENDTIMESTAMP "EventExposureEndTimestamp"
#define SFNC_EVENT_EXPOSUREENDFRAMEID "EventExposureEndFrameID"
#define SFNC_EVENT_ERRORDATA "EventErrorData"
#define SFNC_EVENT_ERROR "EventError"
#define SFNC_EVENT_ERRORTIMESTAMP "EventErrorTimestamp"
#define SFNC_EVENT_ERRORFRAMEID "EventErrorFrameID"
#define SFNC_EVENT_ERRORCODE "EventErrorCode"
#define SFNC_ANALOGCONTROL "AnalogControl"
#define SFNC_GAINSELECTOR "GainSelector"
#define SFNC_GAIN "Gain"
#define SFNC_GAINRAW "GainRaw"
#define SFNC_GAINABS "GainAbs"
#define SFNC_GAINAUTO "GainAuto"
#define SFNC_GAINAUTOBALANCE "GainAutoBalance"
#define SFNC_BLACKLEVELSELECTOR "BlackLevelSelector"
#define SFNC_BLACKLEVEL "BlackLevel"
#define SFNC_BLACKLEVELRAW "BlackLevelRaw"
#define SFNC_BLACKLEVELABS "BlackLevelAbs"
#define SFNC_BLACKLEVELAUTO "BlackLevelAuto"
#define SFNC_BLACKLEVELAUTOBALANCE "BlackLevelAutoBalance"
#define SFNC_WHITECLIPSELECTOR "WhiteClipSelector"
#define SFNC_WHITECLIP "WhiteClip"
#define SFNC_WHITECLIPRAW "WhiteClipRaw"
#define SFNC_WHITECLIPABS "WhiteClipAbs"
#define SFNC_BALANCERATIOSELECTOR "BalanceRatioSelector"
#define SFNC_BALANCERATIO "BalanceRatio"
#define SFNC_BALANCERATIOABS "BalanceRatioAbs"
#define SFNC_BALANCEWHITEAUTO "BalanceWhiteAuto"
#define SFNC_GAMMA "Gamma"
#define SFNC_LUTCONTROL "LUTControl"
#define SFNC_LUTSELECTOR "LUTSelector"
#define SFNC_LUTENABLE "LUTEnable"
#define SFNC_LUTINDEX "LUTIndex"
#define SFNC_LUTVALUE "LUTValue"
#define SFNC_LUTVALUEALL "LUTValueAll"
#define SFNC_ROOT "Root"
#define SFNC_DEVICE "Device"
#define SFNC_TLPARAMSLOCKED "TLParamsLocked"
#define SFNC_TRANSPORTLAYERCONTROL "TransportLayerControl"
#define SFNC_PAYLOADSIZE "PayloadSize"
#define SFNC_GEV_VERSIONMAJOR "GevVersionMajor"
#define SFNC_GEV_VERSIONMINOR "GevVersionMinor"
#define SFNC_GEV_DEVICEMODEISBIGENDIAN "GevDeviceModeIsBigEndian"
#define SFNC_GEV_DEVICECALSS "GevDeviceClass"
#define SFNC_GEV_DEVICEMODECHARACTERSET "GevDeviceModeCharacterSet"
#define SFNC_GEV_INTERFACESELECTOR "GevInterfaceSelector"
#define SFNC_GEV_MACADDRESS "GevMACAddress"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTOR "GevSupportedOptionSelector"
#define SFNC_GEV_SUPPORTEDOPTION "GevSupportedOption"
#define SFNC_GEV_SUPPORTEDIPCONFIGURATIONLLA "GevSupportedIPConfigurationLLA"
#define SFNC_GEV_SUPPORTEDIPCONFIGURATIONDHCP "GevSupportedIPConfigurationDHCP"
#define SFNC_GEV_SUPPORTEDIPCONFIGURATIONPERSISTENTIP "GevSupportedIPConfigurationPersistentIP"
#define SFNC_GEV_CURRENTIPCONFIGURATION "GevCurrentIPConfiguration"
#define SFNC_GEV_CURRENTIPCONFIGURATIONLLA "GevCurrentIPConfigurationLLA"
#define SFNC_GEV_CURRENTIPCONFIGURATIONDHCP "GevCurrentIPConfigurationDHCP"
#define SFNC_GEV_CURRENTIPCONFIGURATIONPERSISTENTIP "GevCurrentIPConfigurationPersistentIP"
#define SFNC_GEV_CURRENTIPADDRESS "GevCurrentIPAddress"
#define SFNC_GEV_CURRENTSUBNETMASK "GevCurrentSubnetMask"
#define SFNC_GEV_CURRENTDEFAULTGATEWAY "GevCurrentDefaultGateway"
#define SFNC_GEV_IPCONFIGURATIONSTATUS "GevIPConfigurationStatus"
#define SFNC_GEV_FIRSTURL "GevFirstURL"
#define SFNC_GEV_SECONDURL "GevSecondURL"
#define SFNC_GEV_NUMBEROFINTERFACES "GevNumberOfInterfaces"
#define SFNC_GEV_PERSISTENTIPADDRESS "GevPersistentIPAddress"
#define SFNC_GEV_PERSISTENTSUBNETMASK "GevPersistentSubnetMask"
#define SFNC_GEV_PERSISTENTDEFAULTGATEWAY "GevPersistentDefaultGateway"
#define SFNC_GEV_GEVLINKSPEED "GevLinkSpeed"
#define SFNC_GEV_MESSAGECHANNELCOUNT "GevMessageChannelCount"
#define SFNC_GEV_STREAMCHANNELCOUNT "GevStreamChannelCount"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSUSERDEFINEDNAME "GevSupportedOptionalCommandsUserDefinedName"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSSERIALNUMBER "GevSupportedOptionalCommandsSerialNumber"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSEVENTDATA "GevSupportedOptionalCommandsEVENTDATA"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSEVENT "GevSupportedOptionalCommandsEVENT"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSPACKETRESEND "GevSupportedOptionalCommandsPACKETRESEND"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSWRITEMEM "GevSupportedOptionalCommandsWRITEMEM"
#define SFNC_GEV_SUPPORTEDOPTIONALCOMMANDSCONCATENATION "GevSupportedOptionalCommandsConcatenation"
#define SFNC_GEV_HEARTBEATTIMEOUT "GevHeartbeatTimeout"
#define SFNC_GEV_TIMESTAMPTICKFREQUENCY "GevTimestampTickFrequency"
#define SFNC_GEV_TIMESTAMPCONTROLLATCH "GevTimestampControlLatch"
#define SFNC_GEV_TIMESTAMPCONTROLRESET "GevTimestampControlReset"
#define SFNC_GEV_TIMESTAMPVALUE "GevTimestampValue"
#define SFNC_GEV_DISCOVERYACKDELAY "GevDiscoveryAckDelay"
#define SFNC_GEV_GVCPEXTENDEDSTATUSCODES "GevGVCPExtendedStatusCodes"
#define SFNC_GEV_GVCPPENDINGACK "GevGVCPPendingAck"
#define SFNC_GEV_GVCPHEARTBEATDISABLE "GevGVCPHeartbeatDisable"
#define SFNC_GEV_GVCPPENDINGTIMEOUT "GevGVCPPendingTimeout"
#define SFNC_GEV_PRIMARYAPPLICATIONSWITCHOVERKEY "GevPrimaryApplicationSwitchoverKey"
#define SFNC_GEV_CCP "GevCCP"
#define SFNC_GEV_PRIMARYAPPLICATIONSOCKET "GevPrimaryApplicationSocket"
#define SFNC_GEV_PRIMARYAPPLICATIONIPADDRESS "GevPrimaryApplicationIPAddress"
#define SFNC_GEV_MCPHOSTPORT "GevMCPHostPort"
#define SFNC_GEV_MCDA "GevMCDA"
#define SFNC_GEV_MCTT "GevMCTT"
#define SFNC_GEV_MCRC "GevMCRC"
#define SFNC_GEV_MCSP "GevMCSP"
#define SFNC_GEV_STREAMCHANNELSELECTOR "GevStreamChannelSelector"
#define SFNC_GEV_SCCFGUNCONDITIONALSTREAMING "GevSCCFGUnconditionalStreaming"
#define SFNC_GEV_SCCFGEXTENDEDCHUNKDATA "GevSCCFGExtendedChunkData"
#define SFNC_GEV_SCPDIRECTION "GevSCPDirection"
#define SFNC_GEV_SCPINTERFACEINDEX "GevSCPInterfaceIndex"
#define SFNC_GEV_SCPHOSTPORT "GevSCPHostPort"
#define SFNC_GEV_SCPSFIRETESTPACKET "GevSCPSFireTestPacket"
#define SFNC_GEV_SCPSDONOTFRAGMENT "GevSCPSDoNotFragment"
#define SFNC_GEV_SCPSBIGENDIAN "GevSCPSBigEndian"
#define SFNC_GEV_SCPSPACKETSIZE "GevSCPSPacketSize"
#define SFNC_GEV_SCPD "GevSCPD"
#define SFNC_GEV_SCDA "GevSCDA"
#define SFNC_GEV_SCSP "GevSCSP"
#define SFNC_GEV_MANIFESTENTRYSELECTOR "GevManifestEntrySelector"
#define SFNC_GEV_MANIFESTXMLMAJORVERSION "GevManifestXMLMajorVersion"
#define SFNC_GEV_MANIFESTXMLMINORVERSION "GevManifestXMLMinorVersion"
#define SFNC_GEV_MANIFESTXMLSUBMINORVERSION "GevManifestXMLSubMinorVersion"
#define SFNC_GEV_MANIFESTSCHEMAMAJORVERSION "GevManifestSchemaMajorVersion"
#define SFNC_GEV_MANIFESTSCHEMAMINORVERSION "GevManifestSchemaMinorVersion"
#define SFNC_GEV_MANIFESTPRIMARYURL "GevManifestPrimaryURL"
#define SFNC_GEV_MANIFESTSECONDARYURL "GevManifestSecondaryURL"
#define SFNC_CL_CONFIGURATION "ClConfiguration"
#define SFNC_CL_TIMESLOTSCOUNT "ClTimeSlotsCount"
#define SFNC_DEVICETAPGEOMETRY "DeviceTapGeometry"
#define SFNC_USERSETCONTROL "UserSetControl"
#define SFNC_USERSETSELECTOR "UserSetSelector"
#define SFNC_USERSETLOAD "UserSetLoad"
#define SFNC_USERSETSAVE "UserSetSave"
#define SFNC_USERSETDEFAULTSELECTOR "UserSetDefaultSelector"
#define SFNC_CHUNKDATACONTROL "ChunkDataControl"
#define SFNC_CHUNKMODEACTIVE "ChunkModeActive"
#define SFNC_CHUNKSELECTOR "ChunkSelector"
#define SFNC_CHUNKENABLE "ChunkEnable"
#define SFNC_CHUNKIMAGE "ChunkImage"
#define SFNC_CHUNKOFFSETX "ChunkOffsetX"
#define SFNC_CHUNKOFFSETY "ChunkOffsetY"
#define SFNC_CHUNKWIDTH "ChunkWidth"
#define SFNC_CHUNKHEIGHT "ChunkHeight"
#define SFNC_CHUNKPIXELFORMAT "ChunkPixelFormat"
#define SFNC_CHUNKPIXELDYNAMICRANGEMIN "ChunkPixelDynamicRangeMin"
#define SFNC_CHUNKPIXELDYNAMICRANGEMAX "ChunkPixelDynamicRangeMax"
#define SFNC_CHUNKDYNAMICRANGEMIN "ChunkDynamicRangeMin"
#define SFNC_CHUNKDYNAMICRANGEMAX "ChunkDynamicRangeMax"
#define SFNC_CHUNKTIMESTAMP "ChunkTimestamp"
#define SFNC_CHUNKLINESTATUSALL "ChunkLineStatusAll"
#define SFNC_CHUNKCOUNTERSELECTOR "ChunkCounterSelector"
#define SFNC_CHUNKCOUNTERVALUE "ChunkCounterValue"
#define SFNC_CHUNKCOUNTER "ChunkCounter"
#define SFNC_CHUNKTIMERSELECTOR "ChunkTimerSelector"
#define SFNC_CHUNKTIMERVALUE "ChunkTimerValue"
#define SFNC_CHUNKTIMER "ChunkTimer"
#define SFNC_CHUNKEXPOSURETIME "ChunkExposureTime"
#define SFNC_CHUNKGAINSELECTOR "ChunkGainSelector"
#define SFNC_CHUNKGAIN "ChunkGain"
#define SFNC_CHUNKBLACKLEVELSELECTOR "ChunkBlackLevelSelector"
#define SFNC_CHUNKBLACKLEVEL "ChunkBlackLevel"
#define SFNC_CHUNKLINEPITCH "ChunkLinePitch"
#define SFNC_CHUNKFRAMEID "ChunkFrameID"
#define SFNC_FILEACCESSCONTROL "FileAccessControl"
#define SFNC_FILESELECTOR "FileSelector"
#define SFNC_FILEOPERATIONSELECTOR "FileOperationSelector"
#define SFNC_FILEOPERATIONEXECUTE "FileOperationExecute"
#define SFNC_FILEOPENMODE "FileOpenMode"
#define SFNC_FILEACCESSBUFFER "FileAccessBuffer"
#define SFNC_FILEACCESSOFFSET "FileAccessOffset"
#define SFNC_FILEACCESSLENGTH "FileAccessLength"
#define SFNC_FILEOPERATIONSTATUS "FileOperationStatus"
#define SFNC_FILEOPERATIONRESULT "FileOperationResult"
#define SFNC_FILESIZE "FileSize"
#define SFNC_COLORTRANSFORMATIONCONTROL "ColorTransformationControl"
#define SFNC_COLORTRANSFORMATIONSELECTOR "ColorTransformationSelector"
#define SFNC_COLORTRANSFORMATIONENABLE "ColorTransformationEnable"
#define SFNC_COLORTRANSFORMATIONVALUESELECTOR "ColorTransformationValueSelector"
#define SFNC_COLORTRANSFORMATIONVALUE "ColorTransformationValue"
#define SFNC_ACTIONCONTROL "ActionControl"
#define SFNC_ACTIONDEVICEKEY "ActionDeviceKey"
#define SFNC_ACTIONSELECTOR "ActionSelector"
#define SFNC_ACTIONGROUPMASK "ActionGroupMask"
#define SFNC_ACTIONGROUPKEY "ActionGroupKey"
#define GENTL_SFNC_TLPORT "TLPort"
#define GENTL_SFNC_TLVENDORNAME "TLVendorName"
#define GENTL_SFNC_TLMODELNAME "TLModelName"
#define GENTL_SFNC_TLID "TLID"
#define GENTL_SFNC_TLVERSION "TLVersion"
#define GENTL_SFNC_TLPATH "TLPath"
#define GENTL_SFNC_TLTYPE "TLType"
#define GENTL_SFNC_GENTLVERSIONMAJOR "GenTLVersionMajor"
#define GENTL_SFNC_GENTLVERSIONMINOR "GenTLVersionMinor"
#define GENTL_SFNC_GENTLINTERFACEUPDATELIST "InterfaceUpdateList"
#define GENTL_SFNC_GENTLINTERFACESELECTOR "InterfaceSelector"
#define GENTL_SFNC_GENTLINTERFACEID "InterfaceID"
#define GENTL_SFNC_GEVVERSIONMAJOR "GevVersionMajor"
#define GENTL_SFNC_GEVVERSIONMINOR "GevVersionMinor"
#define GENTL_SFNC_GEVINTERFACEMACADDRESS "GevInterfaceMACAddress"
#define GENTL_SFNC_GEVINTERFACEDEFAULTIPADDRESS "GevInterfaceDefaultIPAddress"
#define GENTL_SFNC_GEVINTERFACEDEFAULTSUBNETMASK "GevInterfaceDefaultSubnetMask"
#define GENTL_SFNC_GEVINTERFACEDEFAULTGATEWAY "GevInterfaceDefaultGateway"
#define GENTL_SFNC_INTERFACEPORT "InterfacePort"
#define GENTL_SFNC_INTERFACEID "InterfaceID"
#define GENTL_SFNC_INTERFACETYPE "InterfaceType"
#define GENTL_SFNC_DEVICEUPDATELIST "DeviceUpdateList"
#define GENTL_SFNC_DEVICESELECTOR "DeviceSelector"
#define GENTL_SFNC_DEVICEID "DeviceID"
#define GENTL_SFNC_DEVICEVENDORNAME "DeviceVendorName"
#define GENTL_SFNC_DEVICEMODELNAME "DeviceModelName"
#define GENTL_SFNC_DEVICEACCESSSTATUS "DeviceAccessStatus"
#define GENTL_SFNC_GEVINTERFACEGATEWAYSELECTOR "GevInterfaceGatewaySelector"
#define GENTL_SFNC_GEVINTERFACEGATEWAY "GevInterfaceGateway"
#define GENTL_SFNC_GEVINTERFACEMACADDRESS "GevInterfaceMACAddress"
#define GENTL_SFNC_GEVINTERFACESUBNETSELECTOR "GevInterfaceSubnetSelector"
#define GENTL_SFNC_GEVINTERFACESUBNETIPADDRESS "GevInterfaceSubnetIPAddress"
#define GENTL_SFNC_GEVINTERFACESUBNETMASK "GevInterfaceSubnetMask"
#define GENTL_SFNC_DEVICEPORT "DevicePort"
#define GENTL_SFNC_DEVICEID "DeviceID"
#define GENTL_SFNC_DEVICEVENDORNAME "DeviceVendorName"
#define GENTL_SFNC_DEVICEMODELNAME "DeviceModelName"
#define GENTL_SFNC_DEVICETYPE "DeviceType"
#define GENTL_SFNC_STREAMSELECTOR "StreamSelector"
#define GENTL_SFNC_STREAMID "StreamID"
#define GENTL_SFNC_GEVDEVICEIPADDRESS "GevDeviceIPAddress"
#define GENTL_SFNC_GEVDEVICESUBNETMASK "GevDeviceSubnetMask"
#define GENTL_SFNC_GEVDEVICEMACADDRESS "GevDeviceMACAddress"
#define GENTL_SFNC_GEVDEVICEGATEWAY "GevDeviceGateway"
#define GENTL_SFNC_DEVICEENDIANESSMECHANISM "DeviceEndianessMechanism"
#define GENTL_SFNC_STREAMPORT "StreamPort"
#define GENTL_SFNC_STREAMID "StreamID"
#define GENTL_SFNC_STREAMANNOUNCEDBUFFERCOUNT "StreamAnnouncedBufferCount"
#define GENTL_SFNC_STREAMACQUISITIONMODESELECTOR "StreamAcquisitionModeSelector"
#define GENTL_SFNC_STREAMANNOUNCEBUFFERMINIMUM "StreamAnnounceBufferMinimum"
#define GENTL_SFNC_STREAMTYPE "StreamType"
#define GENTL_SFNC_BUFFERPORT "BufferPort"
#define GENTL_SFNC_BUFFERDATA "BufferData"
#define GENTL_SFNC_BUFFERUSERDATA "BufferUserData"
// selector values
#define SFNC_CHUNKSELECTORVALUE_IMAGE "Image"
#define SFNC_CHUNKSELECTORVALUE_OFFSETX "OffsetX"
#define SFNC_CHUNKSELECTORVALUE_OFFSETY "OffsetY"
#define SFNC_CHUNKSELECTORVALUE_WIDTH "Width"
#define SFNC_CHUNKSELECTORVALUE_HEIGHT "Height"
#define SFNC_CHUNKSELECTORVALUE_PIXELFORMAT "PixelFormat"
#define SFNC_CHUNKSELECTORVALUE_DYNAMICRANGEMAX "DynamicRangeMax"
#define SFNC_CHUNKSELECTORVALUE_DYNAMICRANGEMIN "DynamicRangeMin"
#define SFNC_CHUNKSELECTORVALUE_PIXELDYNAMICRANGEMAX "PixelDynamicRangeMax"
#define SFNC_CHUNKSELECTORVALUE_PIXELDYNAMICRANGEMIN "PixelDynamicRangeMin"
#define SFNC_CHUNKSELECTORVALUE_TIMESTAMP "Timestamp"
#define SFNC_CHUNKSELECTORVALUE_LINESTATUSALL "LineStatusAll"
#define SFNC_CHUNKSELECTORVALUE_COUNTERVALUE "CounterValue"
#define SFNC_CHUNKSELECTORVALUE_TIMERVALUE "TimerValue"
#define SFNC_CHUNKSELECTORVALUE_EXPOSURETIME "ExposureTime"
#define SFNC_CHUNKSELECTORVALUE_GAIN "Gain"
#define SFNC_CHUNKSELECTORVALUE_BLACKLEVEL "BlackLevel"
#define SFNC_CHUNKSELECTORVALUE_LINEPITCH "LinePitch"
#define SFNC_CHUNKSELECTORVALUE_FRAMEID "FrameID"
#define SFNC_DEVICE_TEMERATURESELECTORVALUE_SENSOR "Sensor"
#define SFNC_DEVICE_TEMERATURESELECTORVALUE_MAINBOARD "Mainboard"
#define SFNC_DEVICE_CLOCKSELECTORVALUE_SENSOR "Sensor"
#define SFNC_DEVICE_CLOCKSELECTORVALUE_SENSORDIGITIZATION "SensorDigitization"
#define SFNC_DEVICE_CLOCKSELECTORVALUE_CAMERALINK "CameraLink"
#define SFNC_DEVICE_SERIALPORTSELECTORVALUE_CAMERALINK "CameraLink"
#define SFNC_TESTIMAGESELECTORVALUE_OFF "Off"
#define SFNC_TESTIMAGESELECTORVALUE_BLACK "Black"
#define SFNC_TESTIMAGESELECTORVALUE_WHITE "White"
#define SFNC_TESTIMAGESELECTORVALUE_GREYHORIZONTALRAMP "GreyHorizontalRamp"
#define SFNC_TESTIMAGESELECTORVALUE_GREYVERTICALRAMP "GreyVerticalRamp"
#define SFNC_TESTIMAGESELECTORVALUE_GREYHORIZONTALRAMPMOVING "GreyHorizontalRampMoving"
#define SFNC_TESTIMAGESELECTORVALUE_GREYVERTICALRAMPMOVING "GreyVerticalRampMoving"
#define SFNC_TESTIMAGESELECTORVALUE_HORIZONTALLINEMOVING "HorzontalLineMoving"
#define SFNC_TESTIMAGESELECTORVALUE_VERTICALLINEMOVING "VerticalLineMoving"
#define SFNC_TESTIMAGESELECTORVALUE_COLORBAR "ColorBar"
#define SFNC_TESTIMAGESELECTORVALUE_FRAMECOUNTER "FrameCounter"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_ACQUISITIONTRIGGERWAIT "AcquisitionTriggerWait"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_ACQUISITIONACTIVE "AcquisitionActive"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_ACQUISITIONTRANSFER "AcquisitionTransfer"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_FRAMETRIGGERWAIT "FrameTriggerWait"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_FRAMEACTIVE "FrameActive"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_FRAMETRANSFER "FrameTransfer"
#define SFNC_ACQUISITION_STATUSSELECTORVALUE_EXPOSUREACTIVE "ExposureActive"
#define SFNC_TRIGGERSELECTORVALUE_ACQUISITIONSTART "AcquisitionStart"
#define SFNC_TRIGGERSELECTORVALUE_ACQUISITIONEND "AcquisitionEnd"
#define SFNC_TRIGGERSELECTORVALUE_ACQUISITIONACTIVE "AcquisitionActive"
#define SFNC_TRIGGERSELECTORVALUE_FRAMESTART "FrameStart"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEEND "FrameEnd"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEACTIVE "FrameActive"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEBURSTSTART "FrameBurstStart"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEBURSTEND "FrameBurstEnd"
#define SFNC_TRIGGERSELECTORVALUE_FRAMEBURSTACTIVE "FrameBurstActive"
#define SFNC_TRIGGERSELECTORVALUE_LINESTART "LineStart"
#define SFNC_TRIGGERSELECTORVALUE_EXPOSURESTART "ExposureStart"
#define SFNC_TRIGGERSELECTORVALUE_EXPOSUREEND "ExposureEnd"
#define SFNC_TRIGGERSELECTORVALUE_EXPOSUREACTIVE "ExposureActive"
#define SFNC_LINESELECTORVALUE_LINE0 "Line0"
#define SFNC_LINESELECTORVALUE_LINE1 "Line1"
#define SFNC_LINESELECTORVALUE_LINE2 "Line2"
#define SFNC_LINESELECTORVALUE_LINE3 "Line3"
#define SFNC_LINESELECTORVALUE_LINE4 "Line4"
#define SFNC_LINESELECTORVALUE_LINE5 "Line5"
#define SFNC_LINESELECTORVALUE_LINE6 "Line6"
#define SFNC_LINESELECTORVALUE_LINE7 "Line7"
#define SFNC_LINESELECTORVALUE_CC1 "CC1"
#define SFNC_LINESELECTORVALUE_CC2 "CC2"
#define SFNC_LINESELECTORVALUE_CC3 "CC3"
#define SFNC_LINESELECTORVALUE_CC4 "CC4"
#define SFNC_USEROUTPUTSELECTORVALUE_USEROUTPUT0 "UserOutput0"
#define SFNC_USEROUTPUTSELECTORVALUE_USEROUTPUT1 "UserOutput1"
#define SFNC_USEROUTPUTSELECTORVALUE_USEROUTPUT2 "UserOutput2"
#define SFNC_USEROUTPUTSELECTORVALUE_USEROUTPUT3 "UserOutput3"
#define SFNC_COUNTERSELECTORVALUE_COUNTER1 "Counter1"
#define SFNC_COUNTERSELECTORVALUE_COUNTER2 "Counter2"
#define SFNC_COUNTERSELECTORVALUE_COUNTER3 "Counter3"
#define SFNC_COUNTERSELECTORVALUE_COUNTER4 "Counter4"
#define SFNC_COUNTERSELECTORVALUE_COUNTER5 "Counter5"
#define SFNC_COUNTERSELECTORVALUE_COUNTER6 "Counter6"
#define SFNC_COUNTERSELECTORVALUE_COUNTER7 "Counter7"
#define SFNC_COUNTERSELECTORVALUE_COUNTER8 "Counter8"
#define SFNC_TIMERSELECTORVALUE_TIMER1 "Timer1"
#define SFNC_TIMERSELECTORVALUE_TIMER2 "Timer2"
#define SFNC_TIMERSELECTORVALUE_TIMER3 "Timer3"
#define SFNC_TIMERSELECTORVALUE_TIMER4 "Timer4"
#define SFNC_TIMERSELECTORVALUE_TIMER5 "Timer5"
#define SFNC_TIMERSELECTORVALUE_TIMER6 "Timer6"
#define SFNC_TIMERSELECTORVALUE_TIMER7 "Timer7"
#define SFNC_TIMERSELECTORVALUE_TIMER8 "Timer8"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONTRIGGER "AcquisitionTrigger"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONSTART "AcquisitionStart"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONEND "AcquisitionEnd"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONTRANSFERSTART "AcquisitionTransferStart"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONTRANSFEREND "AcquisitionTransferEnd"
#define SFNC_EVENTSELECTORVALUE_ACQUISITIONERROR "AcquisitionError"
#define SFNC_EVENTSELECTORVALUE_FRAMETRIGGER "FrameTrigger"
#define SFNC_EVENTSELECTORVALUE_FRAMESTART "FrameStart"
#define SFNC_EVENTSELECTORVALUE_FRAMEEND "FrameEnd"
#define SFNC_EVENTSELECTORVALUE_FRAMEBURSTSTART "FrameBurstStart"
#define SFNC_EVENTSELECTORVALUE_FRAMEBURSTEND "FrameBurstEnd"
#define SFNC_EVENTSELECTORVALUE_FRAMETRANSFERSTART "FrameTransferStart"
#define SFNC_EVENTSELECTORVALUE_FRAMETRANSFEREND "FrameTransferEnd"
#define SFNC_EVENTSELECTORVALUE_EXPOSURESTART "ExposureStart"
#define SFNC_EVENTSELECTORVALUE_EXPOSUREEND "ExposureEnd"
#define SFNC_EVENTSELECTORVALUE_COUNTER1START "Counter1Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER2START "Counter2Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER3START "Counter3Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER4START "Counter4Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER5START "Counter5Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER6START "Counter6Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER7START "Counter7Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER8START "Counter8Start"
#define SFNC_EVENTSELECTORVALUE_COUNTER1END "Counter1End"
#define SFNC_EVENTSELECTORVALUE_COUNTER2END "Counter2End"
#define SFNC_EVENTSELECTORVALUE_COUNTER3END "Counter3End"
#define SFNC_EVENTSELECTORVALUE_COUNTER4END "Counter4End"
#define SFNC_EVENTSELECTORVALUE_COUNTER5END "Counter5End"
#define SFNC_EVENTSELECTORVALUE_COUNTER6END "Counter6End"
#define SFNC_EVENTSELECTORVALUE_COUNTER7END "Counter7End"
#define SFNC_EVENTSELECTORVALUE_COUNTER8END "Counter8End"
#define SFNC_EVENTSELECTORVALUE_TIMER1START "Timer1Start"
#define SFNC_EVENTSELECTORVALUE_TIMER2START "Timer2Start"
#define SFNC_EVENTSELECTORVALUE_TIMER3START "Timer3Start"
#define SFNC_EVENTSELECTORVALUE_TIMER4START "Timer4Start"
#define SFNC_EVENTSELECTORVALUE_TIMER5START "Timer5Start"
#define SFNC_EVENTSELECTORVALUE_TIMER6START "Timer6Start"
#define SFNC_EVENTSELECTORVALUE_TIMER7START "Timer7Start"
#define SFNC_EVENTSELECTORVALUE_TIMER8START "Timer8Start"
#define SFNC_EVENTSELECTORVALUE_TIMER1END "Timer1End"
#define SFNC_EVENTSELECTORVALUE_TIMER2END "Timer2End"
#define SFNC_EVENTSELECTORVALUE_TIMER3END "Timer3End"
#define SFNC_EVENTSELECTORVALUE_TIMER4END "Timer4End"
#define SFNC_EVENTSELECTORVALUE_TIMER5END "Timer5End"
#define SFNC_EVENTSELECTORVALUE_TIMER6END "Timer6End"
#define SFNC_EVENTSELECTORVALUE_TIMER7END "Timer7End"
#define SFNC_EVENTSELECTORVALUE_TIMER8END "Timer8End"
#define SFNC_EVENTSELECTORVALUE_LINE0RISINGEDGE "Line0RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE1RISINGEDGE "Line1RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE2RISINGEDGE "Line2RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE3RISINGEDGE "Line3RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE4RISINGEDGE "Line4RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE5RISINGEDGE "Line5RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE6RISINGEDGE "Line6RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE7RISINGEDGE "Line7RisingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE0FALLINGEDGE "Line0FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE1FALLINGEDGE "Line1FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE2FALLINGEDGE "Line2FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE3FALLINGEDGE "Line3FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE4FALLINGEDGE "Line4FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE5FALLINGEDGE "Line5FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE6FALLINGEDGE "Line6FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE7FALLINGEDGE "Line7FallingEdge"
#define SFNC_EVENTSELECTORVALUE_LINE0ANYEDGE "Line0AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE1ANYEDGE "Line1AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE2ANYEDGE "Line2AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE3ANYEDGE "Line3AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE4ANYEDGE "Line4AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE5ANYEDGE "Line5AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE6ANYEDGE "Line6AnyEdge"
#define SFNC_EVENTSELECTORVALUE_LINE7ANYEDGE "Line7AnyEdge"
#define SFNC_EVENTSELECTORVALUE_ERROR "Error"
#define SFNC_EVENTSELECTORVALUE_ERRORS "Errors"
#define SFNC_GAINSELECTORVALUE_ALL "All"
#define SFNC_GAINSELECTORVALUE_RED "Red"
#define SFNC_GAINSELECTORVALUE_GREEN "Green"
#define SFNC_GAINSELECTORVALUE_BLUE "Blue"
#define SFNC_GAINSELECTORVALUE_Y "Y"
#define SFNC_GAINSELECTORVALUE_U "U"
#define SFNC_GAINSELECTORVALUE_V "V"
#define SFNC_GAINSELECTORVALUE_TAP1 "Tap1"
#define SFNC_GAINSELECTORVALUE_TAP2 "Tap2"
#define SFNC_GAINSELECTORVALUE_TAP3 "Tap3"
#define SFNC_GAINSELECTORVALUE_TAP4 "Tap4"
#define SFNC_GAINSELECTORVALUE_TAP5 "Tap5"
#define SFNC_GAINSELECTORVALUE_TAP6 "Tap6"
#define SFNC_GAINSELECTORVALUE_TAP7 "Tap7"
#define SFNC_GAINSELECTORVALUE_TAP8 "Tap8"
#define SFNC_GAINSELECTORVALUE_ANALOGALL "AnalogAll"
#define SFNC_GAINSELECTORVALUE_ANALOGRED "AnalogRed"
#define SFNC_GAINSELECTORVALUE_ANALOGGREEN "AnalogGreen"
#define SFNC_GAINSELECTORVALUE_ANALOGBLUE "AnalogBlue"
#define SFNC_GAINSELECTORVALUE_ANALOGY "AnalogY"
#define SFNC_GAINSELECTORVALUE_ANALOGU "AnalogU"
#define SFNC_GAINSELECTORVALUE_ANALOGV "AnalogV"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP1 "AnalogTap1"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP2 "AnalogTap2"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP3 "AnalogTap3"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP4 "AnalogTap4"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP5 "AnalogTap5"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP6 "AnalogTap6"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP7 "AnalogTap7"
#define SFNC_GAINSELECTORVALUE_ANALOGTAP8 "AnalogTap8"
#define SFNC_GAINSELECTORVALUE_DIGITALALL "DigitalAll"
#define SFNC_GAINSELECTORVALUE_DIGITALRED "DigitalRed"
#define SFNC_GAINSELECTORVALUE_DIGITALGREEN "DigitalGreen"
#define SFNC_GAINSELECTORVALUE_DIGITALBLUE "DigitalBlue"
#define SFNC_GAINSELECTORVALUE_DIGITALY "DigitalY"
#define SFNC_GAINSELECTORVALUE_DIGITALU "DigitalU"
#define SFNC_GAINSELECTORVALUE_DIGITALV "DigitalV"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP1 "DigitalTap1"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP2 "DigitalTap2"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP3 "DigitalTap3"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP4 "DigitalTap4"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP5 "DigitalTap5"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP6 "DigitalTap6"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP7 "DigitalTap7"
#define SFNC_GAINSELECTORVALUE_DIGITALTAP8 "DigitalTap8"
#define SFNC_BLACKLEVELSELECTORVALUE_ALL "All"
#define SFNC_BLACKLEVELSELECTORVALUE_RED "Red"
#define SFNC_BLACKLEVELSELECTORVALUE_GREEN "Green"
#define SFNC_BLACKLEVELSELECTORVALUE_BLUE "Blue"
#define SFNC_BLACKLEVELSELECTORVALUE_Y "Y"
#define SFNC_BLACKLEVELSELECTORVALUE_U "U"
#define SFNC_BLACKLEVELSELECTORVALUE_V "V"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP1 "Tap1"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP2 "Tap2"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP3 "Tap3"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP4 "Tap4"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP5 "Tap5"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP6 "Tap6"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP7 "Tap7"
#define SFNC_BLACKLEVELSELECTORVALUE_TAP8 "Tap8"
#define SFNC_WHITECLIPSELECTORVALUE_ALL "All"
#define SFNC_WHITECLIPSELECTORVALUE_RED "Red"
#define SFNC_WHITECLIPSELECTORVALUE_GREEN "Green"
#define SFNC_WHITECLIPSELECTORVALUE_BLUE "Blue"
#define SFNC_WHITECLIPSELECTORVALUE_Y "Y"
#define SFNC_WHITECLIPSELECTORVALUE_U "U"
#define SFNC_WHITECLIPSELECTORVALUE_V "V"
#define SFNC_WHITECLIPSELECTORVALUE_TAP1 "Tap1"
#define SFNC_WHITECLIPSELECTORVALUE_TAP2 "Tap2"
#define SFNC_WHITECLIPSELECTORVALUE_TAP3 "Tap3"
#define SFNC_WHITECLIPSELECTORVALUE_TAP4 "Tap4"
#define SFNC_WHITECLIPSELECTORVALUE_TAP5 "Tap5"
#define SFNC_WHITECLIPSELECTORVALUE_TAP6 "Tap6"
#define SFNC_WHITECLIPSELECTORVALUE_TAP7 "Tap7"
#define SFNC_WHITECLIPSELECTORVALUE_TAP8 "Tap8"
#define SFNC_BALANCERATIOSELECTORVALUE_ALL "All"
#define SFNC_BALANCERATIOSELECTORVALUE_RED "Red"
#define SFNC_BALANCERATIOSELECTORVALUE_GREEN "Green"
#define SFNC_BALANCERATIOSELECTORVALUE_BLUE "Blue"
#define SFNC_BALANCERATIOSELECTORVALUE_Y "Y"
#define SFNC_BALANCERATIOSELECTORVALUE_U "U"
#define SFNC_BALANCERATIOSELECTORVALUE_V "V"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP1 "Tap1"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP2 "Tap2"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP3 "Tap3"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP4 "Tap4"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP5 "Tap5"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP6 "Tap6"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP7 "Tap7"
#define SFNC_BALANCERATIOSELECTORVALUE_TAP8 "Tap8"
#define SFNC_LUTSELECTORVALUE_LUMINANCE "Luminance"
#define SFNC_LUTSELECTORVALUE_RED "Red"
#define SFNC_LUTSELECTORVALUE_GREEN "Green"
#define SFNC_LUTSELECTORVALUE_BLUE "Blue"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_IPCONFIGURATIONLLA "IPConfigurationLLA"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_IPCONFIGURATIONDHCP "IPConfigurationDHCP"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_IPCONFIGURATIONPERSISTENTIP "IPConfigurationPersistentIP"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNELSOURCESOCKET "StreamChannelSourceSocket"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_MESSAGECHANNELSOURCESOCKET "MessageChannelSourceSocket"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_COMMANDSCONCATENATION "CommandsConcatenation"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_WRITEMEM "WriteMem"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_PACKETRESEND "PacketResend"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_EVENT "Event"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_EVENTDATA "EventData"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_PENDINGACK "PendingAck"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_ACTION "Action"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_PRIMARYAPPLICATIONSWITCHOVER "PrimaryApplicationSwitchover"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_EXTENDEDSTATUSCODES "ExtendedStatusCodes"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_DISCOVERYACKDELAY "DiscoveryAckDelay"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_DISCOVERYACKDELAYWRITABLE "DiscoveryAckDelayWritable"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_TESTDATA "TestData"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_MANIFESTTABLE "ManifestTable"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_CCPAPPLICATIONSOCKET "CCPApplicationSocket"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_LINKSPEED "LinkSpeed"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_HEARTBEATDISABLE "HeartbeatDisable"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_SERIALNUMBER "SerialNumber"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_USERDEFINEDNAME "UserDefinedName"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL0BIGANDLITTLEENDIAN "StreamChannel0BigAndLittleEndian"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL0IPREASSEMBLY "StreamChannel0IPReassembly"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL0UNCONDITIONALSTREAMING "StreamChannel0UnconditionalStreaming"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL0EXTENDEDCHUNKDATA "StreamChannel0ExtendedChunkData"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL1BIGANDLITTLEENDIAN "StreamChannel1BigAndLittleEndian"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL1IPREASSEMBLY "StreamChannel1IPReassembly"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL1UNCONDITIONALSTREAMING "StreamChannel1UnconditionalStreaming"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL1EXTENDEDCHUNKDATA "StreamChannel1ExtendedChunkData"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL2BIGANDLITTLEENDIAN "StreamChannel2BigAndLittleEndian"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL2IPREASSEMBLY "StreamChannel2IPReassembly"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL2UNCONDITIONALSTREAMING "StreamChannel2UnconditionalStreaming"
#define SFNC_GEV_SUPPORTEDOPTIONSELECTORVALUE_STREAMCHANNEL2EXTENDEDCHUNKDATA "StreamChannel2ExtendedChunkData"
#define SFNC_USERSETSELECTORVALUE_DEFAULT "Default"
#define SFNC_USERSETSELECTORVALUE_USERSET1 "UserSet1"
#define SFNC_USERSETSELECTORVALUE_USERSET2 "UserSet2"
#define SFNC_USERSETSELECTORVALUE_USERSET3 "UserSet3"
#define SFNC_USERSETSELECTORVALUE_USERSET4 "UserSet4"
#define SFNC_USERSETDEFAULTSELECTORVALUE_DEFAULT "Default"
#define SFNC_USERSETDEFAULTSELECTORVALUE_USERSET1 "UserSet1"
#define SFNC_USERSETDEFAULTSELECTORVALUE_USERSET2 "UserSet2"
#define SFNC_USERSETDEFAULTSELECTORVALUE_USERSET3 "UserSet3"
#define SFNC_USERSETDEFAULTSELECTORVALUE_USERSET4 "UserSet4"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER1 "Counter1"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER2 "Counter2"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER3 "Counter3"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER4 "Counter4"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER5 "Counter5"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER6 "Counter6"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER7 "Counter7"
#define SFNC_CHUNKCOUNTERSELECTORVALUE_COUNTER8 "Counter8"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER1 "Timer1"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER2 "Timer2"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER3 "Timer3"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER4 "Timer4"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER5 "Timer5"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER6 "Timer6"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER7 "Timer7"
#define SFNC_CHUNKTIMERSELECTORVALUE_TIMER8 "Timer8"
#define SFNC_CHUNKGAINSELECTORVALUE_ALL "All"
#define SFNC_CHUNKGAINSELECTORVALUE_RED "Red"
#define SFNC_CHUNKGAINSELECTORVALUE_GREEN "Green"
#define SFNC_CHUNKGAINSELECTORVALUE_BLUE "Blue"
#define SFNC_CHUNKGAINSELECTORVALUE_Y "Y"
#define SFNC_CHUNKGAINSELECTORVALUE_U "U"
#define SFNC_CHUNKGAINSELECTORVALUE_V "V"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP1 "Tap1"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP2 "Tap2"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP3 "Tap3"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP4 "Tap4"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP5 "Tap5"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP6 "Tap6"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP7 "Tap7"
#define SFNC_CHUNKGAINSELECTORVALUE_TAP8 "Tap8"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGALL "AnalogAll"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGRED "AnalogRed"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGGREEN "AnalogGreen"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGBLUE "AnalogBlue"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGY "AnalogY"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGU "AnalogU"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGV "AnalogV"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP1 "AnalogTap1"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP2 "AnalogTap2"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP3 "AnalogTap3"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP4 "AnalogTap4"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP5 "AnalogTap5"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP6 "AnalogTap6"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP7 "AnalogTap7"
#define SFNC_CHUNKGAINSELECTORVALUE_ANALOGTAP8 "AnalogTap8"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALALL "DigitalAll"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALRED "DigitalRed"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALGREEN "DigitalGreen"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALBLUE "DigitalBlue"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALY "DigitalY"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALU "DigitalU"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALV "DigitalV"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP1 "DigitalTap1"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP2 "DigitalTap2"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP3 "DigitalTap3"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP4 "DigitalTap4"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP5 "DigitalTap5"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP6 "DigitalTap6"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP7 "DigitalTap7"
#define SFNC_CHUNKGAINSELECTORVALUE_DIGITALTAP8 "DigitalTap8"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_ALL "All"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_RED "Red"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_GREEN "Green"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_BLUE "Blue"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_Y "Y"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_U "U"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_V "V"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP1 "Tap1"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP2 "Tap2"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP3 "Tap3"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP4 "Tap4"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP5 "Tap5"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP6 "Tap6"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP7 "Tap7"
#define SFNC_CHUNKBLACKLEVELSELECTORVALUE_TAP8 "Tap8"
#define SFNC_FILESELECTORVALUE_USERSETDEFAULT "UserSetDefault"
#define SFNC_FILESELECTORVALUE_USERSET1 "UserSet1"
#define SFNC_FILESELECTORVALUE_USERSET2 "UserSet2"
#define SFNC_FILESELECTORVALUE_USERSET3 "UserSet3"
#define SFNC_FILESELECTORVALUE_USERSET4 "UserSet4"
#define SFNC_FILESELECTORVALUE_LUTLUMINANCE "LUTLuminance"
#define SFNC_FILESELECTORVALUE_LUTRED "LUTRed"
#define SFNC_FILESELECTORVALUE_LUTGREEN "LUTGreen"
#define SFNC_FILESELECTORVALUE_LUTBLUE "LUTBlue"
#define SFNC_FILEOPERATIONSELECTORVALUE_OPEN "Open"
#define SFNC_FILEOPERATIONSELECTORVALUE_CLOSE "Close"
#define SFNC_FILEOPERATIONSELECTORVALUE_READ "Read"
#define SFNC_FILEOPERATIONSELECTORVALUE_WRITE "Write"
#define SFNC_FILEOPERATIONSELECTORVALUE_DELETE "Delete"
#define SFNC_COLORTRANSFORMATIONSELECTORVALUE_RGBTORGB "RGBtoRGB"
#define SFNC_COLORTRANSFORMATIONSELECTORVALUE_RGBTOYUV "RGBtoYUV"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain00 "Gain00"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain01 "Gain01"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain02 "Gain02"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain10 "Gain10"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain11 "Gain11"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain12 "Gain12"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain20 "Gain20"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain21 "Gain21"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Gain22 "Gain22"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Offset0 "Offset0"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Offset1 "Offset1"
#define SFNC_COLORTRANSFORMATIONVALUESELECTORVALUE_Offset2 "Offset2"
#endif //_BGAPI2_FEATURENAMES_H__

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -0,0 +1,73 @@
#ifndef __GLOBALDEFS_H__
#define __GLOBALDEFS_H__
typedef enum
{
FILETYPE_BMP,
FILETYPE_JPEG,
FILETYPE_MEGA=65536 // Borland C++ 6 compatibility
} IMG_FILETYPE;
typedef enum
{
Y800,
RGB24,
RGB32,
UYVY,
Y16,
NONE, // used as return value
COLORFORMAT_MEGA=65536 // Borland C++ 6 compatibility
} COLORFORMAT;
typedef enum
{
PROP_VID_BRIGHTNESS = 0,
PROP_VID_CONTRAST,
PROP_VID_HUE,
PROP_VID_SATURATION,
PROP_VID_SHARPNESS,
PROP_VID_GAMMA,
PROP_VID_COLORENABLE,
PROP_VID_WHITEBALANCE,
PROP_VID_BLACKLIGHTCOMPENSATION,
PROP_VID_GAIN,
PROP_VID_MEGA=65536 // Borland C++ 6 compatibility
} VIDEO_PROPERTY;
typedef enum
{
PROP_CAM_PAN = 0,
PROP_CAM_TILT,
PROP_CAM_ROLL,
PROP_CAM_ZOOM,
PROP_CAM_EXPOSURE,
PROP_CAM_IRIS,
PROP_CAM_FOCUS,
PROP_CAM_MEGA=65536 // Borland C++ 6 compatibility
} CAMERA_PROPERTY;
typedef enum
{
eParamLong,
eParamBoolean,
eParamFloat,
eParamString,
eParamData
} FRAMEFILTER_PARAM_TYPE;
typedef enum
{
ePropertyRange,
ePropertyAbsoluteValue,
ePropertySwitch,
ePropertyButton,
ePropertyMapStrings,
ePropertyUnknown
} PROPERTY_INTERFACE_TYPE;
#endif

File diff suppressed because it is too large Load Diff

@ -0,0 +1,701 @@
#ifndef _MV_CAMERA_PARAMS_H_
#define _MV_CAMERA_PARAMS_H_
#include "PixelType.h"
// 设备类型定义
#define MV_UNKNOW_DEVICE 0x00000000 // 未知设备类型,保留意义
#define MV_GIGE_DEVICE 0x00000001 // GigE设备
#define MV_1394_DEVICE 0x00000002 // 1394-a/b 设备
#define MV_USB_DEVICE 0x00000004 // USB3.0 设备
#define MV_CAMERALINK_DEVICE 0x00000008 // CameraLink设备
typedef struct _MV_GIGE_DEVICE_INFO_
{
unsigned int nIpCfgOption;
unsigned int nIpCfgCurrent; //IP configuration:bit31-static bit30-dhcp bit29-lla
unsigned int nCurrentIp; //curtent ip
unsigned int nCurrentSubNetMask; //curtent subnet mask
unsigned int nDefultGateWay; //current gateway
unsigned char chManufacturerName[32];
unsigned char chModelName[32];
unsigned char chDeviceVersion[32];
unsigned char chManufacturerSpecificInfo[48];
unsigned char chSerialNumber[16];
unsigned char chUserDefinedName[16];
unsigned int nNetExport; // 网口IP地址
unsigned int nReserved[4];
}MV_GIGE_DEVICE_INFO;
#define INFO_MAX_BUFFER_SIZE 64
typedef struct _MV_USB3_DEVICE_INFO_
{
unsigned char CrtlInEndPoint; //控制输入端点
unsigned char CrtlOutEndPoint; //控制输出端点
unsigned char StreamEndPoint; //流端点
unsigned char EventEndPoint; //事件端点
unsigned short idVendor; //供应商ID号
unsigned short idProduct; //产品ID号
unsigned int nDeviceNumber; //设备序列号
unsigned char chDeviceGUID[INFO_MAX_BUFFER_SIZE]; //设备GUID号
unsigned char chVendorName[INFO_MAX_BUFFER_SIZE]; //供应商名字
unsigned char chModelName[INFO_MAX_BUFFER_SIZE]; //型号名字
unsigned char chFamilyName[INFO_MAX_BUFFER_SIZE]; //家族名字
unsigned char chDeviceVersion[INFO_MAX_BUFFER_SIZE]; //设备版本号
unsigned char chManufacturerName[INFO_MAX_BUFFER_SIZE]; //制造商名字
unsigned char chSerialNumber[INFO_MAX_BUFFER_SIZE]; //序列号
unsigned char chUserDefinedName[INFO_MAX_BUFFER_SIZE]; //用户自定义名字
unsigned int nbcdUSB; //支持的USB协议
unsigned int nReserved[3]; //保留字节
}MV_USB3_DEVICE_INFO;
// 设备信息
typedef struct _MV_CC_DEVICE_INFO_
{
// common info
unsigned short nMajorVer;
unsigned short nMinorVer;
unsigned int nMacAddrHigh; // MAC 地址
unsigned int nMacAddrLow;
unsigned int nTLayerType; // 设备传输层协议类型e.g. MV_GIGE_DEVICE
unsigned int nReserved[4];
union
{
MV_GIGE_DEVICE_INFO stGigEInfo;
MV_USB3_DEVICE_INFO stUsb3VInfo;
// more ...
}SpecialInfo;
}MV_CC_DEVICE_INFO;
// 网络传输的相关信息
typedef struct _MV_NETTRANS_INFO_
{
int64_t nReviceDataSize; // 已接收数据大小 [统计StartGrabbing和StopGrabbing之间的数据量]
int nThrowFrameCount; // 丢帧数量
unsigned int nReserved[5];
}MV_NETTRANS_INFO;
// 最多支持的传输层实例个数
#define MV_MAX_TLS_NUM 8
// 最大支持的设备个数
#define MV_MAX_DEVICE_NUM 256
// 设备信息列表
typedef struct _MV_CC_DEVICE_INFO_LIST_
{
unsigned int nDeviceNum; // 在线设备数量
MV_CC_DEVICE_INFO* pDeviceInfo[MV_MAX_DEVICE_NUM]; // 支持最多256个设备
}MV_CC_DEVICE_INFO_LIST;
// 输出帧的信息
typedef struct _MV_FRAME_OUT_INFO_
{
unsigned short nWidth; // 图像宽
unsigned short nHeight; // 图像高
enum MvGvspPixelType enPixelType; // 像素格式
/*以下字段暂不支持*/
unsigned int nFrameNum; // 帧号
unsigned int nDevTimeStampHigh; // 时间戳高32位
unsigned int nDevTimeStampLow; // 时间戳低32位
unsigned int nReserved0; // 保留8字节对齐
int64_t nHostTimeStamp; // 主机生成的时间戳
unsigned int nFrameLen;
unsigned int nReserved[3]; // 保留
}MV_FRAME_OUT_INFO;
// 输出帧的信息
typedef struct _MV_FRAME_OUT_INFO_EX_
{
unsigned short nWidth; // 图像宽
unsigned short nHeight; // 图像高
enum MvGvspPixelType enPixelType; // 像素格式
/*以下字段暂不支持*/
unsigned int nFrameNum; // 帧号
unsigned int nDevTimeStampHigh; // 时间戳高32位
unsigned int nDevTimeStampLow; // 时间戳低32位
unsigned int nReserved0; // 保留8字节对齐
int64_t nHostTimeStamp; // 主机生成的时间戳
unsigned int nFrameLen;
// 以下为chunk新增水印信息
// 设备水印时标
unsigned int nSecondCount;
unsigned int nCycleCount;
unsigned int nCycleOffset;
float fGain;
float fExposureTime;
unsigned int nAverageBrightness; //平均亮度
// 白平衡相关
unsigned int nRed;
unsigned int nGreen;
unsigned int nBlue;
unsigned int nFrameCounter;
unsigned int nTriggerIndex; //触发计数
//Line 输入/输出
unsigned int nInput; //输入
unsigned int nOutput; //输出
// ROI区域
unsigned short nOffsetX;
unsigned short nOffsetY;
unsigned int nReserved[41]; // 保留
}MV_FRAME_OUT_INFO_EX;
// 保存图片格式
enum MV_SAVE_IAMGE_TYPE
{
MV_Image_Undefined = 0,
MV_Image_Bmp = 1,
MV_Image_Jpeg = 2,
MV_Image_Png = 3, //不支持
MV_Image_Tif = 4, //不支持
};
// 保存图片参数
typedef struct _MV_SAVE_IMAGE_PARAM_T_
{
unsigned char* pData; // [IN] 输入数据缓存
unsigned int nDataLen; // [IN] 输入数据大小
enum MvGvspPixelType enPixelType; // [IN] 输入数据的像素格式
unsigned short nWidth; // [IN] 图像宽
unsigned short nHeight; // [IN] 图像高
unsigned char* pImageBuffer; // [OUT] 输出图片缓存
unsigned int nImageLen; // [OUT] 输出图片大小
unsigned int nBufferSize; // [IN] 提供的输出缓冲区大小
enum MV_SAVE_IAMGE_TYPE enImageType; // [IN] 输出图片格式
}MV_SAVE_IMAGE_PARAM;
// 图片保存参数
typedef struct _MV_SAVE_IMAGE_PARAM_T_EX_
{
unsigned char* pData; // [IN] 输入数据缓存
unsigned int nDataLen; // [IN] 输入数据大小
enum MvGvspPixelType enPixelType; // [IN] 输入数据的像素格式
unsigned short nWidth; // [IN] 图像宽
unsigned short nHeight; // [IN] 图像高
unsigned char* pImageBuffer; // [OUT] 输出图片缓存
unsigned int nImageLen; // [OUT] 输出图片大小
unsigned int nBufferSize; // [IN] 提供的输出缓冲区大小
enum MV_SAVE_IAMGE_TYPE enImageType; // [IN] 输出图片格式
unsigned int nJpgQuality; // [IN] 编码质量, (50-99]
unsigned int nReserved[4];
}MV_SAVE_IMAGE_PARAM_EX;
// 采集模式
typedef enum _MV_CAM_ACQUISITION_MODE_
{
MV_ACQ_MODE_SINGLE = 0, // 单帧模式
MV_ACQ_MODE_MUTLI = 1, // 多帧模式
MV_ACQ_MODE_CONTINUOUS = 2, // 持续采集模式
}MV_CAM_ACQUISITION_MODE;
// 增益模式
typedef enum _MV_CAM_GAIN_MODE_
{
MV_GAIN_MODE_OFF = 0, // 关闭
MV_GAIN_MODE_ONCE = 1, // 一次
MV_GAIN_MODE_CONTINUOUS = 2, // 连续
}MV_CAM_GAIN_MODE;
// 曝光模式
typedef enum _MV_CAM_EXPOSURE_MODE_
{
MV_EXPOSURE_MODE_TIMED = 0, // Timed
MV_EXPOSURE_MODE_TRIGGER_WIDTH = 1, // TriggerWidth
}MV_CAM_EXPOSURE_MODE;
// 自动曝光模式
typedef enum _MV_CAM_EXPOSURE_AUTO_MODE_
{
MV_EXPOSURE_AUTO_MODE_OFF = 0, // 关闭
MV_EXPOSURE_AUTO_MODE_ONCE = 1, // 一次
MV_EXPOSURE_AUTO_MODE_CONTINUOUS = 2, // 连续
}MV_CAM_EXPOSURE_AUTO_MODE;
typedef enum _MV_CAM_TRIGGER_MODE_
{
MV_TRIGGER_MODE_OFF = 0, // 关闭
MV_TRIGGER_MODE_ON = 1, // 打开
}MV_CAM_TRIGGER_MODE;
typedef enum _MV_CAM_GAMMA_SELECTOR_
{
MV_GAMMA_SELECTOR_USER = 1,
MV_GAMMA_SELECTOR_SRGB = 2,
}MV_CAM_GAMMA_SELECTOR;
typedef enum _MV_CAM_BALANCEWHITE_AUTO_
{
MV_BALANCEWHITE_AUTO_OFF = 0,
MV_BALANCEWHITE_AUTO_ONCE = 2,
MV_BALANCEWHITE_AUTO_CONTINUOUS = 1, // 连续
}MV_CAM_BALANCEWHITE_AUTO;
typedef enum _MV_CAM_TRIGGER_SOURCE_
{
MV_TRIGGER_SOURCE_LINE0 = 0,
MV_TRIGGER_SOURCE_LINE1 = 1,
MV_TRIGGER_SOURCE_LINE2 = 2,
MV_TRIGGER_SOURCE_LINE3 = 3,
MV_TRIGGER_SOURCE_COUNTER0 = 4,
MV_TRIGGER_SOURCE_SOFTWARE = 7,
MV_TRIGGER_SOURCE_FrequencyConverter= 8,
}MV_CAM_TRIGGER_SOURCE;
// GigEVision IP Configuration
#define MV_IP_CFG_STATIC 0x05000000
#define MV_IP_CFG_DHCP 0x06000000
#define MV_IP_CFG_LLA 0x04000000
// GigEVision Net Transfer Mode
#define MV_NET_TRANS_DRIVER 0x00000001
#define MV_NET_TRANS_SOCKET 0x00000002
// 信息类型
#define MV_MATCH_TYPE_NET_DETECT 0x00000001 // 网络流量和丢包信息
#define MV_MATCH_TYPE_USB_DETECT 0x00000002 // host接收到来自U3V设备的字节总数
// 某个节点对应的子节点个数最大值
#define MV_MAX_XML_NODE_NUM_C 128
// 节点名称字符串最大长度
#define MV_MAX_XML_NODE_STRLEN_C 64
//节点String值最大长度
#define MV_MAX_XML_STRVALUE_STRLEN_C 64
// 节点描述字段最大长度
#define MV_MAX_XML_DISC_STRLEN_C 512
// 最多的单元数
#define MV_MAX_XML_ENTRY_NUM 10
// 父节点个数上限
#define MV_MAX_XML_PARENTS_NUM 8
//每个已经实现单元的名称长度
#define MV_MAX_XML_SYMBOLIC_STRLEN_C 64
#define MV_MAX_XML_SYMBOLIC_NUM 64
//重发包默认最大包数量
// 全匹配的一种信息结构体
typedef struct _MV_ALL_MATCH_INFO_
{
unsigned int nType; // 需要输出的信息类型e.g. MV_MATCH_TYPE_NET_DETECT
void* pInfo; // 输出的信息缓存,由调用者分配
unsigned int nInfoSize; // 信息缓存的大小
}MV_ALL_MATCH_INFO;
// 网络流量和丢包信息反馈结构体,对应类型为 MV_MATCH_TYPE_NET_DETECT
typedef struct _MV_MATCH_INFO_NET_DETECT_
{
int64_t nReviceDataSize; // 已接收数据大小 [统计StartGrabbing和StopGrabbing之间的数据量]
int64_t nLostPacketCount; // 丢失的包数量
unsigned int nLostFrameCount; // 丢帧数量
unsigned int nReserved[5]; // 保留
}MV_MATCH_INFO_NET_DETECT;
// host收到从u3v设备端的总字节数对应类型为 MV_MATCH_TYPE_USB_DETECT
typedef struct _MV_MATCH_INFO_USB_DETECT_
{
int64_t nReviceDataSize; // 已接收数据大小 [统计OpenDevicce和CloseDevice之间的数据量]
unsigned int nRevicedFrameCount; // 已收到的帧数
unsigned int nErrorFrameCount; // 错误帧数
unsigned int nReserved[2]; // 保留
}MV_MATCH_INFO_USB_DETECT;
typedef struct _MV_IMAGE_BASIC_INFO_
{
// width
unsigned short nWidthValue;
unsigned short nWidthMin;
unsigned int nWidthMax;
unsigned int nWidthInc;
// height
unsigned int nHeightValue;
unsigned int nHeightMin;
unsigned int nHeightMax;
unsigned int nHeightInc;
// framerate
float fFrameRateValue;
float fFrameRateMin;
float fFrameRateMax;
// 像素格式
unsigned int enPixelType; // 当前的像素格式
unsigned int nSupportedPixelFmtNum; // 支持的像素格式种类
unsigned int enPixelList[MV_MAX_XML_SYMBOLIC_NUM];
unsigned int nReserved[8];
}MV_IMAGE_BASIC_INFO;
// 异常消息类型
#define MV_EXCEPTION_DEV_DISCONNECT 0x00008001 // 设备断开连接
#define MV_EXCEPTION_VERSION_CHECK 0x00008002 // SDK与驱动版本不匹配
// 设备的访问模式
// 独占权限其他APP只允许读CCP寄存器
#define MV_ACCESS_Exclusive 1
// 可以从5模式下抢占权限然后以独占权限打开
#define MV_ACCESS_ExclusiveWithSwitch 2
// 控制权限其他APP允许读所有寄存器
#define MV_ACCESS_Control 3
// 可以从5的模式下抢占权限然后以控制权限打开
#define MV_ACCESS_ControlWithSwitch 4
// 以可被抢占的控制权限打开
#define MV_ACCESS_ControlSwitchEnable 5
// 可以从5的模式下抢占权限然后以可被抢占的控制权限打开
#define MV_ACCESS_ControlSwitchEnableWithKey 6
// 读模式打开设备,适用于控制权限下
#define MV_ACCESS_Monitor 7
/************************************************************************/
/* 封装了GenICam的C接口相关参数定义 */
/************************************************************************/
// 每个节点对应的接口类型
enum MV_XML_InterfaceType
{
IFT_IValue, //!> IValue interface
IFT_IBase, //!> IBase interface
IFT_IInteger, //!> IInteger interface
IFT_IBoolean, //!> IBoolean interface
IFT_ICommand, //!> ICommand interface
IFT_IFloat, //!> IFloat interface
IFT_IString, //!> IString interface
IFT_IRegister, //!> IRegister interface
IFT_ICategory, //!> ICategory interface
IFT_IEnumeration, //!> IEnumeration interface
IFT_IEnumEntry, //!> IEnumEntry interface
IFT_IPort, //!> IPort interface
};
// 节点的访问模式
enum MV_XML_AccessMode
{
AM_NI, //!< Not implemented
AM_NA, //!< Not available
AM_WO, //!< Write Only
AM_RO, //!< Read Only
AM_RW, //!< Read and Write
AM_Undefined, //!< Object is not yet initialized
AM_CycleDetect, //!< used internally for AccessMode cycle detection
};
enum MV_XML_Visibility
{
V_Beginner = 0, //!< Always visible
V_Expert = 1, //!< Visible for experts or Gurus
V_Guru = 2, //!< Visible for Gurus
V_Invisible = 3, //!< Not Visible
V_Undefined = 99 //!< Object is not yet initialized
};
typedef enum _MV_GIGE_EVENT_
{
MV_EVENT_ExposureEnd = 1, // 每帧的曝光结束
MV_EVENT_FrameStartOvertrigger = 2, // 帧开始触发
MV_EVENT_AcquisitionStartOvertrigger = 3, // 取流开始过触发
MV_EVENT_FrameStart = 4, // 每帧的开始
MV_EVENT_AcquisitionStart = 5, // 开始取流(连续或单帧模式)
MV_EVENT_EventOverrun = 6 // 事件过触发
}MV_GIGE_EVENT;
//
// 单个节点基本属性
typedef struct _MV_XML_NODE_FEATURE_
{
enum MV_XML_InterfaceType enType; // 节点类型
enum MV_XML_Visibility enVisivility; //是否可见
char strDescription[MV_MAX_XML_DISC_STRLEN_C];//节点描述 目前暂不支持
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];//显示名称
char strName[MV_MAX_XML_NODE_STRLEN_C]; // 节点名
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; //提示
unsigned int nReserved[4];
}MV_XML_NODE_FEATURE;
// 节点列表
typedef struct _MV_XML_NODES_LIST_
{
unsigned int nNodeNum; // 节点个数
MV_XML_NODE_FEATURE stNodes[MV_MAX_XML_NODE_NUM_C];
}MV_XML_NODES_LIST;
typedef struct _MV_XML_FEATURE_Value_
{
enum MV_XML_InterfaceType enType; // 节点类型
char strDescription[MV_MAX_XML_DISC_STRLEN_C];//节点描述 目前暂不支持
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];//显示名称
char strName[MV_MAX_XML_NODE_STRLEN_C]; // 节点名
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; //提示
unsigned int nReserved[4];
}MV_XML_FEATURE_Value;
typedef struct _MV_XML_FEATURE_Base_
{
enum MV_XML_AccessMode enAccessMode; // 访问模式
}MV_XML_FEATURE_Base;
typedef struct _MV_XML_FEATURE_Integer_
{
char strName[MV_MAX_XML_NODE_STRLEN_C];
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; // 目前暂不支持
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
enum MV_XML_Visibility enVisivility; //是否可见
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
int64_t nValue; // 当前值
int64_t nMinValue; // 最小值
int64_t nMaxValue; // 最大值
int64_t nIncrement; // 增量
unsigned int nReserved[4];
}MV_XML_FEATURE_Integer;
typedef struct _MV_XML_FEATURE_Boolean_
{
char strName[MV_MAX_XML_NODE_STRLEN_C];
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; // 目前暂不支持
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
enum MV_XML_Visibility enVisivility; //是否可见
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
bool bValue; // 当前值
unsigned int nReserved[4];
}MV_XML_FEATURE_Boolean;
typedef struct _MV_XML_FEATURE_Command_
{
char strName[MV_MAX_XML_NODE_STRLEN_C];
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; // 目前暂不支持
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
enum MV_XML_Visibility enVisivility; //是否可见
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
unsigned int nReserved[4];
}MV_XML_FEATURE_Command;
typedef struct _MV_XML_FEATURE_Float_
{
char strName[MV_MAX_XML_NODE_STRLEN_C];
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; // 目前暂不支持
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
enum MV_XML_Visibility enVisivility; //是否可见
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
double dfValue; // 当前值
double dfMinValue; // 最小值
double dfMaxValue; // 最大值
double dfIncrement; // 增量
unsigned int nReserved[4];
}MV_XML_FEATURE_Float;
typedef struct _MV_XML_FEATURE_String_
{
char strName[MV_MAX_XML_NODE_STRLEN_C];
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; // 目前暂不支持
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
enum MV_XML_Visibility enVisivility; //是否可见
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
char strValue[MV_MAX_XML_STRVALUE_STRLEN_C];// 当前值
unsigned int nReserved[4];
}MV_XML_FEATURE_String;
typedef struct _MV_XML_FEATURE_Register_
{
char strName[MV_MAX_XML_NODE_STRLEN_C];
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; // 目前暂不支持
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
enum MV_XML_Visibility enVisivility; //是否可见
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
int64_t nAddrValue; // 当前值
unsigned int nReserved[4];
}MV_XML_FEATURE_Register;
typedef struct _MV_XML_FEATURE_Category_
{
char strDescription[MV_MAX_XML_DISC_STRLEN_C];//节点描述 目前暂不支持
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];//显示名称
char strName[MV_MAX_XML_NODE_STRLEN_C]; // 节点名
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; //提示
enum MV_XML_Visibility enVisivility; //是否可见
unsigned int nReserved[4];
}MV_XML_FEATURE_Category;
typedef struct _MV_XML_FEATURE_EnumEntry_
{
char strName[MV_MAX_XML_NODE_STRLEN_C];
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; // 目前暂不支持
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
int bIsImplemented;
int nParentsNum;
MV_XML_NODE_FEATURE stParentsList[MV_MAX_XML_PARENTS_NUM];
enum MV_XML_Visibility enVisivility; //是否可见
int64_t nValue; // 当前值
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
int nReserved[8];
}MV_XML_FEATURE_EnumEntry;
typedef struct _MV_XML_FEATURE_Enumeration_
{
enum MV_XML_Visibility enVisivility; //是否可见
char strDescription[MV_MAX_XML_DISC_STRLEN_C];//节点描述 目前暂不支持
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];//显示名称
char strName[MV_MAX_XML_NODE_STRLEN_C]; // 节点名
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; //提示
int nSymbolicNum; // Symbolic数
char strCurrentSymbolic[MV_MAX_XML_SYMBOLIC_STRLEN_C]; // 当前Symbolic索引
char strSymbolic[MV_MAX_XML_SYMBOLIC_NUM][MV_MAX_XML_SYMBOLIC_STRLEN_C];
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
int64_t nValue; // 当前值
unsigned int nReserved[4];
}MV_XML_FEATURE_Enumeration;
typedef struct _MV_XML_FEATURE_Port_
{
enum MV_XML_Visibility enVisivility; //是否可见
char strDescription[MV_MAX_XML_DISC_STRLEN_C];//节点描述 目前暂不支持
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];//显示名称
char strName[MV_MAX_XML_NODE_STRLEN_C]; // 节点名
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; //提示
enum MV_XML_AccessMode enAccessMode; // 访问模式
int bIsLocked; // 是否锁定。0-否1-是 目前暂不支持
unsigned int nReserved[4];
}MV_XML_FEATURE_Port;
typedef struct _MV_XML_CAMERA_FEATURE_
{
enum MV_XML_InterfaceType enType;
union
{
MV_XML_FEATURE_Integer stIntegerFeature;
MV_XML_FEATURE_Float stFloatFeature;
MV_XML_FEATURE_Enumeration stEnumerationFeature;
MV_XML_FEATURE_String stStringFeature;
}SpecialFeature;
}MV_XML_CAMERA_FEATURE;
typedef struct _MVCC_ENUMVALUE_T
{
unsigned int nCurValue; // 当前值
unsigned int nSupportedNum; // 数据的有效数据个数
unsigned int nSupportValue[MV_MAX_XML_SYMBOLIC_NUM];
unsigned int nReserved[4];
}MVCC_ENUMVALUE;
typedef struct _MVCC_INTVALUE_T
{
unsigned int nCurValue; // 当前值
unsigned int nMax;
unsigned int nMin;
unsigned int nInc;
unsigned int nReserved[4];
}MVCC_INTVALUE;
typedef struct _MVCC_FLOATVALUE_T
{
float fCurValue; // 当前值
float fMax;
float fMin;
unsigned int nReserved[4];
}MVCC_FLOATVALUE;
typedef struct _MVCC_STRINGVALUE_T
{
char chCurValue[256]; // 当前值
unsigned int nReserved[4];
}MVCC_STRINGVALUE;
#endif /* _MV_CAMERA_PARAMS_H_ */

@ -0,0 +1,52 @@
/****************************************************************************
(c) 2014 by Teledyne DALSA
Section: Digital Imaging
Project: GCBase
Author: Eric Bourbonnais
License: This file is published under the license of the EMVA GenICam Standard Group.
A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
If for some reason you are missing this file please contact the EMVA or visit the website
(http://www.genicam.org) for a full copy.
THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/
#ifndef GCBASE_GCARRAY_H
#define GCBASE_GCARRAY_H
#include <Base/GCTypes.h>
namespace GENICAM_NAMESPACE
{
template< class T>
class gcarray
{
public:
gcarray( size_t size) : m_p( NULL)
{
if(size)
m_p = new T[size];
};
~gcarray( ){ if(m_p) delete [] m_p;};
T* get() const {return m_p;} ;
T* operator *() {return m_p;} ;
T operator[](size_t idx) {return m_p[idx];} ;
private:
T* m_p;
};
}
#endif // GCBASE_GCARRAY_H

@ -0,0 +1,40 @@
/****************************************************************************
(c) 2005 by STEMMER IMAGING
License: This file is published under the license of the EMVA GenICam Standard Group.
A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
If for some reason you are missing this file please contact the EMVA or visit the website
(http://www.genicam.org) for a full copy.
THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/
/// \file
/// \brief Common GenICam base include file.
/// \version $Revision$
/// \date $Date$
/// \ingroup Base_PublicUtilities
#ifndef GENICAM_GCBASE_H
#define GENICAM_GCBASE_H
#include <Base/GCTypes.h>
#include <Base/GCString.h>
#include <Base/GCArray.h>
#include <Base/GCStringVector.h>
#include <Base/GCException.h>
#include <Base/GCUtilities.h>
#endif // GENICAM_GCBASE_H

@ -0,0 +1,75 @@
//***************************************************************************
// (C) 2005 STEMMER IMAGING
//
/// \file
/// GenICam Common Error Values
/// \author Rupert Stelz (STEMMER IMAGING)
/// \version 0.1
/// \date 2005
/// \ingroup Base_PublicUtilities
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//***************************************************************************
// TLIClientDummy.dll GenICam TransportLayer Dummy Client
#ifndef GC_ERROR_DEF_H
#define GC_ERROR_DEF_H
#include <Base/GCTypes.h>
namespace GENICAM_NAMESPACE
{
/// Gen Cam Error
//! \ingroup Base_PublicUtilities
typedef int32_t GC_ERROR;
//! Define a list which maps error ids to error descriptions
//! The list is filled in the cpp file
//! \ingroup Base_PublicUtilities
enum GCErrorID
{
GC_ERR_SUCCESS = 0,
GC_ERR_INVALID_BUFFER_SIZE = -1,
GC_ERR_INVALID_HANDLE = -2,
GC_ERR_INVALID_ID = -3,
GC_ERR_ACCESS_DENIED = -4,
GC_ERR_NO_DATA = -5,
GC_ERR_ERROR = -6,
GC_ERR_INVALID_PARAMETER = -7,
GC_ERR_TIMEOUT = -8,
GC_ERR_INVALID_FILENAME = -9,
GC_ERR_INVALID_ADDRESS = -10,
GC_ERR_FILE_IO = -11
};
//! Modules were errors can come from
//! \ingroup Base_PublicUtilities
enum GCModuleID {
GC_MOD_SYSTEM = 0x0,
GC_MOD_TLICLIENT = 0x20000000,
GC_MOD_TLISYSTEM = 0x10000000,
GC_MOD_FACTORY = 0x08000000,
GC_MOD_GENAPI = 0x04000000
};
#define GC_GET_ERROR(ErrorCode) (((ErrorCode ) & 0xFFFF ) | 0xFFFF0000)
#define GC_IS_ERROR(ErrorCode) (((ErrorCode ) & 0x80000000) ? true : false)
}
#endif //GC_ERROR_DEF_H

@ -0,0 +1,288 @@
//-----------------------------------------------------------------------------
// (c) 2004 by Basler Vision Technologies
// Section: Vision Components
// Project: GenICam
// Author: Fritz Dierks
// $Header$
//
// 01.10.2014 Stemmer, SD
// prepared for remove of std::exception base class
//
// 14.03.2005 Stemmer, RS
// changed minor things like namespace
// added a AccessException
// added a TimeoutException
//
// 21.02.2006 Stemmer, SD
// used _vsnprintf_s function for VS8 and higher (compiler fork)
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
Standard GenICam Exceptions
\ingroup Base_PublicUtilities
*/
#ifndef GENCAM_EXCEPTION_H_
#define GENCAM_EXCEPTION_H_
#include <cassert>
#include <cstdarg>
#include <exception>
#include <sstream>
#include <stdio.h>
#include <stdarg.h>
#include <Base/GCTypes.h>
#include <Base/GCString.h>
#pragma pack(push, 8)
namespace GENICAM_NAMESPACE
{
/**
\brief GenICam's exception class
\ingroup Base_PublicUtilities
*/
class GCBASE_RTTI_CLASS_API GenericException
{
public:
//! Constructor
GenericException(const char* pDescription, const char *pSourceFileName, unsigned int SourceLine);
//! Constructor
GenericException(const char* pDescription, const char *pSourceFileName, unsigned int SourceLine, const char* pExceptionType);
//! Constructor (GenApi specific)
GenericException(const char* pDescription, const char *pSourceFileName, unsigned int SourceLine, const char *pEntryPoint, const char *pErrorNodeName, const char* pExceptionType);
//! Get error description
virtual const char* GetDescription() const throw();
//! Get filename in which the error occurred
virtual const char* GetSourceFileName() const throw();
//! Get line number at which the error occurred
virtual unsigned int GetSourceLine() const throw();
//! Get error description (overwrite from std:exception)
virtual const char *what() const throw();
virtual ~GenericException() throw();
private:
//! Assembles the error message
void AssembleMessage();
//! The full error message
gcstring m_What;
//! The full error message
gcstring m_ExceptionType;
//! Line number at which the error occurred
unsigned int m_SourceLine;
//! Filename in which the error occurred
gcstring m_SourceFileName;
//! Error description
gcstring m_Description;
/* the following members are GenApi specific */
//! Node and method where the call stack entered the node map (may be empty)
gcstring m_EntryPoint;
//! Node where the error occurred (may be empty)
gcstring m_ErrorNodeName;
};
//! Creates an exception with the same functionality as the GenericException but being of different type
//! \ingroup Base_PublicUtilities
#define DECLARE_EXCEPTION( name ) \
class GCBASE_RTTI_CLASS_API name : public GenICam::GenericException \
{ \
public: \
name( const char* pDescription, const char *pSourceFileName, int SourceLine ); \
name( const char* pDescription, const char *pSourceFileName, int SourceLine, const char* pExceptionType ); \
name( const char* pDescription, const char *pSourceFileName, int SourceLine, const char *pEntryPoint, const char *pErrorNodeName, const char* pExceptionType ); \
}
//! \addtogroup Base_PublicUtilities
DECLARE_EXCEPTION(BadAllocException);
//! Exception fired if an argument is invalid
DECLARE_EXCEPTION(InvalidArgumentException);
//! Exception fired if an argument is out of range
DECLARE_EXCEPTION(OutOfRangeException);
//! Exception fired if a property access fails
DECLARE_EXCEPTION(PropertyException);
//! Runtime exception
DECLARE_EXCEPTION(RuntimeException);
//! Exception to be thrown to indicate logical errors in program flow
DECLARE_EXCEPTION(LogicalErrorException);
//! Exception to be thrown to indicate an access error
DECLARE_EXCEPTION(AccessException);
//! Exception to be thrown to indicate an timeout error
DECLARE_EXCEPTION(TimeoutException);
//! Exception to be thrown to indicate the result of a dynamic cast was zero
DECLARE_EXCEPTION(DynamicCastException);
//! \}
/*-----------------------------------------------------------------*/
// Utilities
/*-----------------------------------------------------------------*/
/**
\brief printf like creation of exceptions
\ingroup Base_PublicImpl
*/
template <typename E>
class ExceptionReporter
{
public:
ExceptionReporter(const char* pSourceFileName, int SourceLine)
: m_SourceFileName(pSourceFileName)
, m_SourceLine(SourceLine)
{
}
ExceptionReporter(const char* pSourceFileName, int SourceLine, const char* pExceptionType)
: m_SourceFileName(pSourceFileName)
, m_SourceLine(SourceLine)
, m_ExceptionType(pExceptionType)
{
}
E Report(const char* pFormat, ...)
{
char pBuffer[256];
va_list vap;
va_start(vap, pFormat);
# if defined (_MSC_VER)
vsnprintf_s(pBuffer, sizeof pBuffer, _TRUNCATE, pFormat, vap);
# else
vsnprintf( pBuffer, sizeof pBuffer, pFormat, vap );
# endif
return E(pBuffer, m_SourceFileName.c_str(), m_SourceLine, m_ExceptionType.c_str());
};
E Report()
{
return E("", m_SourceFileName.c_str(), m_SourceLine, m_ExceptionType.c_str());
}
E Report(const std::string &s)
{
return E(s.c_str(), m_SourceFileName.c_str(), m_SourceLine, m_ExceptionType.c_str());
}
E Report(const std::stringstream& str)
{
return E(str.str().c_str(), m_SourceFileName.c_str(), m_SourceLine, m_ExceptionType.c_str());
}
protected:
//! the path to the source file where the exception is thrown
gcstring m_SourceFileName;
//! The line within the source file where the exception is thrown
int m_SourceLine;
//! the type of the exception in string
gcstring m_ExceptionType;
};
//! \addtogroup Base_PublicImpl
//! \{
//! Fires a generic exception, e.g. throw GENERIC_EXCEPTION("%ld too large", Value);
#define GENERIC_EXCEPTION GenICam::ExceptionReporter<GenICam::GenericException>(__FILE__, __LINE__).Report
//! Fires a bad alloc exception, e.g. throw BAD_ALLOC_EXCEPTION();
#define BAD_ALLOC_EXCEPTION GenICam::ExceptionReporter<GenICam::BadAllocException>(__FILE__, __LINE__, "BadAllocException" ).Report
//! Fires an invalid argument exception, e.g. throw INVALID_ARGUMENT_EXCEPTION("%ld too large", Value);
#define INVALID_ARGUMENT_EXCEPTION GenICam::ExceptionReporter<GenICam::InvalidArgumentException>(__FILE__, __LINE__, "InvalidArgumentException" ).Report
//! Fires an out of range exception, e.g. throw OUT_OF_RANGE_EXCEPTION("%ld too large", Value);
#define OUT_OF_RANGE_EXCEPTION GenICam::ExceptionReporter<GenICam::OutOfRangeException>(__FILE__, __LINE__, "OutOfRangeException" ).Report
//! Fires an property exception, e.g. throw PROPERTY_EXCEPTION("%ld too large", Value);
#define PROPERTY_EXCEPTION GenICam::ExceptionReporter<GenICam::PropertyException>(__FILE__, __LINE__, "PropertyException" ).Report
//! Fires a runtime exception, e.g. throw RUNTIME_EXCEPTION("buh!")
#define RUNTIME_EXCEPTION GenICam::ExceptionReporter<GenICam::RuntimeException>(__FILE__, __LINE__, "RuntimeException" ).Report
//! Fires a logical error exception, e.g. throw LOGICAL_ERROR_EXCEPTION("Should never reach this point")
#define LOGICAL_ERROR_EXCEPTION GenICam::ExceptionReporter<GenICam::LogicalErrorException>(__FILE__, __LINE__, "LogicalErrorException" ).Report
//! Fires a access exception, e.g. throw ACCESS_EXCEPTION("Not everybody")
#define ACCESS_EXCEPTION GenICam::ExceptionReporter<GenICam::AccessException>(__FILE__, __LINE__, "AccessException" ).Report
//! Fires a timeout error exception, e.g. throw TIMEOUT_EXCEPTION("Not everybody")
#define TIMEOUT_EXCEPTION GenICam::ExceptionReporter<GenICam::TimeoutException>(__FILE__, __LINE__,"TimeoutException" ).Report
//! Fires a dynamic cast exception, e.g. throw DYNAMICCAST_EXCEPTION("Not everybody")
#define DYNAMICCAST_EXCEPTION GenICam::ExceptionReporter<GenICam::DynamicCastException>(__FILE__, __LINE__, "DynamicCastException" ).Report
//! Range check for int64
#define CHECK_RANGE_I64(_Value, _Min, _Max, _Inc) \
if((int64_t)(_Value) < (int64_t)(_Min)) \
throw OUT_OF_RANGE_EXCEPTION("Value = %" FMT_I64 "d must be equal or greater than Min = %" FMT_I64 "d", (int64_t)(_Value), (int64_t)(_Min)); \
else if((int64_t)(_Value) > (int64_t)(_Max)) \
throw OUT_OF_RANGE_EXCEPTION("Value = %" FMT_I64 "d must be equal or smaller than Max = %" FMT_I64 "d", (int64_t)(_Value), (int64_t)(_Max)); \
else if ( 0 == _Inc ) \
throw LOGICAL_ERROR_EXCEPTION("Increment must not equal 0!"); \
else if( ((int64_t)(_Value) - (int64_t)(_Min)) % (int64_t)(_Inc) != 0) \
throw OUT_OF_RANGE_EXCEPTION("The difference between Value = %" FMT_I64 "d and Min = %" FMT_I64 "d must be dividable without rest by Inc = %" FMT_I64 "d", (int64_t)(_Value), (int64_t)(_Min), (int64_t)(_Inc));
//! Range check for float
#define CHECK_RANGE_FLT(_Value, _Min, _Max) \
if ((_Value) < (_Min)) \
throw OUT_OF_RANGE_EXCEPTION( "Value %f must be greater than or equal %f", (_Value), (_Min) ); \
else if ((_Value) > (_Max)) \
throw OUT_OF_RANGE_EXCEPTION( "Value %f must be smaller than or equal %f", (_Value), (_Max) );
//! Checks if a dynamic_cast is possible
#define CHECK_DYNAMIC_CAST_POINTER( _Pointer )\
assert( (_Pointer) != NULL ); \
if (NULL == (_Pointer)) throw LOGICAL_ERROR_EXCEPTION( "Unexpected type in dynamic cast" )
//! \}
}
#pragma pack(pop)
#endif // GENCAM_EXCEPTION_H_

@ -0,0 +1,183 @@
//-----------------------------------------------------------------------------
// (c) 2007 by Basler Vision Technologies
// Section: Vision Components
// Project: GenICam
// Author: Fritz Dierks
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief helpers for pragma linkage
*/
#ifndef LINKAGE_H
#define LINKAGE_H
#include <GenICamVersion.h>
#if defined (_MSC_VER)
# if defined (_WIN32) && defined (_MT )
# if defined(GENICAM_USER_ALWAYS_LINK_RELEASE)
// for the central installation always the Release version is used
# define CONFIGURATION "MD"
# else
# if defined(_DEBUG) || defined(DEBUG)
# define CONFIGURATION "MDd"
# else
# define CONFIGURATION "MD"
# endif
# endif // defined(GENICAM_USER_ALWAYS_LINK_RELEASE)
# else
# error Invalid configuration
# endif
# if defined(COMPILER) // COMPILER may be force set from outside
# undef GENICAM_COMPILER_STR
# define GENICAM_COMPILER_STR COMPILER
# endif
// _MSC_VER==1400 : VC80 : Visual C++ 2005
// _MSC_VER==1500 : VC90 : Visual C++ 2008
// _MSC_VER==1600 : VC100 : Visual C++ 2010
// _MSC_VER==1700 : VC110 : Visual C++ 2012
// _MSC_VER==1800 : VC120 : Visual C++ 2013
// _MSC_VER==1900 : VC140 : Visual C++ 2015
# if !( _MSC_VER==1400 || _MSC_VER==1500 || _MSC_VER==1600 || _MSC_VER==1700 || _MSC_VER==1800 || _MSC_VER==1900 ) && ! defined(GENICAM_USER_ACCEPTS_ANY_COMPILER)
# define COMPILER_VERSION_2( s ) #s
# define COMPILER_VERSION_STRING(version) COMPILER_VERSION_2( version )
# pragma message( "Notice: Using GenICam with untested compiler, version " COMPILER_VERSION_STRING(_MSC_VER) " detected!" )
# pragma message( "Following versions were tested: 1400, 1500, 1600, 1700, 1800, 1900." )
# undef COMPILER_VERSION_2
# undef COMPILER_VERSION_STRING
# endif
# if defined(GENICAM_COMPANY_SUFFIX)
# define GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \
"_" CONFIGURATION "_" GENICAM_COMPILER_STR "_v" VERSION_MAJOR "_" VERSION_MINOR "_" TOSTRING(GENICAM_COMPANY_SUFFIX) "." EXTENSION
# else
# define GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \
"_" CONFIGURATION "_" GENICAM_COMPILER_STR "_v" VERSION_MAJOR "_" VERSION_MINOR "." EXTENSION
# endif
// _MDd_VC80_v3_0_Company
// _MD_VC80_v3_0_Company
// _MDd_VC80_v3_0
// _MD_VC80_v3_0
# define LIB_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "lib" )
#if defined(UNDER_RTSS)
# define DLL_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "rtdll" )
#else
# define DLL_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "dll" )
#endif // defined(UNDER_RTSS)
# define EXE_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_COMPILER_STR, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "exe" )
# define DLL_PREFIX ""
#elif defined (__GNUC__) && (defined (__linux__) || defined(__APPLE__) || defined(VXWORKS))
# if defined(_DEBUG) || defined(DEBUG)
# define CONFIGURATION "_d"
# else
# define CONFIGURATION ""
# endif
# if defined(GENICAM_COMPANY_SUFFIX)
# define GENICAM_SUFFIX( CONFIGURATION, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \
CONFIGURATION "_" GENICAM_COMPILER_STR "_v" VERSION_MAJOR "_" VERSION_MINOR "_" TOSTRING(GENICAM_COMPANY_SUFFIX) "." EXTENSION
# else
# define GENICAM_SUFFIX( CONFIGURATION, VERSION_MAJOR, VERSION_MINOR, EXTENSION ) \
CONFIGURATION "_" GENICAM_COMPILER_STR "_v" VERSION_MAJOR "_" VERSION_MINOR "." EXTENSION
# endif
// _d_gcc40_v3_0_Company
// _gcc40_v3_0_Company
// _d_gcc40_v3_0
// _gcc40_v3_0
# define LIB_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "a" )
# if defined(__linux__)
# define DLL_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "so" )
# elif defined(VXWORKS)
# define DLL_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "out" )
# else
# define DLL_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "dylib" )
# endif
# define EXE_SUFFIX \
GENICAM_SUFFIX( CONFIGURATION, GENICAM_VERSION_MAJOR_STR, GENICAM_VERSION_MINOR_STR, "" )
# if defined(VXWORKS)
# define DLL_PREFIX ""
# else
# define DLL_PREFIX "lib"
# endif
#else
# error Unknown shared library support
#endif
#define LIB_NAME( MODULE ) \
MODULE LIB_SUFFIX
#define DLL_NAME( MODULE ) \
DLL_PREFIX MODULE DLL_SUFFIX
#define EXE_NAME( MODULE ) \
MODULE EXE_SUFFIX
// The CameraLink standard defines the names for certain DLLs we build that do not match the GenICam naming scheme
#if defined(_DEBUG) || defined(DEBUG)
# define CAMERALINK_CONFIGURATION "d"
#else
# define CAMERALINK_CONFIGURATION ""
#endif
#
#if defined(_MSC_VER)
# if defined(UNDER_RTSS)
# define CAMERALINK_DLL_SUFFIX ".rtdll"
# else
# define CAMERALINK_DLL_SUFFIX ".dll"
# endif
#elif defined (__GNUC__) && (defined (__linux__) || defined(__APPLE__) || defined(VXWORKS))
# if defined(__linux__)
# define CAMERALINK_DLL_SUFFIX ".so"
# elif defined(VXWORKS)
# define CAMERALINK_DLL_SUFFIX ".out"
# else
# define CAMERALINK_DLL_SUFFIX ".dylib"
# endif
#endif
#
#define CAMERALINK_DLL_NAME( MODULE) \
MODULE CAMERALINK_CONFIGURATION CAMERALINK_DLL_SUFFIX
#endif // LINKAGE_H

@ -0,0 +1,46 @@
/****************************************************************************
(c) 2004 by Basler Vision Technologies
(c) 2005 STEMMER IMAGING
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/
/// \file
/// \brief GenICam versioned namespace.
/// \ingroup Base_PublicUtilities
#ifndef GENICAM_NAMESPACE_H
#define GENICAM_NAMESPACE_H
#include <GenICamVersion.h>
// This is the development namespace for the GenICam libraries
#if defined(GENICAM_COMPANY_SUFFIX)
# define GENICAM_NAMESPACE GENICAM_SEP_UNDERSCORE_COMPANY(GenICam, GENICAM_VERSION_MAJOR, GENICAM_VERSION_MINOR, GENICAM_COMPANY_SUFFIX)
#else
# define GENICAM_NAMESPACE GENICAM_SEP_UNDERSCORE(GenICam, GENICAM_VERSION_MAJOR, GENICAM_VERSION_MINOR)
#endif
namespace GENICAM_NAMESPACE {}
// Public alias
namespace GenICam = GENICAM_NAMESPACE;
#endif // GENICAM_NAMESPACE_H

@ -0,0 +1,257 @@
//-----------------------------------------------------------------------------
// (c) 2014 by Basler Vision Technologies
// Section: Vision Components
// Project: GenICam
// Author: Maxime Dupont
// $Header$
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief GenICam RTSS utilities
\ingroup Base_PublicUtilities
*/
#ifndef GENAPI_GENAPIRTSSUTILITIES_DEF_H_
#define GENAPI_GENAPIRTSSUTILITIES_DEF_H_
#include "crtdefs.h"
#include <stdio.h>
#include <errno.h>
#include <io.h>
#include "windows.h"
#if defined(UNDER_RTSS) && defined(GENICAM_BUILD)
#if defined(htons)
#undef htons
#endif // defined(htons)
#if defined(ntohs)
#undef ntohs
#endif // defined(ntohs)
#if defined(htonl)
#undef htonl
#endif // defined(htonl)
#if defined(ntohl)
#undef ntohl
#endif // defined(ntohl)
#define HTONS(n) (unsigned short)(((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
#define NTOHS(n) (unsigned short)(((((unsigned short)(n) & 0xFF)) << 8) | (((unsigned short)(n) & 0xFF00) >> 8))
#define HTONL(n) (unsigned long)(((((unsigned long)(n) & 0xFF)) << 24) | \
((((unsigned long)(n) & 0xFF00)) << 8) | \
((((unsigned long)(n) & 0xFF0000)) >> 8) | \
((((unsigned long)(n) & 0xFF000000)) >> 24))
#define NTOHL(n) (unsigned long)(((((unsigned long)(n) & 0xFF)) << 24) | \
((((unsigned long)(n) & 0xFF00)) << 8) | \
((((unsigned long)(n) & 0xFF0000)) >> 8) | \
((((unsigned long)(n) & 0xFF000000)) >> 24))
#define htons(n) HTONS(n)
#define ntohs(n) NTOHS(n)
#define htonl(n) HTONL(n)
#define ntohl(n) NTOHL(n)
#endif
#if defined(UNDER_RTSS)
#ifdef __cplusplus
extern "C" {
#endif
WINBASEAPI __out HANDLE WINAPI FindFirstFileExW(
__in LPCWSTR lpFileName,
__in FINDEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFindFileData,
__in FINDEX_SEARCH_OPS fSearchOp,
__reserved LPVOID lpSearchFilter,
__in DWORD dwAdditionalFlags
);
WINBASEAPI __out HANDLE WINAPI FindFirstFileExA(
__in LPCSTR lpFileName,
__in FINDEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFindFileData,
__in FINDEX_SEARCH_OPS fSearchOp,
__reserved LPVOID lpSearchFilter,
__in DWORD dwAdditionalFlags
);
WINBASEAPI BOOL WINAPI FindNextFileW(
__in HANDLE hFindFile,
__out LPWIN32_FIND_DATAW lpFindFileData
);
WINBASEAPI BOOL WINAPI FindNextFileA(
__in HANDLE hFindFile,
__out LPWIN32_FIND_DATAA lpFindFileData
);
WINBASEAPI BOOL WINAPI FindClose(
__inout HANDLE hFindHandle
);
WINBASEAPI BOOL WINAPI SystemTimeToTzSpecificLocalTime(
__in_opt CONST TIME_ZONE_INFORMATION * lpTimeZoneInformation,
__in CONST SYSTEMTIME * lpUniversalTime,
__out LPSYSTEMTIME lpLocalTime
);
WINBASEAPI UINT WINAPI GetDriveTypeW(
__in_opt LPCWSTR lpRootPathName
);
WINBASEAPI UINT WINAPI GetDriveTypeA(
__in_opt LPCSTR lpRootPathName
);
WINBASEAPI BOOL WINAPI GetFileInformationByHandle(
__in HANDLE hFile,
__out LPBY_HANDLE_FILE_INFORMATION lpFileInformation
);
WINBASEAPI BOOL WINAPI PeekNamedPipe(
__in HANDLE hNamedPipe,
__out_bcount_part_opt(nBufferSize, *lpBytesRead) LPVOID lpBuffer,
__in DWORD nBufferSize,
__out_opt LPDWORD lpBytesRead,
__out_opt LPDWORD lpTotalBytesAvail,
__out_opt LPDWORD lpBytesLeftThisMessage
);
WINBASEAPI DWORD WINAPI GetFullPathNameW(
__in LPCWSTR lpFileName,
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return +1) LPWSTR lpBuffer,
__deref_opt_out LPWSTR * lpFilePart
);
WINBASEAPI BOOL WINAPI SetCurrentDirectoryW(
__in LPCWSTR lpPathName
);
WINBASEAPI DWORD WINAPI GetCurrentDirectoryW(
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return +1) LPWSTR lpBuffer
);
WINBASEAPI DWORD WINAPI GetFullPathNameA(
__in LPCSTR lpFileName,
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return +1) LPSTR lpBuffer,
__deref_opt_out LPSTR * lpFilePart
);
WINBASEAPI UINT WINAPI SetErrorMode(
__in UINT uMode
);
WINBASEAPI LANGID WINAPI GetUserDefaultLangID(void);
WINBASEAPI DWORD WINAPI GetFileAttributesW(
__in LPCWSTR lpFileName
);
WINBASEAPI DWORD WINAPI GetFileAttributesA(
__in LPCSTR lpFileName
);
WINBASEAPI BOOL WINAPI GetFileAttributesExW(
__in LPCWSTR lpFileName,
__in GET_FILEEX_INFO_LEVELS fInfoLevelId,
__out LPVOID lpFileInformation
);
WINBASEAPI BOOL WINAPI GetModuleHandleExA(
__in DWORD dwFlags,
__in_opt LPCSTR lpModuleName,
__out HMODULE * phModule
);
WINBASEAPI HLOCAL WINAPI LocalFree(
__deref HLOCAL hMem
);
WINBASEAPI BOOL WINAPI CopyFileA(
__in LPCSTR lpExistingFileName,
__in LPCSTR lpNewFileName,
__in BOOL bFailIfExists
);
// ************************************************************************
// ********** GenAPITest section **********
// ************************************************************************
WINBASEAPI UINT WINAPI GetSystemDirectoryA(
__out_ecount_part_opt(uSize, return + 1) LPSTR lpBuffer,
__in UINT uSize
);
WINBASEAPI DWORD WINAPI GetTempPathA(
__in DWORD nBufferLength,
__out_ecount_part_opt(nBufferLength, return + 1) LPSTR lpBuffer
);
WINBASEAPI BOOL WINAPI GetThreadTimes(
__in HANDLE hThread,
__out LPFILETIME lpCreationTime,
__out LPFILETIME lpExitTime,
__out LPFILETIME lpKernelTime,
__out LPFILETIME lpUserTime
);
WINBASEAPI BOOL WINAPI SetConsoleOutputCP(
__in UINT wCodePageID
);
WINBASEAPI BOOL WINAPI SetEnvironmentVariableW(
__in LPCWSTR lpName,
__in_opt LPCWSTR lpValue
);
WINBASEAPI __success(return < nSize) __success(return != 0) DWORD WINAPI GetEnvironmentVariableA(
__in_opt LPCSTR lpName,
__out_ecount_part_opt(nSize, return + 1) LPSTR lpBuffer,
__in DWORD nSize
);
WINBASEAPI BOOL WINAPI CopyFileW(
__in LPCWSTR lpExistingFileName,
__in LPCWSTR lpNewFileName,
__in BOOL bFailIfExists
);
#ifdef __cplusplus
}
#endif
#endif // defined(UNDER_RTSS)
#endif // GENAPI_GENAPIRTSSUTILITIES_DEF_H_

@ -0,0 +1,258 @@
/****************************************************************************
(c) 2005 by STEMMER IMAGING
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/
/// \file
/// \brief Portable string implementation
/// \ingroup Base_PublicUtilities
#ifndef GENICAM_GCSTRING_H
#define GENICAM_GCSTRING_H
#include <new>
#include <string>
#include <iostream>
#include <Base/GCTypes.h>
#pragma pack(push, 8)
/**
\brief Indicates either 'not found' or 'all remaining characters'.
\ingroup GenApi_Implementation
*/
#define GCSTRING_NPOS size_t(-1)
namespace GENICAM_NAMESPACE
{
/**
\brief A string class which is a clone of std::string
\ingroup Base_PublicUtilities
*/
class GCBASE_API gcstring
{
# if defined(_MSC_VER) && !defined(PHARLAP_WIN32)
public:
//! Helper class for storing shared-ownership wchar_t *
class GCBASE_API gcwchar
{
public:
//! Creates a buffer of \a n wchar_ts
explicit gcwchar( size_t n );
// copy constructor
gcwchar( const gcwchar &rhs );
// assignment operator
gcwchar & operator = (const gcwchar &rhs);
//! Gets the c-string.
const wchar_t * c_str() const;
//! Gets the length of the buffer.
size_t length() const;
//! destructor
~gcwchar();
private:
class impl;
impl *m_pimpl;
};
# endif
// Ctor / Dtor
// -------------------------------------------------------------------------
public:
gcstring ();
gcstring ( const char *pc );
gcstring ( const char *pc, size_t n );
gcstring ( size_t count, char ch );
gcstring ( const gcstring &str );
# if defined(_MSC_VER) && !defined(PHARLAP_WIN32)
explicit gcstring ( const wchar_t *pBufferUTF16 );
gcstring ( const wchar_t *pBufferUTF16, size_t n );
# endif
virtual ~gcstring ( void );
// Data access
// -------------------------------------------------------------------------
public:
virtual gcstring & append ( const gcstring &str );
virtual gcstring & append ( size_t count, char ch );
virtual gcstring & assign ( const gcstring &str );
virtual gcstring & assign ( size_t count, char ch );
virtual gcstring & assign ( const char *pc );
virtual gcstring & assign ( const char *pc, size_t n );
# if defined(_MSC_VER) && !defined(PHARLAP_WIN32)
virtual gcstring & assign ( const wchar_t *pStringUTF16 );
virtual gcstring & assign ( const wchar_t *pStringUTF16, int n );
# endif
virtual int compare ( const gcstring &str ) const;
# if defined(_MSC_VER) && !defined(PHARLAP_WIN32)
virtual gcwchar w_str ( void ) const;
# endif
virtual const char *c_str ( void ) const;
virtual bool empty ( void ) const;
virtual size_t find ( char ch, size_t offset = 0 ) const;
virtual size_t find ( const gcstring &str, size_t offset = 0 ) const;
virtual size_t find ( const gcstring &str, size_t offset, size_t count ) const;
virtual size_t find ( const char* pc, size_t offset = 0) const;
virtual size_t find ( const char* pc, size_t offset, size_t count ) const;
virtual size_t length ( void ) const;
virtual size_t size ( void ) const;
virtual void resize ( size_t n );
virtual size_t max_size ( ) const;
virtual gcstring substr ( size_t offset = 0, size_t count = GCSTRING_NPOS ) const;
virtual size_t find_first_of ( const gcstring &str, size_t offset = 0 ) const;
virtual size_t find_first_not_of ( const gcstring &str, size_t offset = 0 ) const;
static size_t _npos ( void );
virtual void swap ( gcstring &Right );
// Operators
// -------------------------------------------------------------------------
public:
bool operator != ( const gcstring &str ) const;
bool operator != ( const char *pc ) const;
gcstring & operator += ( const gcstring &str );
gcstring operator += ( const gcstring &str ) const;
gcstring & operator += ( const char *pc );
gcstring & operator += ( char ch );
gcstring operator += ( char ch ) const;
gcstring & operator = ( const gcstring &str );
# if defined(_MSC_VER) && !defined(PHARLAP_WIN32)
gcstring & operator = ( const wchar_t *pStringUTF16 );
# endif
bool operator == ( const gcstring &str ) const;
bool operator == ( const char *pc ) const;
bool operator < ( const gcstring &str ) const;
bool operator > ( const gcstring &str ) const;
operator const char * ( void ) const;
void operator delete ( void *pWhere );
void operator delete ( void *pWhere, void *pNewWhere );
void * operator new ( size_t uiSize );
void * operator new ( size_t uiSize, void *pWhere );
GCBASE_API
friend gcstring operator + ( const gcstring &left, const gcstring &right );
GCBASE_API
friend gcstring operator + ( const gcstring &left, const char *right );
GCBASE_API
friend gcstring operator + ( const char *left, const gcstring &right );
// Member
// -------------------------------------------------------------------------
private:
// redundant pointer to make the possible to see the contents of the string in the debugger
const char* m_psz;
// actual std::string object
uint8_t m_opaqueData[64];
// Constants
// -------------------------------------------------------------------------
public:
// Beware : this static member prevents delay loading
// use _npos() instead
static const size_t npos;
};
}
namespace GENICAM_NAMESPACE
{
// this is necessary due to the circular dependency between string/exception
GCBASE_API void ThrowBadAlloc(const char *source, int line);
//! STL getline
//! \ingroup Base_PublicUtilities
inline std::istream & getline(std::istream& is, GENICAM_NAMESPACE::gcstring& str)
{
try
{
std::string tmp;
std::getline(is, tmp);
str.assign(tmp.c_str(), tmp.size());
}
catch(std::bad_alloc &)
{
ThrowBadAlloc(__FILE__, __LINE__);
}
return is;
}
//! STL getline
//! \ingroup Base_PublicUtilities
inline std::istream & getline(std::istream& is, GENICAM_NAMESPACE::gcstring& str, char delim)
{
try
{
std::string tmp;
std::getline(is, tmp, delim);
str.assign(tmp.c_str(), tmp.size());
}
catch(std::bad_alloc &)
{
ThrowBadAlloc(__FILE__, __LINE__);
}
return is;
}
}
//! STL operator out
//! \ingroup Base_PublicUtilities
inline std::ostream & operator <<(std::ostream &ostr, const GENICAM_NAMESPACE::gcstring &str)
{
try
{
// use formatted output operator of std::string
ostr << str.c_str();
}
catch(std::bad_alloc &)
{
GENICAM_NAMESPACE::ThrowBadAlloc(__FILE__, __LINE__);
}
return ostr;
}
//! STL operator in
//! \ingroup Base_PublicUtilities
inline std::istream & operator >>(std::istream &istr, GENICAM_NAMESPACE::gcstring &str)
{
try
{
std::string tmp;
istr >> tmp;
str.assign(tmp.c_str(), tmp.size());
}
catch(std::bad_alloc &)
{
GENICAM_NAMESPACE::ThrowBadAlloc(__FILE__, __LINE__);
}
return istr;
}
#pragma pack(pop)
#endif // GENICAM_GCSTRING_H

@ -0,0 +1,182 @@
/****************************************************************************
(c) 2005 by STEMMER IMAGING
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/
/// \file
/// \brief Portable string vector implementation
/// \ingroup Base_PublicUtilities
#ifndef GENICAM_GCSTRINGLIST_H
#define GENICAM_GCSTRINGLIST_H
#include <Base/GCTypes.h>
#include <Base/GCString.h>
#pragma pack(push, 8)
#if defined (_WIN32) || (defined (__GNUC__) && (defined (__linux__) || defined(__APPLE__) || defined(VXWORKS)))
namespace GENICAM_NAMESPACE
{
/**
\brief A vector of gcstrings which is a clone of std::vector<std::string>
\ingroup Base_PublicUtilities
*/
class GCBASE_API gcstring_vector
{
// Nested types
// ---------------------------------------------------------------------------
public:
class GCBASE_API const_iterator
{
// Ctor / Dtor
// -------------------------------------------------------------------------
public:
const_iterator(gcstring *pStr = 0);
// Operators
// -------------------------------------------------------------------------
public:
const gcstring & operator * (void) const;
const gcstring * operator -> (void) const;
const_iterator & operator ++ (void);
const_iterator operator ++ (int);
const_iterator & operator -- (void);
const_iterator operator -- (int);
const_iterator & operator += (intptr_t iInc);
const_iterator operator + (intptr_t iInc) const;
const_iterator & operator -= (intptr_t iDec);
intptr_t operator - (const const_iterator &iter) const;
const_iterator operator - (intptr_t iDec) const;
const gcstring & operator [] (intptr_t iIndex) const;
bool operator == (const const_iterator &iter) const;
bool operator != (const const_iterator &iter) const;
bool operator < (const const_iterator &iter) const;
bool operator > (const const_iterator &iter) const;
bool operator <= (const const_iterator &iter) const;
bool operator >= (const const_iterator &iter) const;
GCBASE_API
friend const_iterator operator + (intptr_t iInc, const const_iterator &iter);
// Member
// -------------------------------------------------------------------------
protected:
gcstring * _ps;
};
class GCBASE_API iterator :
public const_iterator
{
// Ctor / Dtor
// -------------------------------------------------------------------------
public:
iterator(gcstring *pStr = 0);
// Operators
// -------------------------------------------------------------------------
public:
gcstring & operator * (void) const;
gcstring * operator -> (void) const;
iterator & operator ++ (void);
iterator operator ++ (int);
iterator & operator -- (void);
iterator operator -- (int);
iterator & operator += (intptr_t iInc);
iterator operator + (intptr_t iInc) const;
iterator & operator -= (intptr_t iDec);
intptr_t operator - (const iterator &iter) const;
iterator operator - (intptr_t iDec) const;
gcstring & operator [] (intptr_t iIndex) const;
GCBASE_API
friend iterator operator + (intptr_t iInc, const iterator &iter);
};
// Ctor / Dtor
// ---------------------------------------------------------------------------
public:
gcstring_vector(void);
explicit gcstring_vector(size_t uiSize, const gcstring &str = gcstring());
gcstring_vector(const gcstring_vector &obj);
virtual ~gcstring_vector(void);
// Element access
// ---------------------------------------------------------------------------
public:
virtual void assign(size_t n, const gcstring &val);
virtual void clear(void);
virtual iterator erase(iterator pos);
virtual gcstring & at(size_t uiIndex);
virtual const gcstring & at(size_t uiIndex) const;
virtual gcstring & back(void);
virtual const gcstring & back(void) const;
virtual iterator begin(void);
virtual const_iterator begin(void) const;
virtual size_t capacity(void) const;
virtual iterator end(void);
virtual const_iterator end(void) const;
virtual gcstring & front(void);
virtual const gcstring & front(void) const;
virtual size_t max_size(void) const;
virtual size_t size(void) const;
virtual iterator insert(iterator pos, const gcstring &str);
virtual bool empty(void) const;
virtual void pop_back(void);
virtual void push_back(const gcstring &str);
virtual void resize(size_t uiSize, const gcstring &str = gcstring());
virtual void reserve(size_t uiSize);
// Do not use the methods below - they only exist for
// backwards compatibility
virtual gcstring_vector & assign(const gcstring_vector &obj);
virtual void erase(size_t uiIndex);
virtual void insert(size_t uiIndex, const gcstring &str);
// Operators
// ---------------------------------------------------------------------------
public:
gcstring_vector & operator = (const gcstring_vector &obj);
gcstring & operator [] (size_t uiIndex);
const gcstring & operator [] (size_t uiIndex) const;
void operator delete (void *pWhere);
void * operator new (size_t uiSize);
// Member
// ---------------------------------------------------------------------------
private:
void * _pv;
};
}
#else
# error No known support for shared libraries
#endif
#pragma pack(pop)
#endif // GENICAM_GCSTRINGLIST_H

@ -0,0 +1,324 @@
//-----------------------------------------------------------------------------
// (c) 2006 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Hartmut Nebelung
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief Definition of Lock classes
\ingroup Base_PublicUtilities
*/
#ifndef GENAPI_GCSYNCH_H
#define GENAPI_GCSYNCH_H
#include <Base/GCTypes.h>
#include <Base/GCException.h>
#if defined (_WIN32)
# include <windows.h>
# include <winbase.h>
#elif defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__))
# include <semaphore.h>
# include <pthread.h>
# include <errno.h>
# include <list>
#elif defined(VXWORKS)
#include <vxworks.h>
#include <taskLib.h>
#else
# error No/unknown platform thread support
#endif
namespace GENICAM_NAMESPACE
{
//-----------------------------------------------------------------
// CLock
//-----------------------------------------------------------------
/**
\brief A lock class
\ingroup Base_PublicUtilities
*/
class GCBASE_API CLock
{
public:
//! Constructor
CLock();
//! Destructor
~CLock();
//! tries to enter the critical section; returns true if successful
bool TryLock();
//! enters the critical section (may block)
void Lock();
//! leaves the critical section
void Unlock();
private:
//! no copy constructor
CLock( const CLock& );
//! no assignment operator
CLock& operator=( const CLock& );
protected:
#if defined (_WIN32)
//! The critical section object
CRITICAL_SECTION m_csObject;
#elif defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__))
//! the mutex object
pthread_mutex_t m_mtxObject;
#elif defined(VXWORKS)
SEM_ID m_sem;
#else
# error No/unknown platform thread support
#endif
};
//! This class is for testing purposes only. It should not be used for
//! client code because it exists only for Windows but not for Linux
//! since it uses internal data structures of a Win32 object
class GCBASE_API CLockEx : public CLock
{
public:
# if defined (_WIN32)
//! Gives access to internal data member for test and purposes
int64_t GetLockCount();
//! Gives access to internal data member for test and purposes
int64_t GetRecursionCount();
# elif defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__) || defined(VXWORKS))
// nothing implemented for Unix
# else
# error No/unknown platform support
# endif
private:
//! no copy constructor
CLockEx( const CLockEx& );
//! no assignment operator
CLockEx& operator=( const CLockEx& );
};
//-----------------------------------------------------------------
// AutoLock
//-----------------------------------------------------------------
class AutoLock
{
CLock& m_Lock;
public:
AutoLock(CLock& lock)
: m_Lock(lock)
{
m_Lock.Lock();
}
~AutoLock()
{
m_Lock.Unlock();
}
private:
AutoLock& operator=(const AutoLock&);
AutoLock(const AutoLock&);
};
//-----------------------------------------------------------------
// template LockableObject<Object,ThreadingModel>
//-----------------------------------------------------------------
/**
\brief Instance-Lock for an object
\ingroup Base_PublicUtilities
*/
template< class Object>
class LockableObject
{
public:
mutable CLock m_Lock;
class Lock;
friend class Lock;
/*! A scopelevel Lock class.
* Automatically acquires the lock when created and releases
* it when destroyed.
*/
class Lock
{
/// Reference to outer object
const LockableObject<Object> &m_Object;
public:
Lock( const LockableObject<Object>& obj) : m_Object(obj) {
m_Object.m_Lock.Lock();
}
~Lock(){
m_Object.m_Lock.Unlock();
}
private:
Lock& operator=( const Lock& );
};
/// Get a new lock
Lock GetLock() const
{
return Lock( *this );
}
};
/**
\brief Named global lock which can be used over process boundaries
\ingroup Base_PublicUtilities
*/
class GCBASE_API CGlobalLock
{
public:
//! Creates a global lock object name pszName.
//! In case an object with the same name already exists
//! a reference to the existing object will be created.
//! If pszName is NULL an unnamed object will be created.
explicit CGlobalLock(const char* pszName);
#if defined(_WIN32) && ! defined(PHARLAP_WIN32)
//! Creates a global lock object name pszName.
//! In case an object with the same name already exists
//! a reference to the existing object will be created.
//! If pszName is NULL an unnamed object will be created.
explicit CGlobalLock(const wchar_t* pszName);
#endif
//! Creates a global lock object name strName.
//! In case an object with the same name already exists
//! a reference to the existing object will be created.
//! If strName is empty an unnamed object will be created.
explicit CGlobalLock(const GENICAM_NAMESPACE::gcstring& strName);
~CGlobalLock();
public:
//! tests whether the lock is valid
bool IsValid(void) const;
//! enters the lock (may block)
bool Lock(unsigned int timeout_ms);
//! tries to enter the lock and returns immediately when not possible
bool TryLock(void);
//! leaves the lock
void Unlock(void);
#if defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__))
// creates a hashed name instead of the real name
void HashSemName(const GENICAM_NAMESPACE::gcstring& strName);
#endif
protected:
#if defined(_WIN32)
HANDLE m_handle;
#elif defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__))
GENICAM_NAMESPACE::gcstring m_semName;
sem_t* m_handle;
#elif VXWORKS
// There are no named locks on VxWorks. While we could use a single global lock, we
// will just rely on the caller to add their own locking in
#else
# error No/unknown platform thread support
#endif
// This is for debugging/assertions only
// the d'tor check whether this is 0 in debug builds
// in release builds this is always 0
mutable long m_DebugCount;
private:
// not copyable
CGlobalLock(const CGlobalLock&);
CGlobalLock& operator=(const CGlobalLock&);
};
/**
\brief unlocks the global lock object on destruction
This is for automatic UNLOCKING only.
We can't do automatic locking here since there is no returnvalue for contructors
\ingroup Base_PublicUtilities
*/
//-----------------------------------------------------------------
// unlocks the global lock object on destruction
// this is for automatic UNLOCKING only.
// we can't do automatic locking here since we don't get a returnvalue from the c'tor
//-----------------------------------------------------------------
class GCBASE_API CGlobalLockUnlocker
{
protected:
CGlobalLock& m_Lock;
bool m_enabled;
public:
CGlobalLockUnlocker(CGlobalLock& lock)
: m_Lock(lock)
, m_enabled(true) // this allows the auto unlock to be turned off for messy code structures
{
// explicitly don't lock the object here since we want to do this manually and handle the return value properly
}
~CGlobalLockUnlocker()
{
UnlockEarly();
}
//! This function allows to unlock the object early before the object is destroyed
void UnlockEarly(void)
{
if (m_enabled)
{
m_enabled = false;
m_Lock.Unlock();
}
}
private:
CGlobalLockUnlocker& operator=(const CGlobalLockUnlocker&);
CGlobalLockUnlocker(const CGlobalLockUnlocker&);
};
} // namespace GenICam
#endif // GENAPI_GCSYNCH_H

@ -0,0 +1,287 @@
/****************************************************************************
(c) 2004 by Basler Vision Technologies
(c) 2005 STEMMER IMAGING
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
****************************************************************************/
/// \file
/// \brief Platform-dependent type definitions
/// \ingroup Base_PublicUtilities
#ifndef GENICAM_TYPES_H
#define GENICAM_TYPES_H
#include <Base/GCNamespace.h>
// Make sure WIN32 is defined if the toolchain does not already do it.
#if defined (_WIN32) && !defined(WIN32)
# define WIN32
#endif
#if !defined (_WIN32)
# ifndef __STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS
# endif
# ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
# endif
# include <stddef.h>
#ifndef VXWORKS
# include <inttypes.h>
#endif
# include <stdint.h>
#elif defined (_WIN32)
//! \addtogroup Base_PublicUtilities
//! \{
// tag to perform 64 compatibility warnings checks on a type
# if !defined(GC_W64)
# if defined(_M_IX86) && _MSC_VER >= 1300
# define GC_W64 __w64
# else
# define GC_W64
# endif
# endif
# if defined(_MSC_VER) && _MSC_VER >= 1600
// VS2010 provides stdint.h
# include <stdint.h>
# else
# ifndef _STDINT // only define if not already done
//! makes int 8 portable across different platforms
typedef char int8_t;
//! makes unsigned char portable across different platforms
typedef unsigned char uint8_t;
//! makes short portable across different platforms
typedef short int16_t;
//! makes unsigned short portable across different platforms
typedef unsigned short uint16_t;
//! makes __int32 portable across different platforms
typedef __int32 int32_t;
//! makes unsigned int32 portable across different platforms
typedef unsigned __int32 uint32_t;
//! makes int64 portable across different platforms
typedef __int64 int64_t;
//! makes unsigned int64 portable across different platforms
typedef unsigned __int64 uint64_t;
# endif // _STDINT
# endif // _MSC_VER >= 1600
// Deprecated, use int8_t instead
// typedef char char8_t;
// Deprecated, use uint8_t instead
// typedef unsigned char uchar8_t;
//! use a universal platform dependent int
typedef __int64 int_t;
//! use a universal platform dependent unsigned int
typedef unsigned __int64 uint_t;
# ifndef _SIZE_T_DEFINED
# ifdef _WIN64
//! use a universal platform dependent unsigned int
typedef unsigned __int64 size_t;
# else
//! use a universal platform dependent unsigned int
typedef GC_W64 unsigned int size_t;
# endif
# define _SIZE_T_DEFINED
# endif
# ifndef _INTPTR_T_DEFINED
# ifdef _WIN64
//! use a universal platform dependent intptr_t
typedef __int64 intptr_t;
# else
//! use a universal platform dependent intptr_t
typedef GC_W64 int intptr_t;
# endif
# define _INTPTR_T_DEFINED
# endif
# ifndef _UINTPTR_T_DEFINED
# ifdef _WIN64
//! use a universal platform dependent uintptr_t
typedef unsigned __int64 uintptr_t;
# else
//! use a universal platform dependent intptr_t
typedef GC_W64 unsigned int uintptr_t;
# endif
# define _UINTPTR_T_DEFINED
# endif
#else
# error No platform-specific type definitions
#endif /* __unix__ */
// \}
#ifndef GC_INT64_MAX
#ifdef INT64_MAX
# define GC_INT64_MAX INT64_MAX
#else
# define GC_INT64_MAX static_cast<int64_t>(0x7fffffffffffffffLL) /* maximum signed int64 value */
#endif
#endif // GC_INT64_MAX
#ifndef GC_INT64_MIN
#ifdef INT64_MIN
# define GC_INT64_MIN INT64_MIN
#else
# define GC_INT64_MIN static_cast<int64_t>(0x8000000000000000LL) /* minimum signed int64 value */
#endif
#endif // GC_INT64_MIN
#ifndef GC_UINT64_MAX
#ifdef UINT64_MAX
# define GC_UINT64_MAX UINT64_MAX
#else
# define GC_UINT64_MAX static_cast<uint64_t>(0xffffffffffffffffULL) /* maximum unsigned int64 value */
#endif
#endif // GC_UINT64_MAX
#ifndef GC_INT32_MAX
#ifdef INT32_MAX
# define GC_INT32_MAX INT32_MAX
#else
# define GC_INT32_MAX static_cast<int64_t>(0x000000007fffffffLL) /* maximum signed int32 value */
#endif
#endif // GC_INT32_MAX
#ifndef GC_INT32_MIN
#ifdef INT32_MIN
# define GC_INT32_MIN INT32_MIN
#else
# define GC_INT32_MIN static_cast<int64_t>(0xffffffff80000000LL) /* minimum signed int32 value */
#endif
#endif // GC_INT32_MIN
#ifndef GC_UINT32_MAX
#ifdef UINT32_MAX
# define GC_UINT32_MAX UINT32_MAX
#else
# define GC_UINT32_MAX static_cast<uint64_t>(0x00000000ffffffffULL) /* maximum unsigned int32 value */
#endif
#endif // GC_UINT32_MAX
#ifndef GC_INT8_MAX
#ifdef INT8_MAX
# define GC_INT8_MAX INT8_MAX
#else
# define GC_INT8_MAX static_cast<int64_t>(0x000000000000007fLL) /* maximum signed int8 value */
#endif
#endif // GC_INT8_MAX
#ifndef GC_INT8_MIN
#ifdef INT8_MIN
# define GC_INT8_MIN INT8_MIN
#else
# define GC_INT8_MIN static_cast<int64_t>(0xffffffffffffff80LL) /* minimum signed int8 value */
#endif
#endif // GC_INT8_MIN
#ifndef GC_UINT8_MAX
#ifdef UINT8_MAX
# define GC_UINT8_MAX UINT8_MAX
#else
# define GC_UINT8_MAX static_cast<uint64_t>(0x00000000000000ffULL) /* maximum unsigned int8 value */
#endif
#endif // GC_UINT8_MAX
//! \addtogroup Base_PublicUtilities
//! \{
// Utility Types
// Deprecated, use const uint8_t* instead
// typedef const char * pcchar8_t;
// Deprecated, use uint8_t* instead
// typedef char * pchar8_t;
//! 32 bit floating point
typedef float float32_t;
//! 64 bit floating point
typedef double float64_t;
//! \}
// gc base import/export
#if defined(_MSC_VER)
# ifdef GCBASE_EXPORTS
# define GCBASE_API __declspec( dllexport )
# define GCBASE_RTTI_CLASS_API __declspec( dllexport )
# else
# define GCBASE_API __declspec( dllimport )
# define GCBASE_RTTI_CLASS_API __declspec( dllimport )
# endif
#elif defined (__GNUC__)
# ifdef GCBASE_EXPORTS
# define GCBASE_API __attribute__((visibility("default")))
# define GCBASE_RTTI_CLASS_API __attribute__((visibility("default")))
# else
# define GCBASE_API
// Classes that need RTTI info across library boundaries (like Exception classes)
// need to always use default visibility, even when symbols are being imported.
# define GCBASE_RTTI_CLASS_API __attribute__((visibility("default")))
# endif
#else
# error Unsupported compiler or platform
#endif
namespace GENICAM_NAMESPACE
{
//! version
struct GCBASE_API Version_t
{
uint16_t Major; //!> a is incompatible with b if a != b
uint16_t Minor; //!> a is incompatible b a > b
uint16_t SubMinor; //!> a is aways compatible with b
};
}
using GenICam::Version_t;
// mark a variable as unused. This prevents unused parameter/ unused local variable warnings on warning level 4.
#if defined(_MSC_VER)
# define GC_UNUSED(unused_var) (void)(unused_var)
#elif defined(__GNUC__)
# define GC_UNUSED(unused_var) // no changes to unused params with GCC
#else
# error Unsupported compiler or platform
#endif
#endif // GENICAM_TYPES_H

@ -0,0 +1,230 @@
//-----------------------------------------------------------------------------
// (c) 2005 by Basler Vision Technologies
// Section: Vision Components
// Project: GenICam
// Author: Fritz Dierks
// $Header$
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief GenICam common utilities
\ingroup Base_PublicUtilities
*/
#ifndef GENAPI_GENAPIUTILITIES_DEF_H_
#define GENAPI_GENAPIUTILITIES_DEF_H_
#if defined (_WIN32)
# include <windows.h>
#endif
#include <GenICamVersion.h>
#include <Base/GCTypes.h>
#include <Base/GCString.h>
#include <Base/GCStringVector.h>
#include <Base/GCException.h>
#include <Base/GCLinkage.h>
#if defined(UNDER_RTSS)
#include <Base/GCRTSSUtilities.h>
#endif // defined(UNDER_RTSS)
#if defined(UNDER_RTSS)
#define USE_TEMP_CACHE_FILE 0
#else
#define USE_TEMP_CACHE_FILE 1
#endif // defined(UNDER_RTSS)
#if defined(UNDER_RTSS)
#define USE_TEMP_CACHE_FILE 0
#else
#define USE_TEMP_CACHE_FILE 1
#endif // defined(UNDER_RTSS)
#if defined (_MSC_VER)
# if defined (_WIN64)
# define PLATFORM_NAME "Win64_x64"
# else
# define PLATFORM_NAME "Win32_i86"
# endif
#elif defined (__GNUC__)
# define GENICAM_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
# if defined (__LP64__)
# if defined (__linux__)
# define PLATFORM_NAME "Linux64_x64"
# elif defined (__APPLE__)
# define PLATFORM_NAME "Maci64_x64"
# else
# error Unknown Platform
# endif
# else
# if defined (__linux__)
# define PLATFORM_NAME "Linux32_i86"
# elif defined (__APPLE__)
# error Unsupported Platform
# elif defined (VXWORKS)
# define PLATFORM_NAME "VxWorks_PPC"
# else
# error Unknown Platform
# endif
# endif
#else
# error Unknown Platform
#endif
#ifndef GC_COUNTOF
# define GC_COUNTOF(arr) (sizeof (arr) / sizeof (arr)[0] )
#endif
namespace GENICAM_NAMESPACE
{
//! This verifies at runtime if there was no loss of data if an type Ts (e.g. int64t) was downcast
//! to type Td (e.g. int32_t)
template<typename Td, typename Ts>
inline Td INTEGRAL_CAST2( Ts s )
{
const Td d = static_cast<Td>( s );
if ( static_cast<Ts>( d ) != s ){
throw RUNTIME_EXCEPTION("INTEGRAL_CAST failed");
}
return d;
}
//! This verifies at runtime if there was no loss of data if an int64_t was downcast
//! to type T (e.g. int32_t)
template<typename T>
inline T INTEGRAL_CAST( int64_t ll )
{
return INTEGRAL_CAST2<T, int64_t>( ll );
}
//! Returns true if an environment variable exists
GCBASE_API bool DoesEnvironmentVariableExist( const gcstring &VariableName );
//! Retrieve the value of an environment variable
//! \throw runtime_exception if not found
GCBASE_API gcstring GetValueOfEnvironmentVariable( const gcstring &VariableName );
//! Retrieve the value of an environment variable
//! \return true if environment variable was found, otherwise false
GCBASE_API bool GetValueOfEnvironmentVariable(const gcstring &VariableName, gcstring &VariableContent );
#if defined(UNDER_RTSS)
//! Returns true if a file exists
GCBASE_API bool DoesFileExist( const gcstring &FilePath );
#endif // defined(UNDER_RTSS)
//! Converts \ to / and replaces all unsave characters by their %xx equivalent
//! \ingroup Base_PublicUtilities
GCBASE_API gcstring UrlEncode(const GENICAM_NAMESPACE::gcstring& Input);
//! Replaces %xx escapes by their char equivalent
//! \ingroup Base_PublicUtilities
GCBASE_API GENICAM_NAMESPACE::gcstring UrlDecode(const GENICAM_NAMESPACE::gcstring& Input);
//! Replaces $(ENVIRONMENT_VARIABLES) in a string and replace ' ' with %20
//! \ingroup Base_PublicUtilities
GCBASE_API void ReplaceEnvironmentVariables(gcstring &Buffer, bool ReplaceBlankBy20 = false);
//! Retrieve the path of the GenICam cache folder
/*! The path to the cache folder can be stored by calling SetGenICamCacheFolder().
If GetGenICamCacheFolder() is called before SetGenICamCacheFolder(), it will return
the value of environment variable GENICAM_CACHE_Vx_y. If this environment variable does
not exist, an exception will be thrown.
*/
GCBASE_API gcstring GetGenICamCacheFolder(void);
//! Retrieve the path of the GenICam logging properties file
/*! The path to the logging properties file can be stored by calling SetGenICamLogConfig().
If GetGenICamLogConfig() is called before SetGenICamLogConfig(), it will return
the value of environment variable GENICAM_LOG_CONFIG_Vx_y. If this environment variable does
not exist, an exception will be thrown.
*/
GCBASE_API gcstring GetGenICamLogConfig(void);
//! Retrieve the path of the CLProtocol folder
/*! The path to the CLProtocol folder can be stored by calling SetGenICamCLProtocolFolder().
If GetGenICamCLProtocolFolder() is called before SetGenICamCLProtocolFolder(), it will return
the value of environment variable GENICAM_CLPROTOCOL. If this environment variable does
not exist, an exception will be thrown.
*/
GCBASE_API gcstring GetGenICamCLProtocolFolder(void);
//! Stores the path of the GenICam cache folder
GCBASE_API void SetGenICamCacheFolder(const gcstring& path);
//! Stores the path of the GenICam logging properties file
GCBASE_API void SetGenICamLogConfig(const gcstring& path);
//! Stores the path of the CLProtocol folder
GCBASE_API void SetGenICamCLProtocolFolder(const gcstring& path);
//! splits str input string into a list of tokens using the delimiter
GCBASE_API void Tokenize(
const gcstring& str, //!< string to be split
gcstring_vector& tokens, //!< result of the splitting operation
const gcstring& delimiters = " " //!< delimiters for the splitting
);
//! Gets a list of files or directories matching a given FileTemplate
GCBASE_API void GetFiles(
const gcstring &FileTemplate, //!> The file template. Can contain environment variables.
gcstring_vector &FileNames, //!> A list of files matching the file template
const bool DirectoriesOnly = false ); //!> true = only subdirectories (ex . and ..) are retrieved; false = only files are retrieved
//! Gets the full path to the module (DLL/SO) containing the given \a pFunction; empty string if not found.
GCBASE_API gcstring GetModulePathFromFunction(void *pFunction);
}
#define GENICAM_UNUSED(unused_var) ((void)(unused_var))
#if !defined(GENICAM_DEPRECATED)
# if defined(__GNUC__) && (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 1) // is at least GCC 3.1 compiler?
# define GENICAM_DEPRECATED(FUNCTION) FUNCTION __attribute__ ((deprecated))
# elif defined(_MSC_VER) && (_MSC_VER >= 1300) // is at least VC 2003 compiler?
# define GENICAM_DEPRECATED(FUNCTION) __declspec(deprecated) FUNCTION
# else
# define GENICAM_DEPRECATED(FUNCTION) FUNCTION
# endif // compiler check
#endif // #if !defined(GENICAM_DEPRECATED)
///////////////////////////////////////////////////////////////////////////////
//
// Useful to create pragma message output reconized by VisualStudio
//
// Usage:
// #pragma message ( __ERR__ "Invalid DLL ABI" )
//
///////////////////////////////////////////////////////////////////////////////
// Message formater
#define _TO_STRING( __stN ) #__stN
#define EXPAND_TO_STRINGISE( __stN ) _TO_STRING( __stN )
#define __LINE_STR__ EXPAND_TO_STRINGISE(__LINE__)
#define __LOCATION__ __FILE__ "(" __LINE_STR__ ")"
#define __OUTPUT_FORMATER__(_type) __LOCATION__ " : " _type " : "
// Message types
#define __WARN__ __OUTPUT_FORMATER__("WARNING")
#define __ERR__ __OUTPUT_FORMATER__("ERROR")
#define __TODO__ __OUTPUT_FORMATER__("TBD")
#endif // GENAPI_GENAPIUTILITIES_DEF_H_

@ -0,0 +1,149 @@
//-----------------------------------------------------------------------------
// (c) 2009 by DALSA
// Section: Digital Imaging
// Project: CLProtocol
// Author: Eric Bourbonnais
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief C++ class wrapping CLSerialAll
*/
#ifndef CLPROTOCOL_CLALLADAPTER_H
#define CLPROTOCOL_CLALLADAPTER_H
#include <Base/GCBase.h>
#include <CLProtocol/CLAllSerial.h>
#include <CLProtocol/CLException.h>
#include <CLProtocol/CLProtocol.h>
#include <CLProtocol/ISerialAdapter.h>
#include <map>
namespace CLProtocol
{
//! A map holding the pointers to the serial adapters
typedef std::map<GENICAM_NAMESPACE::gcstring, ISerialAdapter *> SerialPortMap;
//! Wraps the CLAllSerial.dll
class CLPROTOCOL_DECL CCLAllAdapter : public ISerialAdapter
{
public:
//! Destroy the factory and all its objects
static void Destroy( ISerialAdapter * pAdapter );
//! \name ISerialAdapter interface
//@{
virtual CLINT32 CLPROTOCOL clSerialRead( CLINT8*,CLUINT32*, CLUINT32);
virtual CLINT32 CLPROTOCOL clSerialWrite(CLINT8 *,CLUINT32 *,CLUINT32);
virtual CLINT32 CLPROTOCOL clGetSupportedBaudRates(CLUINT32 *);
virtual CLINT32 CLPROTOCOL clSetBaudRate(CLUINT32);
virtual CLINT32 SerialInit( void);
virtual void SerialClose( void);
virtual void CheckError( CLINT32 ErrorCode );
//@}
//! used to copy the content of the SerialPort ma to a std::map
static void GetPortIDs(GENICAM_NAMESPACE::gcstring_vector &TheVector);
//! used to copy the content of the SerialPort ma to a std::map
static ISerialAdapter *GetSerialAdapter(GENICAM_NAMESPACE::gcstring PortID);
private:
/*------------------------------------------------*/
// functions of the CLAllSerial DLL
/*------------------------------------------------*/
struct CLAllProxy
{
//! Function pointer to clGetErrorText
CLINT32 (CLALLSERIALCC *m_clGetErrorText)( const CLINT8*, CLINT32, CLINT8*, CLUINT32*);
//! Function pointer to clGetNumPorts
CLINT32 (CLALLSERIALCC *m_clGetNumPorts) ( CLUINT32* Ports);
//! Function pointer to clGetPortInfo
CLINT32 (CLALLSERIALCC *m_clGetPortInfo ) ( CLUINT32 serialIndex, CLINT8* manufacturerName, CLUINT32* nameBytes, CLINT8* portID, CLUINT32* IDBytes, CLUINT32* version);
//! Function pointer to clGetSupportedBaudRates
CLINT32 (CLALLSERIALCC *m_clGetSupportedBaudRates) ( hSerRef serialRef, CLUINT32* baudRates);
//! Function pointer to clSerialClose
void (CLALLSERIALCC *m_clSerialClose) ( hSerRef serialRef);
//! Function pointer to clSerialInit
CLINT32 (CLALLSERIALCC *m_clSerialInit) ( CLUINT32 serialIndex, hSerRef* serialRefPtr);
//! Function pointer to clSerialRead
CLINT32 (CLALLSERIALCC *m_clSerialRead) ( hSerRef serialRef, CLINT8* buffer, CLUINT32* bufferSize, CLUINT32 serialTimeout);
//! Function pointer to clSerialWrite
CLINT32 (CLALLSERIALCC *m_clSerialWrite) ( hSerRef serialRef, CLINT8* buffer, CLUINT32* bufferSize, CLUINT32 serialTimeout);
//! Function pointer to clSetBaudRate
CLINT32 (CLALLSERIALCC *m_clSetBaudRate) ( hSerRef serialRef, CLUINT32 baudRate);
};
static void CheckError( CLINT32 ErrorCode, CLUINT32 SerialIndex, CLAllProxy & );
//! Object constructor
CCLAllAdapter( CLUINT32, CLAllProxy &);
//! Object destructor
virtual ~CCLAllAdapter();
//! handle of the serial port
hSerRef m_SerialRef;
#ifdef _DEBUG // Allow changing serial index to test error situations.
public:
#endif
//! Index of the serial port
CLUINT32 m_SerialIndex;
private:
//! retrieves the list of port mapped by PortID
static void InternalGetPortMap(SerialPortMap &);
static SerialPortMap *g_pSerialPortMap;
//! handle to the loaded ClAllSerial DLL
HMODULE m_ClAlldllHandle;
//! CLALL functions pointers
CLAllProxy m_clallproxy;
//! the previous baud rate as set via SetBaudRate; zero otherwise
CLUINT32 m_PreviousBaudRate;
};
//! retrieves the list of port mapped by PortID
inline void GetPortMap(SerialPortMap &StdMap)
{
GENICAM_NAMESPACE::gcstring_vector PortIDs;
CCLAllAdapter::GetPortIDs(PortIDs);
for (GENICAM_NAMESPACE::gcstring_vector::iterator it = PortIDs.begin(); it != PortIDs.end(); it++)
{
StdMap[*it] = CCLAllAdapter::GetSerialAdapter(*it);
}
};
inline void Destroy(SerialPortMap &portList)
{
for (SerialPortMap::iterator it = portList.begin(); it != portList.end(); it++)
CCLAllAdapter::Destroy(it->second);
}
}
#endif //CLPROTOCOL_CLALLADAPTER_H

@ -0,0 +1,104 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief C++ class wrapping CLSerialAll and CLProtocolDriver
*/
#ifndef CLPROTOCOL_CLAUTOBUFFER_H
#define CLPROTOCOL_CLAUTOBUFFER_H
namespace CLProtocol
{
/*! \internal
\brief Simple helper class to manage automatic deletion of arrays to provide exception safety see std:auto_ptr but works only with arrays mainly used for strings. Do not use directly
*/
template<class T>
class CLAutoBuffer
{
public:
explicit CLAutoBuffer(T* p = NULL)
: m_p(p)
{
}
CLAutoBuffer(CLAutoBuffer<T>& rhs)
: m_p(rhs.Release())
{
}
~CLAutoBuffer()
{
DeleteSafe();
}
CLAutoBuffer<T>& operator= (T* p)
{
if (m_p != p)
{
DeleteSafe();
m_p = p;
}
return *this;
}
CLAutoBuffer<T>& operator= (CLAutoBuffer<T>& rhs)
{
if (m_p != rhs.m_p)
{
DeleteSafe();
m_p = rhs.Release();
}
return *this;
}
T* operator->() const
{
return m_p;
}
T* Get() const
{
return m_p;
}
T* Release()
{
T* p(m_p);
m_p = NULL;
return p;
}
private:
void DeleteSafe()
{
if (m_p != NULL)
{
delete[] m_p;
m_p = NULL;
}
}
T* m_p; // the wrapped object pointer
};
}
#endif // CLPROTOCOL_CLAUTOBUFFER_H

@ -0,0 +1,70 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief CLProtocol exception type
*/
#ifndef CLPROTOCOL_CLEXCEPTION_H
#define CLPROTOCOL_CLEXCEPTION_H
#include <Base\GCBase.h>
#include <CLProtocol\CLProtocol.h>
namespace CLProtocol
{
//! CL Serial Exception type to hold the CL_ERR-code
class CLErrException : public GENICAM_NAMESPACE::GenericException
{
public:
// must have this c'tor signature to use the ExceptionReporter
CLErrException(const char* description, const char *pSourceFileName, int SourceLine, const char* pExceptionType)
: GENICAM_NAMESPACE::GenericException(description, pSourceFileName, SourceLine, pExceptionType)
, m_CLCode(CL_ERR_NO_ERR)
{
}
public:
CLINT32 GetCLErrorCode() const
{
return m_CLCode;
}
CLErrException& SetCLErrorCode(CLINT32 errorCode)
{
m_CLCode = errorCode;
return *this;
}
protected:
CLINT32 m_CLCode;
};
#if !defined(CL_ERR_EXCEPTION)
# define CLERR_EXCEPTION GENICAM_NAMESPACE::ExceptionReporter<CLProtocol::CLErrException>(__FILE__, __LINE__, "CLErrException" ).Report
#endif
}
#endif // CLPROTOCOL_CLEXCEPTION_H

@ -0,0 +1,423 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief C++ class wrapping CLSerialAll and CLProtocolDriver
*/
#ifndef CLPROTOCOL_CLPORT_H
#define CLPROTOCOL_CLPORT_H
#include <Base\GCBase.h>
#include <GenApi\PortImpl.h>
#include <CLProtocol\CLException.h>
#include <CLProtocol\CLAutoBuffer.h>
#include <CLProtocol\CLProtocol.h>
#include <CLProtocol\ISerial.h>
#include <CLProtocol\ISerialAdapter.h>
#include <CLProtocol\CLAllAdapter.h>
#include <CLProtocol\DeviceID.h>
#include <CLProtocol\CVersion.h>
#include <CLProtocol\XMLID.h>
#include <iostream>
#include <fstream>
#include <list>
#include <algorithm>
namespace CLProtocol
{
//! the magic GUID which indicates that the file is a CLProtocol registry file. Must be the first entry
# define CLPORT_PERSISTENCE_MAGIC "{3DFD485D-0ADB-4d84-9956-C3766504A2DD}"
#pragma warning (push )
#pragma warning( disable:4275) // warning C4275: non dll-interface class 'GenApi::CPortImpl' used as base for dll-interface class 'CLProtocol::CCLPort'
/*! \brief Wraps a CameraLink protocol DLL and implements the IPort and the ISerial interface
\ingroup PublicInterfaces
The class dynamically loads a protocol driver DLL and binds it to a given port.
It implements the IPort and the ISerial interface.
The class can enumerate
- the PortIDs of all frame grabbers installed in the system
- the DeviceID templates of all CLProtocol drivers installed in the system
The class can probe a port and retrieve the DeviceID of the attached camera.
The class can retrieve the GenApi XML file for a camera.
*/
class CLPROTOCOL_DECL CCLPort : public GENAPI_NAMESPACE::CPortImpl, public ISerial
{
public:
//! \name Device discovery and binding
//!@{
/*! \brief Retrieves a list of PortIDs which can be used to create a corresponding port object
\param[out] PortIDs A list of PortIDs which each has the form 'ManufacturerName#PortName'
*/
static void GetPortIDs( GENAPI_NAMESPACE::StringList_t &PortIDs );
/*! \brief Gets a SerialAdapter port
\param[in] PortID PortID of the serial port
\return ISerialAdapter interface belonging to the PortID; NULL if PortID is not valid
*/
static ISerialAdapter *GetPort( const GENICAM_NAMESPACE::gcstring &PortID );
/*! \brief Retrieves a list of \ref DeviceID templates
Retrieves all DLLs found in the subdirectories of $(GENICAM_CLPROTOCOL),
loads the dlls, asks them for their supported DeviceIDTemplates, and returns a
list of the combined DeviceIDTemplate strings of all dlls.
\param[out] DeviceIDTemplates A list of DeviceID templates
*/
static void GetDeviceIDTemplates( GENICAM_NAMESPACE::gcstring_vector &DeviceIDTemplates );
/*! \brief Connects a camera and retrieves all information required for the DeviceID
Connects the camera with 9600 Baud (= CL standard baud rate after power up) and
identifies the camera attached to the port given by PortID. The DeviceIDTemplate
helps with the identification whose result is returned as DeviceID.
\param[in] PortID Identifies the port the camera to be probed is connected to
\param[in] strDeviceIDTemplate The \ref DeviceID templates helping the protocol driver dll to identify the camera
\param[in] SerialTimeout The timeout in milliseconds when probing the port (see \ref SetSerialTimeOut).
\return A \ref DeviceID containing a unique description of the camera found. If the DeviceID is an empty string no device was found.
*/
static GENICAM_NAMESPACE::gcstring ProbeDevice( const GENICAM_NAMESPACE::gcstring &PortID, const GENICAM_NAMESPACE::gcstring &strDeviceIDTemplate, const CLUINT32 SerialTimeout = 500);
/*! \brief Register a custom serial port
\param[in] PortName Identifies the port to use for connection.
\param[in] pSerialAdapter An interface that allow CCLPort to access the serial port.
\return PortID a portId of the form "Local#<PortName>"
*/
static GENICAM_NAMESPACE::gcstring RegisterSerial( const GENICAM_NAMESPACE::gcstring &PortName, ISerialAdapter *pSerialAdapter);
//! Unregister all resource related to serial port
static void UnRegisterSerials( );
//! Cleans up static variables
static void Terminate( );
/*! \brief Unregister serial serial port
\param[in] PortID Identifies the port that need to be disconnected
*/
static void UnRegisterSerial( const GENICAM_NAMESPACE::gcstring &PortID );
/*! \brief Creates a port object for a given PortID and DeviceID
\param[in] PortID Identifies the port to use for connection.
\param[in] strDeviceID Identifies the device to connect. Can be optionally a DeviceID template.
*/
void Connect( const GENICAM_NAMESPACE::gcstring &PortID, const GENICAM_NAMESPACE::gcstring &strDeviceID );
/*! \brief Creates a port object for a given PortID taking the DeviceID from a internal cache
\param[in] PortID Identifies the port to use for connection.
\return false, if the cache doesn't contain a DeviceID for the PortID;
true, if the cache contains a corresponding DeviceID and if a matching device is connected
Throws an exception if there is a cache entry but no matching device is connected
*/
bool Connect( const GENICAM_NAMESPACE::gcstring &PortID );
/*! \brief Retrieves a list of \ref XMLID strings
Retrieves a list of XML IDs from the file system and the CLProtocol.dll
which in turn may ask the camera, e.g. by reading a Manifest register
The list contains only XML ID which would match the DeviceID and
whose schema version can be interpreted by the current GenICam version.
The XML ID are order best matching first.
\param[out] XMLIDs A list of XML IDs templates
*/
void GetXMLIDs( GENICAM_NAMESPACE::gcstring_vector &XMLIDs );;
/*! \brief Retrieves an GenApi XML description either from the DLL or the file system
\param[in] XMLID The XML ID identifying the XML file whose data is to be received
\param[in] UseMaxBaudrate if true the baud rate is set to maximum while downloading the XML file and reset afterwards
\return GenApi compliant camera XML description code ready to instantiate a node map.
*/
GENICAM_NAMESPACE::gcstring GetXML( GENICAM_NAMESPACE::gcstring XMLID, const bool UseMaxBaudrate = true );
/*! \brief Delete the device xml file from the download folder if the file was downloaded for the camera.
This can be use to remove a corrupted file.
File can easily be corrupted if the download is aborted.
\param[in] XMLID The XML ID identifying the XML file whose data is to be received
*/
void DeleteXMLDownload( GENICAM_NAMESPACE::gcstring XMLID );
/*! \brief Retrieves the best matching GenApi XML description either from the DLL or the file system
\param[in] UseMaxBaudrate if true the baud rate is set to maximum while downloading the XML file and reset afterwards
\return GenApi compliant camera description code ready to instantiate a node map.
*/
GENICAM_NAMESPACE::gcstring GetXML( const bool UseMaxBaudrate = true );
/*! \brief Creates a file URL for a given XML ID
The URL has the following format: "file:///filepath.xml"
\return file URL to a XML file as described in the GenTL module
*/
GENICAM_NAMESPACE::gcstring MakeURLfromXMLID( GENICAM_NAMESPACE::gcstring &XMLID );
//!@}
//! \name Creation and parameterizing
//!@{
//! Public constructor
CCLPort();
//! Public destructor
virtual ~CCLPort();
//! Sets the timeout for operations on the serial port
/*!
\param[in] Timeout Timeout in [ms] for operations on the serial port.
*/
void SetSerialTimeOut(const CLUINT32 Timeout);
//! Gets the timeout for operations on the serial port
CLUINT32 GetSerialTimeOut() const;
//! Returns the Device ID the object has been created with
GENICAM_NAMESPACE::gcstring GetDeviceID() const;
//! Set device protocol log lever
void SetProtocolLogLevel( const CLP_LOG_LEVEL_VALUE logLever);
//! Set device bauderate using one of the CL_BAUDRATE_XXXX value.
void SetDeviceBauderate( const CLUINT32 baudrate);
//! Returns the current device bauderate, using one of the CL_BAUDRATE_XXXX value.
CLUINT32 GetDeviceBauderate( );
//! Sed supported bauderates of the combined device and host interface.
CLUINT32 SupportedBaudrates();
//! Set log level that is assigned to the device protocol when the dll is loaded.
static void SetDefaultLogLevel( const CLP_LOG_LEVEL_VALUE logLever);
//! Stores a PortID/DeviceID pair
static void StorePortIDDeviceIDPairs( GENICAM_NAMESPACE::gcstring_vector &PortIDs, GENICAM_NAMESPACE::gcstring_vector &DeviceIDs );
//! Retrieves a PortID/DeviceID pair
static void RetrievePortIDDeviceIDPairs( GENICAM_NAMESPACE::gcstring_vector &PortIDs, GENICAM_NAMESPACE::gcstring_vector &DeviceIDs );
//!@}
//! \name IPort interface
//@{
//! Get the access mode of the node
virtual GENAPI_NAMESPACE::EAccessMode GetAccessMode() const;
//! Reads a chunk of bytes from the port
virtual void Read(void * pBuffer, int64_t Address, int64_t Length);
//! Writes a chunk of bytes to the port
virtual void Write(const void * pBuffer, int64_t Address, int64_t Length);
//! We are an IPort interface
virtual GENAPI_NAMESPACE::EInterfaceType GetPrinicipalInterfaceType() const;
//@}
//! We can get event data
CLINT32 GetEvent(
void * buffer, //!< Points to a user-allocated buffer. Upon a successful call,
//!< buffer contains the data read from the serial device.
//!< Upon failure, this buffer is not affected.
//!< if buffersize is too small result is CL_ERR_BUFFER_TOO_SMALL.
CLUINT32 * bufferSize //!< input is the size of the buffer, output is the size of
//!< event data in buffer.
);
//! \name ISerial interface
//@{
//! calls clSerialRead as defined by the camera link standard
virtual CLINT32 CLPROTOCOL clSerialRead(
CLINT8* buffer, //!< Points to a user-allocated buffer. Upon a successful call,
//!< buffer contains the data read from the serial device.
//!< Upon failure, this buffer is not affected.
//!< Caller should ensure that buffer is at least numBytes in size.
CLUINT32* bufferSize, //!< This is the number of bytes requested by the caller.
CLUINT32 serialTimeOut //!< Indicates the timeout in milliseconds.
);
//! calls clSerialWrite as defined by the camera link standard
virtual CLINT32 CLPROTOCOL clSerialWrite(
CLINT8* buffer, //!< Contains data to write to the serial device.
CLUINT32* bufferSize, //!< Contains the buffer size indicating
//!< the number of bytes to be written.
//!< Upon a successful call, bufferSize contains the number of
//!< bytes written to the serial device.
CLUINT32 serialTimeOut //!< Indicates the timeout in milliseconds.
);
//! returns the valid baud rates of the current interface.
virtual CLINT32 CLPROTOCOL clGetSupportedBaudRates(
CLUINT32 *baudRates //!< Bitfield that describes all supported baud rates of the serial port
//!< as described by serialRefPtr. See Table B-2 of the Camera Link
//!< documentation for more information on constants.
);
//@}
private:
//! Initialize the PortID list
static void InitPortIDs(void);
//! This function sets the baud rate for the serial port of the selected device.
virtual CLINT32 CLPROTOCOL clSetBaudRate(
CLUINT32 baudRate //!< The baud rate you want to use. This parameter expects the
//!< values represented by the CL_BAUDRATE constants in table B-2.
//!< By default, the baud rate for serial communication is 9600.;
);
//! Helper retrieving error messages
void CheckError( CLINT32 ErrorCode ) const;
//! helper retrieving error messages
static void CheckLastError();
//! loads the protocol driver DLL
void LoadProtocolDriver( const GENICAM_NAMESPACE::gcstring &PortDriverDLLPath );
//! unloads the driver DLL
void UnLoadProtocolDriver( );
//! Creates a CLProtocol driver and connects it a a port identified by PortID
void CreatePort( const GENICAM_NAMESPACE::gcstring &PortID, const GENICAM_NAMESPACE::gcstring &PortDriverDLLPath );
//! updates the DeviceID cache
static void UpdateCache( const GENICAM_NAMESPACE::gcstring &PortID, const GENICAM_NAMESPACE::gcstring &DeviceID );
//! A proxy to the serial port used by the CCLPort object
ISerialAdapter *m_pSerialAdapter;
//! A list of all available proxies in the system
static SerialPortMap *s_pSerialList;
//! A list of all available proxies registers manually
static SerialPortMap *s_pPrivateSerialList;
//! indicates if s_pSerialList is initialized
static bool s_IsSerialListInitialized;
//! handle to the port driver DLL loaded
HMODULE m_hPortDriverDLL;
//! Timeout in [ms]
CLUINT32 m_SerialTimeOut;
//! the \ref DeviceID of the connected device
GENICAM_NAMESPACE::gcstring m_DeviceID;
//! the \ref PortID of the connected device
GENICAM_NAMESPACE::gcstring m_PortID;
//! Cookie
CLUINT32 m_Cookie;
/*------------------------------------------------*/
// functions of the CL protocol DLL
/*------------------------------------------------*/
//! Function pointer to clpInitLib
CLINT32 (__cdecl *m_clpInitLib)( clp_logger_t logger, CLP_LOG_LEVEL_VALUE logLevel);
//! Function pointer to clpCloseLib
CLINT32 (__cdecl *m_clpCloseLib)( void );
//! Function pointer to clpGetShortDeviceIDTemplates
CLINT32 (__cdecl *m_clpGetShortDeviceIDTemplates) (CLINT8* pDeviceTemplates, CLUINT32* pBufferSize );
//! Function pointer to clpProbeDevice
CLINT32 (__cdecl *m_clpProbeDevice) (ISerial *pSerial, const CLINT8* pDeviceIDTemplate, CLINT8* pDeviceID, CLUINT32 *pBufferSize, CLUINT32 *pCookie, const CLUINT32 TimeOut );
//! Function pointer to clpGetXMLIDs
CLINT32 (__cdecl *m_clpGetXMLIDs) ( ISerial *pSerial, const CLUINT32 Cookie ,CLINT8* pXMLIDs, CLUINT32* pBufferSize, const CLUINT32 TimeOut );
//! Function pointer to m_clpGetXMLDescription
CLINT32 (__cdecl *m_clpGetXMLDescription) (ISerial *pSerial, const CLUINT32 Cookie, const CLINT8* pDeviceID, CLINT8* pXMLBuffer, CLUINT32* pBufferSize, const CLUINT32 TimeOut );
//! Function pointer to clpReadRegister
CLINT32 (__cdecl *m_clpReadRegister) (ISerial *pSerial, const CLUINT32 Cookie, const CLINT64 Address, CLINT8* pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut );
//! Function pointer to clpWriteRegister
CLINT32 (__cdecl *m_clpWriteRegister) (ISerial *pSerial, const CLUINT32 Cookie, const CLINT64 Address, const CLINT8* pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut );
//! Function pointer to clpContinueWriteRegister
CLINT32 (__cdecl *m_clpContinueWriteRegister) (ISerial *pSerial, const CLUINT32 Cookie, const BOOL8 ContinueWaiting, const CLUINT32 TimeOut );
//! Function pointer to clpGetErrorText
CLINT32 (__cdecl *m_clpGetErrorText) (const CLINT32 errorCode, CLINT8* errorText, CLUINT32* errorTextSize, const CLUINT32 Cookie );
//! Function pointer to clpDisconnect
CLINT32 (__cdecl *m_clpDisconnect) (const CLUINT32 Cookie );
//! Function pointer to clpGetCLProtocolVersion
CLINT32 (__cdecl *m_clpGetCLProtocolVersion) (CLUINT32 *pVersionMajor, CLUINT32 *pVersionMinor );
//! Function pointer to clpGetParam
CLINT32 (__cdecl *m_clpGetParam) (ISerial *pSerial, CLP_PARAMS param, const CLUINT32 Cookie, const CLINT8* pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut);
//! Function pointer to clpSetParam
CLINT32 (__cdecl *m_clpSetParam) (ISerial *pSerial, CLP_PARAMS param, const CLUINT32 Cookie, const CLINT8* pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut);
//! Function pointer to clpIsParamSupported
CLINT32 (__cdecl *m_clpIsParamSupported) (CLP_PARAMS param);
//! Function pointer to clpgetEventData
CLINT32 (__cdecl *m_clpGetEventData) (const CLUINT32 Cookie, CLINT8* pBuffer, CLUINT32* pBufferSize);
// What 1.1 feature are supported by the device protocol?
//! true if you can set baud rate via the CLProtocol's function interface
bool m_protocolHasBaudratePrms;
//! true if you can set the log level
bool m_protocolHasLogLevelPrm;
//! true if you can set the logger
bool m_protocolHasLogggerPrm;
//! Default log level
static CLP_LOG_LEVEL_VALUE m_defaultloglevel;
private:
//! must not be used
CCLPort( CCLPort& );
//! must not be used
void operator=( CCLPort& );
};
#pragma warning(pop)
}
#endif // CLPROTOCOL_CLPORT_H

@ -0,0 +1,541 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief Exported C functions for camera link protocol drivers
*/
#ifndef CLPROTOCOL_CLPROTOCOL_H
#define CLPROTOCOL_CLPROTOCOL_H
#include <CLProtocol\CLSerialTypes.h>
//==============================================================================
// Macros
//==============================================================================
#if (defined(__cplusplus) || defined(__cplusplus__))
#define USER_EXTERN_C extern "C"
#define USER_EXTERN_C_START extern "C" {
#define USER_EXTERN_C_END }
#else
#define USER_EXTERN_C
#define USER_EXTERN_C_START
#define USER_EXTERN_C_END
#endif
#ifdef CLPROTOCOL_EXPORTS
# define CLPROTOCOLEXPORT USER_EXTERN_C __declspec(dllexport)
# define CLPROTOCOL_DECL __declspec(dllexport)
#else
# define CLPROTOCOLEXPORT USER_EXTERN_C __declspec(dllimport)
# define CLPROTOCOL_DECL __declspec(dllimport)
#endif
#ifndef CLPROTOCOL
#define CLPROTOCOL __cdecl
#endif
//==============================================================================
// Types and Enums
//==============================================================================
typedef void (CLPROTOCOL *clp_logger_t)( CLINT32 level, const char* stringFormat, va_list argptr);
USER_EXTERN_C_START
typedef struct clpLogCallback_t
{
CLUINT32 id; //! Must be set to 0xeb6e1ca9
clp_logger_t logger; //! The address of the logging function
}clpLogCallback_t;
USER_EXTERN_C_END
//! Types of parameters to be accessed by clpGetParam/clpSetParam
enum CLP_PARAMS
{
// Global parameters that do not use the Cookie when called.
CLP_LOG_LEVEL = 1, //! A 32-bit value that contains the current log level.
//! This parameter expects a value represented by the
//! CLP_LOG_LEVEL_VALUE constants.
CLP_LOG_CALLBACK = 2, //! A 32-bit value that contains a clpLogCallback_t pointer to the logger function.
// Device related parameters that require a valid cookie to execute properly.
CLP_DEVICE_BAUDERATE = -1, //! A 32-bit value that contains the baudrate used to communicate with the device.
//! This parameter expects a value represented by the
//! CL_BAUDRATE_XXX constants.
CLP_DEVICE_SUPPORTED_BAUDERATES = -2, //! A 32-bit value that contains the baudrates
//! supported by the device and the host.
//! This read only parameter return one or more value(s) represented by the
//! CL_BAUDRATE_XXX constants.
};
enum CLP_LOG_LEVEL_VALUE
{
CLP_LOG_FATAL = 0,
CLP_LOG_ALERT = 100,
CLP_LOG_CRIT = 200,
CLP_LOG_ERROR = 300,
CLP_LOG_WARN = 400,
CLP_LOG_NOTICE = 500,
CLP_LOG_INFO = 600,
CLP_LOG_DEBUG = 700,
CLP_LOG_NOTSET = 800
};
//==============================================================================
// Exported Functions
//==============================================================================
class ISerial;
/*! \ingroup PublicInterfaces */
/*@{*/
/*! \defgroup CLProtocolInterface CLProtocol C-Function Interface */
/*@{*/
/*!
\brief This function is call to initialize the library after it is loaded.
\param[in] logger A function pointer that contains a logging function.
\param[in] logLevel The log level default value. This argument expects a value represented
by the CLP_LOG_LEVEL_VALUE constants.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\return CL_ERR_INVALID_PTR The initialisation parameters are invalid.
\return CL_ERR_IN_USE The library is already open
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpInitLib( clp_logger_t logger,
CLP_LOG_LEVEL_VALUE logLevel);
/*!
\brief This function is call to close the library before unloading.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpCloseLib( void );
/*!
\brief This function returns a list of short device templates coded into a single string
Short device templates can have the following form:
- <CODE>"CameraManufacturer"</CODE>
- <CODE>"CameraManufacturer#CameraFamily"</CODE>
- <CODE>"CameraManufacturer#CameraFamily#CameraModel"</CODE>
As compared to the long version the protocol driver dll's directory and file name is missing at the beginning.
The device templates are separated by tabulators.
The whole list is contained in a NULL terminated string.
\param[out] pShortDeviceTemplates A pointer to a user-allocated buffer into which the function
copies the list of device template names.
\param[in,out] pBufferSize As an input, the value contains the size of the buffer that
is passed through the pShortDeviceTemplates parameter.
On successful return, this parameter contains the number of bytes written into the buffer,
including the NULL termination character.
On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write
the data text.
\return At completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_BUFFER_TOO_SMALL The pShortDeviceTemplates is too small
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetShortDeviceIDTemplates ( CLINT8* pShortDeviceTemplates, CLUINT32* pBufferSize );
/*!
\brief Connects and identifies the device and returns a DeviceID
This function connects to a device attached to the serial port and attempts to identify it using the DeviceID template as hint.
If the function is successful it returns a DeviceID as well as a Cookie. The DeviceID has the form:
<CODE>"CameraManufacturer#CameraFamily#CameraModel#Version.2.3.4#SerialNumber"</CODE>
The connection is made with 9600 baud which is the power up baud rate as defined by the CameraLink standard.
This function attempts to re-connect the device if a DeviceID is passed instead of a template as pDeviceIDTemplate.
\param[in] pSerial Pointer to the interface giving access to the serial port
\param[in] pDeviceIDTemplate A pointer to NULL-terminated string containing a device ID template
(in the probe use case) or a device ID (in the connect use case)
\param[in, out] pDeviceID A pointer to a user-allocated buffer. If DeviceIDTemplate is valid
and a device is found and identified the DLL copies a device ID to the buffer.
\param[in,out] pBufferSize As an input, the value contains the size of the buffer that
is passed through the pDeviceID parameter.
On successful return, this parameter contains the number of bytes written into the buffer,
including the NULL termination character.
On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write
the data text.
\param[out] pCookie A token supplied by the driver dll which must be handed in by all functions
called later to access the device. The dll's implementation can use this token to
cache information about the connected device thus avoiding to have to parse the deviceID again.
Note that the cookie value must not be 0.
\param[in] TimeOut A timeout value in [ms] used during accessing the device.
Note that the execution of the function itself can take longer than TimeOut because more than one
access might be necessary.
\return At completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_BUFFER_TOO_SMALL The pDeviceID buffer is too small
\retval CL_ERR_INVALID_DEVICEID The DeviceID is not recognized as valid by this dll
\retval CL_ERR_NO_DEVICE_FOUND There was no device found matching the DeviceID
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpProbeDevice( ISerial *pSerial, const CLINT8* pDeviceIDTemplate, CLINT8* pDeviceID, CLUINT32 *pBufferSize, CLUINT32 *pCookie, const CLUINT32 TimeOut );
/*!
\brief This function returns a list of XML IDs coded into a single string
XML IDs have the following form:
<CODE>"SchemaVersion.1.1@CameraManufacturer#CameraFamily#CameraModel@XMLVersion.2.3.4"</CODE>
The first part of the XML ID denotes the major and minor version number of the XML schema.
The last part of the XML ID denotes the major, minor, and subminor version number of the camera.
Both version numbers mut be the same as given in the attributes of the RegisterDescription node
of the corrensponding XML file.
The middle part of the XML ID must be a complete DeviceID.
The device templates are separated by tabulators.
The whole list is contained in a NULL terminated string.
\param[in] pSerial Pointer to the interface giving access to the serial port
\param[in] Cookie Token supplied by the driver dll via the clpProbeDevice function.
\param[out] pXMLIDs A pointer to a user-allocated buffer into which the function
copies the list of XML IDs. The list may be empty in which case is contains of a '0' only.
\param[in,out] pBufferSize As an input, the value contains the size of the buffer that
is passed through the pXMLIDs parameter.
On successful return, this parameter contains the number of bytes written into the buffer,
including the NULL termination character.
On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write
the data text.
\param[in] TimeOut A timeout value in [ms] used during accessing the device.
Note that the execution of the function itself can take longer than TimeOut because more than one
access might be necessary.
\return At completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_BUFFER_TOO_SMALL The pXMLIDs buffer is too small
\retval CL_ERR_TIMEOUT A timeout occurred
\retval CL_ERR_INVALID_COOKIE The cookie supplied is invalid
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL clpGetXMLIDs ( ISerial *pSerial, const CLUINT32 Cookie, CLINT8* pXMLIDs, CLUINT32* pBufferSize, const CLUINT32 TimeOut );
/*!
\brief This function retrieves an XML file from the camera if possible
The DLL may ask the camera for the XML code, or may have the code as a resource compiled in
itself or even may have it's own private registry mechanism installed.
In order to support the latter use case the long DeviceID is supplied which contains
the driver dll's directory.
\param[in] pSerial Pointer to the interface giving access to the serial port
\param[in] Cookie Token supplied by the driver dll via the clpProbeDevice function.
\param[in] pXMLID A pointer to a NULL terminated string containing the connected device's XML ID
\param[out] pXMLBuffer A pointer to a user-allocated buffer. Can be NULL if only the size of the
buffer is requested (see pBufferSize)
\param[in,out] pBufferSize pBufferSize As an input, the value contains the size of the buffer that
is passed through the pDeviceID parameter.
On successful return, this parameter contains the number of bytes written into the buffer,
including the NULL termination character.
On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write
the data text.
\param[in] TimeOut A timeout value in [ms] used during accessing the device.
Note that the execution of the function itself can take longer than TimeOut because more than one
access might be necessary.
\return At completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_BUFFER_TOO_SMALL The pDeviceID buffer is too small
\retval CL_ERR_NO_XMLDESCRIPTION_FOUND No XML description could be retrieved for the given XML ID
\retval CL_ERR_TIMEOUT A timeout occurred
\retval CL_ERR_INVALID_COOKIE The cookie supplied is invalid
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpGetXMLDescription( ISerial *pSerial, const CLUINT32 Cookie, const CLINT8* pXMLID, CLINT8* pXMLBuffer, CLUINT32* pBufferSize, const CLUINT32 TimeOut );
/*!
\brief This function reads numBytes from the serial device referred to by serialRef.
clSerialRead will return when numBytes are available at the serial port or
when the serialTimeout period has passed.
Upon success, numBytes are copied into buffer.
In the case of any error, including CL_ERR_TIMEOUT, no data is copied into buffer.
\param[in] pSerial The interface giving access to the serial port
\param[in] Cookie Token supplied by the driver dll via the clpProbeDevice function.
\param[in] Address Address the data is to be read from
\param[out] pBuffer Points to a user-allocated buffer. Upon a successful call,
buffer contains the data read from the serial device.
Caller should ensure that buffer is at least numBytes in size.
\param[in] BufferSize This is the number of bytes requested by the caller.
\param[in] TimeOut A timeout value in [ms] used during accessing the device.
Note that there may be specific commands which may take longer than TimeOut to be
accessed. Since clpReadRegister is missing a CL_ERR_PENDING_WRITE mechanism the
CLProcotol DLL may be forced for these commands to delay the return for more than TimeOut.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_TIMEOUT A timeout occurred
\retval CL_ERR_INVALID_COOKIE The cookie supplied is invalid
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpReadRegister(ISerial *pSerial, const CLUINT32 Cookie, const CLINT64 Address, CLINT8* pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut );
/*!
\brief This function writes numBytes to the serial device referred to by serialRef.
clSerialRead will return when numBytes are available at the serial port or
when the serialTimeout period has passed.
Upon success, numBytes are copied into buffer.
In the case of any error, including CL_ERR_TIMEOUT, no data is copied into buffer.
\param[in] pSerial The interface giving access to the serial port
\param[in] Cookie ManToken supplied by the driver dll via the clpProbeDevice function.
\param[in] Address Address the data is to be read from
\param[in] pBuffer Points to a containing the data to be written
Caller should ensure that buffer is at least BufferSize in size.
\param[in] BufferSize This is the number of bytes to be written.
\param[in] TimeOut A timeout value in [ms] used during accessing the device.
If the CLProtocol DLL knowns for specific registers that accessing them will take longer
than TiemOut for a good reason, e.g., because some re-calibration is triggered, it can
use the \ref CL_ERR_PENDING_WRITE mechanism to inform the client abou this and prolong
the waiting time.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_TIMEOUT A timeout occurred
\retval CL_ERR_INVALID_COOKIE The cookie supplied is invalid
\retval CL_ERR_PENDING_WRITE The timeout has expired but the write is still pending for a good reason.
The next call must be \ref clpContinueWriteRegister
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpWriteRegister(ISerial *pSerial, const CLUINT32 Cookie, const CLINT64 Address, const CLINT8* pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut );
/*!
\brief Calling This function is called after a write function returned CL_ERR_PENDING_WRITE. It either issues another wait for write cycle or cancels the write action
This function must be called if clpWriteRegister or clpContinueWriteRegister returns CL_ERR_PENDING_WRITE.
Note, that the CLProtocol.dll is responsible for preventing an endless number of calls to this
function by tracking the total time elapsed since the original call and returning CL_ERR_TIMEOUT
if this time is larger than the write operation should normally take place.
\param[in] pSerial The interface giving access to the serial port
\param[in] Cookie ManToken supplied by the driver dll via the clpProbeDevice function.
\param[in] ContinueWaiting If true the function will block waiting for the previous call to clpWriteRegister to finish. If false the call will be cancelled.
\param[in] TimeOut A timeout value in [ms] used during accessing the device.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_TIMEOUT A timeout occurred
\retval CL_ERR_INVALID_COOKIE The cookie supplied is invalid
\retval CL_ERR_PENDING_WRITE The timeout has expired but the write is still pending for a good reason. The next call must be \ref clpContinueWriteRegister
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpContinueWriteRegister(ISerial *pSerial, const CLUINT32 Cookie, const BOOL8 ContinueWaiting, const CLUINT32 TimeOut );
/*!
\brief This function converts an error code to error text for display in a
dialog box or in a standard I/O window.
Note: clGetErrorText first looks for the error code in CCTserial.dll.
If the error code is not found in CCTserial.dll, it is not a standard Camera Link error.
clGetErrorText then passes the error code to the manufacturer-specific .dll,
which returns the manufacturer-specific error text.
\param[in] errorCode The error code used to find the appropriate error text.
An error code is returned by every function in this library.
\param[out] errorText A caller-allocated buffer which contains the
NULL-terminated error text on function return.
\param[in,out] errorTextSize On success, contains the number of bytes written
into the buffer, including the NULL-termination character.
This value should be the size in bytes of the error text
buffer passed in. On CL_ERR__BUFFER_TOO_SMALL,
contains the size of the buffer needed to write the error text.
\param[in] Cookie Used only for CL_ERR_GET_LAST_ERROR. Returns the last error
fired on the connection identified by the Cookie
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_BUFFER_TOO_SMALL The pDeviceID buffer is too small
\retval CL_ERR_ERROR_NOT_FOUND No error string could be retrieved for the given error number
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpGetErrorText( CLINT32 errorCode, CLINT8* errorText, CLUINT32* errorTextSize, const CLUINT32 Cookie = NULL);
/*!
\brief This function disconnects the DLL from the device
When this function is called all resources allocated in the driver DLL and associated
with the Cookie are deleted and the Cookie becomes invalid.
\param[in] Cookie ManToken supplied by the driver dll via the clpProbeDevice function.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_INVALID_COOKIE The cookie supplied is invalid
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpDisconnect( const CLUINT32 Cookie );
/*!
\brief This function returns the version of the CLProtocol interface version
The function is required to ensure this interface can be extended.
\param[out] pVersionMajor If this parameter changes backward compatibility is broken.
\param[out] pVersionMinor If this parameter changes backward compatibility is maintained.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpGetCLProtocolVersion( CLUINT32 *pVersionMajor, CLUINT32 *pVersionMinor );
/*!
\brief This function is call to read a CLProtocol parameter value.
\param[in] param The parameter to read.
\param[in] Cookie Token supplied by the driver dll via the clpProbeDevice function.
Some parameters ignore the Cookie.
\param[in] pBuffer Points to a user-allocated buffer. Upon a successful call,
buffer contains the value of the parameter.
\param[in] BufferSize This is the number of bytes to be written.
Caller must ensure that buffer size match the parameters size.
\param[in] TimeOut A timeout value in [ms] used during accessing the device.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_TIMEOUT A timeout occurred
\retval CL_ERR_PARAM_NOT_SUPPORTED The parameters is not supported
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpGetParam( ISerial *pSerial, CLP_PARAMS param, const CLUINT32 Cookie, CLINT8* pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut);
/*!
\brief This function is call to change a CLProtocol parameter value.
\param[in] param The parameter to be changed.
\param[in] Cookie Token supplied by the driver dll via the clpProbeDevice function.
Some parameters ignore the Cookie.
\param[in] pBuffer Points to a buffer containing the data to be written
\param[in] BufferSize This is the number of bytes in the buffer.
Caller must ensure that buffer size match the parameters size.
\param[in] TimeOut A timeout value in [ms] used during accessing the device.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR No error occurred
\retval CL_ERR_TIMEOUT A timeout occurred
\retval CL_ERR_PARAM_NOT_SUPPORTED The parameters is not supported
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpSetParam( ISerial *pSerial, CLP_PARAMS param, const CLUINT32 Cookie, const CLINT8* pBuffer, const CLINT64 BufferSize, const CLUINT32 TimeOut);
/*!
\brief This function is call know if a parameter is supported by a CLProtocol.
\param[in] param The parameter to probe.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR The parameters is supported
\retval CL_ERR_PARAM_NOT_SUPPORTED The parameters is not supported
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpIsParamSupported( CLP_PARAMS param);
/*!
\brief This function is call to get a possible event by a CLProtocol.
\param[in] pSerial Pointer to the interface giving access to the serial port
\param[in] Cookie Token supplied by the driver dll via the clpProbeDevice function.
\param[out] pBuffer A pointer to a user-allocated buffer into which the function
copies the event data.
\param[in,out] pBufferSize As an input, the value contains the size of the buffer that
is passed through the pBuffer parameter.
On successful return, this parameter contains the number of bytes written into the buffer,
including the NULL termination character.
On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size of the buffer needed to write
the data text.
\return On completion, this function returns one of the following status codes:
\retval CL_ERR_NO_ERR The next event is copied to pBuffer
\retval CL_ERR_TIMEOUT There was no new event received
\retval CL_ERR_BUFFER_TOO_SMALL The pBuffer is too small
\retval CL_ERR_INVALID_COOKIE The cookie supplied is invalid
*/
CLPROTOCOLEXPORT CLINT32 CLPROTOCOL
clpGetEventData(const CLUINT32 Cookie, CLINT8* pBuffer, CLUINT32* pBufferSize);
/*@}*/ // CLProtocolInterface
/*@}*/ // PublicInterfaces
#endif // CLPROTOCOL_CLPROTOCOL_H

@ -0,0 +1,47 @@
//-----------------------------------------------------------------------------
// (c) 2009 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief Contains CLProtocol's linker directives
\ingroup GenApi_PublicInterface
*/
#ifndef CLPROTOCOL_CLPROTOCOLLINKAGE_H
#define CLPROTOCOL_CLPROTOCOLLINKAGE_H
#include <Base/GCLinkage.h>
// you can define GENICAM_NO_AUTO_IMPLIB to turn off automatic linkage of genicam libs
// you can define GENICAM_FORCE_AUTO_IMPLIB to enforce automatic linkage of genicam libs
#if defined(GENICAM_FORCE_AUTO_IMPLIB) || ( !defined(GENICAM_NO_AUTO_IMPLIB) && !defined(CLALLSERIAL_EXPORTS) && !defined(CLSERIAL_EXPORTS) && !defined(CLPROTOCOL_EXPORTS) )
# if defined (_WIN32) && defined (_MT )
# pragma comment(lib, LIB_NAME( "CLProtocol" ))
# else
# error Invalid configuration
# endif
#endif
#endif // CLPROTOCOL_CLPROTOCOLLINKAGE_H

@ -0,0 +1,83 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief C++ class wrapping CLSerialAll and CLProtocolDriver
*/
#ifndef CLPROTOCOL_CVERSION_H
#define CLPROTOCOL_CVERSION_H
#include <Base\GCBase.h>
#include <CLProtocol\CLProtocol.h>
namespace CLProtocol
{
//! Encapsulates a version number
/*! \ingroup PublicInterfaces */
class CLPROTOCOL_DECL CVersion
{
public:
//! Constructor
CVersion();
//! Copy Constructor
CVersion(const CVersion& Version);
//! Copy Assignment
CVersion& operator=(const CVersion& Version);
//! Parse a Version string
/*!
Returns true if the parsing was successful.
The following two forms of strings are allowed
"SchemaVersion.1.2"
"XMLVersion.1.2.3"
*/
bool FromString(const GENICAM_NAMESPACE::gcstring strVersion);
GENICAM_NAMESPACE::gcstring ToString();
//! Comparison (for sorting)
bool operator>(const CVersion& Version) const;
bool operator<(const CVersion& Version) const;
bool operator==(const CVersion& Version) const;
protected:
//! Major version number; if changed backward compatiblitity is broken
int32_t m_Major;
//! Minor version number; if changed backward compatiblitity is maintained
int32_t m_Minor;
//! SubMinor version number; bugfixes only - no new features
int32_t m_SubMinor;
};
}
#endif // CLPROTOCOL_CVERSION_H

@ -0,0 +1,350 @@
////////////////////////////////////////////////////////////////////////////////
//
// Title : clallserial.h
// Created : 12/03/2003 @ 14:27:00
//
// Copyright (c) 2004. National Instruments Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted, provided that each of the following
// conditions are met. By using the software in any manner, you agree
// to each of the following:
// - All redistributions of the software must be accompanied with the
// above copyright notice (provided however that for redistributions
// in binary form, the copyright notice may be omitted), the above
// preamble, this list of conditions, and the disclaimer set forth below.
// - Except for the copyright notice required above, neither the name
// or trademarks of National Instruments Corporation (NI) nor the names
// of its contributors may be used in any manner (including, but not
// limited to, using the same to endorse or promote products derived from
// this software) without the specific prior written permission of NI.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" WITHOUT WARRANTY OF ANY KIND. NO WARRANTIES, EITHER EXPRESS
// OR IMPLIED, ARE MADE WITH RESPECT TO THE SOFTWARE, INCLUDING, BUT
// NOT LIMITED TO, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, OR ANY OTHER
// WARRANTIES THAT MAY ARISE FROM USAGE OF TRADE OR COURSE OF DEALING.
// THE COPYRIGHT HOLDERS AND CONTRIBUTORS DO NOT WARRANT, GUARANTEE, OR
// MAKE ANY REPRESENTATIONS REGARDING THE USE OF OR THE RESULTS OF THE
// USE OF THE SOFTWARE IN TERMS OF CORRECTNESS, ACCURACY, RELIABILITY,
// OR OTHERWISE AND DO NOT WARRANT THAT THE OPERATION OF THE SOFTWARE
// WILL BE UNINTERRUPTED OR ERROR FREE. THE ENTIRE RISK AS TO THE
// PERFORMANCE OF THE SOFTWARE IS WITH YOU. IN NO EVENT SHALL THE
// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef CLPROTOCOL_CLALLSERIAL_H
#define CLPROTOCOL_CLALLSERIAL_H
#include <CLProtocol\CLSerialTypes.h>
//==============================================================================
// Macros
//==============================================================================
#if (defined(__cplusplus) || defined(__cplusplus__))
#define USER_EXTERN_C extern "C"
#else
#define USER_EXTERN_C
#endif
#ifdef CLALLSERIAL_EXPORTS
#define CLALLSERIALEXPORT USER_EXTERN_C __declspec(dllexport)
#else
#define CLALLSERIALEXPORT USER_EXTERN_C __declspec(dllimport)
#endif
#ifndef CLALLSERIALCC
// Note that using __stdcall changes the name decoration as compared with __cdecl
// For details see http://www.willus.com/mingw/yongweiwu_stdcall.html
#define CLALLSERIALCC __stdcall
#endif
//==============================================================================
// Exported functions
//==============================================================================
////////////////////////////////////////////////////////////////////////////////
//
// clFlushPort
//
// Description: Discards any bytes that are available in the input
// buffer.
//
// Parameters:
// serialRef input parameter - The value obtained by the clSerialInit function
// that describes the port to be flushed.
//
// Return Value: CL_ERR_NO_ERR
// CL_ERR_INVALID_REFERENCE
//
////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clFlushPort(hSerRef serialRef);
////////////////////////////////////////////////////////////////////////////////
//
// clGetErrorText
//
// Description:
// Converts an error code to error text which you can
// display in a dialog box or in the standard I/O window.
// Note: This function first looks up the error code in clserial.dll to determine
// whether it is a standard Camera Link error. If it is a non-standard error, this function
// passes the error code to the manufacturer-specific DLL, which returns the
// manufacturer-specific error code.
//
// Parameters:
// manuName input parameter - The manufacturer name in a NULL-terminated
// buffer. Manufacturer name is returned from clGetPortInfo.
// errorCode input parameter - The error code used to look up the
// appropriate error text. This code can be returned
// from any function in this library.
// errorText output parameter - A caller-allocated buffer which will contain
// a NULL-terminated error description on return.
// errorTextSize input/output parameter - As an input, this value is the size,
// in bytes, of the errorText buffer that is passed in. On
// success, this value is the number of bytes
// that have been written into the buffer, including the NULL
// termination character. On CL_ERR_BUFFER_TOO_SMALL error,
// this value is the size of the buffer required to write
// the data text.
//
// Return Value: CL_ERR_NO_ERR
// CL_ERR_MANU_DOES_NOT_EXIST
// CL_ERR_BUFFER_TOO_SMALL
// CL_ERR_ERROR_NOT_FOUND
//
/////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetErrorText(const CLINT8* manuName, CLINT32 errorCode, CLINT8* errorText, CLUINT32* errorTextSize);
////////////////////////////////////////////////////////////////////////////////
//
// clGetNumPorts
//
// Description: Returns the number of Camera Link serial ports in
// this machine that are supported by clallserial.dll.
//
// Parameters:
// numPorts output parameter - The number of Camera Link serial ports
// in this machine supported by this DLL.
//
// Return Value: CL_ERR_NO_ERR
//
////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetNumPorts(CLUINT32* Ports);
////////////////////////////////////////////////////////////////////////////////
//
// clGetNumBytesAvail
//
// Description: Outputs the number of bytes that are received, but not yet read out, at
// the port specified by serialRef.
//
// Parameters:
// serialRef input - The value obtained by the clSerialInit function.
// numBytes output - The number of bytes currently available to be
// read from the port.
//
// Return Value: CL_ERR_NO_ERR
// CL_ERR_INVALID_REFERENCE
//
////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetNumBytesAvail(hSerRef serialRef, CLUINT32* numBytes);
////////////////////////////////////////////////////////////////////////////////
//
// clGetPortInfo
//
// Description: This function provides information about the port specified by
// the index.
//
// Parameters:
// serialIndex input parameter - Zero-based index of the serial port you are
// finding the name for. Use clGetNumSerialPorts to determine
// the valid range of serialIndex. This range will be 0 to
// numSerialPorts-1.
// manufacturerName output parameter - Pointer to a user-allocated buffer into
// which the function copies the manufacturer name. The returned
// name is NULL-terminated. In the case that the DLL conforms to the
// version 1.0 Camera Link Specification, this
// parameter will contain the file name of the DLL rather than the
// manufacturer name.
// nameBytes input/output parameter - As an input parameter,
// this value is the size of the name buffer, including
// the NULL termination. As an output parameter, this value
// is the number of bytes written into the name buffer.
// If the provided name buffer is not large enough, this value
// is the number of required bytes.
// portID output parameter - The identifier for the port. For now, this
// value is the interface name. In the future, there may be an
// extension for multiple serial ports on one board.
// IDBytes input/output parameter. As an input parameter, this value is
// the size of the portID buffer, including
// the NULL termination. As an output parameter, this value is
// the number of bytes written into the portID buffer.
// If the provided portID buffer is not large enough, this value is
// the number of required bytes.
// Version The version of the Camera Link specifications with which this frame
// grabber software complies.
//
// Return Value: CL_ERR_NO_ERR
// CL_ERR_BUFFER_TOO_SMALL
// CL_ERR_INVALID_INDEX//
////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetPortInfo(CLUINT32 serialIndex, CLINT8* manufacturerName, CLUINT32* nameBytes, CLINT8* portID, CLUINT32* IDBytes, CLUINT32* version);
////////////////////////////////////////////////////////////////////////////////
//
// clGetSupportedBaudRates
//
// Description: Returns the valid baud rates of the interface.
//
// Parameters:
// serialRefPtr input parameter - The value obtained from
// clSerialInit function.
// baudRates output parameter - Indicates which baud
// rates are supported by this serial interface. This
// is represented as a bitfield. Refer to the CL_BAUDRATE_
// constants above for the supported baud rates.
//
// Return Value: CL_ERR_NO_ERR
// CL_ERR_INVALID_REFERENCE
// CL_ERR_FUNCTION_NOT_FOUND
//
/////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clGetSupportedBaudRates(hSerRef serialRef, CLUINT32* baudRates);
//////////////////////////////////////////////////////////////////////////////////
//
// clSerialClose
//
// Description: Closes the serial device and cleans up resources associated
// with serialRef. Upon return, serialRef is no longer usable.
//
// Parameters:
// serialRef input parameter - The value obtained from clSerialInit
// function to clean up.
//
///////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT void CLALLSERIALCC clSerialClose(hSerRef serialRef);
////////////////////////////////////////////////////////////////////////////////
//
// clSerialInit
//
// Description:
// Initializes the device referred to by serialIndex, and
// returns a pointer to an internal serial reference structure.
//
// Parameters:
// serialIndex input parameter - Zero-based index value. If there are n
// serial devices in the system that is supported by this
// library, the range of serialIndex is 0 to (n-1).
// The order of the serial devices is vendor-specific. The
// number of serial ports supported by this DLL is
// output by the clGetNumSerialPorts function.
// serialRefPtr output parameter - Upon a successful call, a pointer to the
// vendor-specific reference to the current serial session
// will be put into the value pointed to by serialRefPtr.
//
// Return Value: CL_ERR_NO_ERR
// CL_ERR_PORT_IN_USE
// CL_ERR_INVALID_INDEX
// CL_ERR_UNABLE_TO_OPEN_PORT
//
////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clSerialInit(CLUINT32 serialIndex, hSerRef* serialRefPtr);
////////////////////////////////////////////////////////////////////////////////
//
// clSerialRead
//
// Description: Reads from the serial device referenced by serialRef.
//
// Parameters:
// serialRef input parameter - The value obtained from clSerialInit function
// buffer output parameter - Points to a user-allocated buffer.
// Upon a successful call, contains the data
// read from the serial device.
// bufferSize input-output parameter - As an input parameter, bufferSize contains the
// buffer size to indicate the maximum number of bytes that
// the buffer can accommodate.
// Upon a successful call, bufferSize is the
// number of bytes that were read successfully from the
// serial device.
// serialTimeout input parameter - Indicates the timeout, in milliseconds
//
// Return value CL_ERR_NO_ERR
// CL_ERR_TIMEOUT
// CL_ERR_INVALID_REFERENCE
//
////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clSerialRead(hSerRef serialRef, CLINT8* buffer, CLUINT32* bufferSize, CLUINT32 serialTimeout);
////////////////////////////////////////////////////////////////////////////////
//
// clSerialWrite
//
// Description: This function writes data in buffer to the serial device
// referenced by serialRef.
//
// Parameters:
// serialRef input parameter - The value obtained from clSerialInit function
// buffer input parameter - Contains data to write to the serial port
// bufferSize input/output parameter - As an input parameter, bufferSize contains the
// number of bytes of data in the buffer to write to the
// serial device. Upon a successful call, bufferSize contains the
// number of bytes that was written successfully to the
// serial device.
// serialTimeout input parameter - Indicates the timeout, in miliseconds
//
// Return value: CL_ERR_NO_ERR
// CL_ERR_INVALID_REFERENCE
// CL_ERR_TIMEOUT
/////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clSerialWrite(hSerRef serialRef, CLINT8* buffer, CLUINT32* bufferSize, CLUINT32 serialTimeout);
////////////////////////////////////////////////////////////////////////////////
//
// clSetBaudRate
//
// Description: Sets the Baud Rate for the serial port of the
// selected port. Use clGetSupportedBaudRates to deterimine
// supported baud rates.
//
// Parameters:
// serialRef input parameter - The value obtained from
// clSerialInit function.
// baudRate input parameter - The baud rate you want to use. This
// input expects the values represented by the CL_BAUDRATE
// constants.
//
// Return Value: CL_ERR_NO_ERR
// CL_ERR_INVALID_REFERENCE
// CL_ERR_BAUD_RATE_NOT_SUPPORTED
//
////////////////////////////////////////////////////////////////////////////////
CLALLSERIALEXPORT CLINT32 CLALLSERIALCC clSetBaudRate(hSerRef serialRef, CLUINT32 baudRate);
//==============================================================================
// the endif
//==============================================================================
#endif // CLPROTOCOL_CLALLSERIAL_H

@ -0,0 +1,11 @@
EXPORTS
clpGetShortDeviceIDTemplates
clpProbeDevice
clpGetXMLIDs
clpGetXMLDescription
clpReadRegister
clpWriteRegister
clpContinueWriteRegister
clpGetErrorText
clpDisconnect
clpGetCLProtocolVersion

@ -0,0 +1,13 @@
EXPORTS
clFlushPort
clGetErrorText
clGetManufacturerInfo
clGetNumBytesAvail
clGetNumSerialPorts
clGetSerialPortIdentifier
clGetSupportedBaudRates
clSerialClose
clSerialInit
clSerialRead
clSerialWrite
clSetBaudRate

@ -0,0 +1,291 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief Exported C functions as defined by the Camera Link standard v1.1
*/
#ifndef CLPROTOCOL_CLSERIAL_H
#define CLPROTOCOL_CLSERIAL_H
#include <CLProtocol\CLSerialTypes.h>
//==============================================================================
// Macros
//==============================================================================
#if (defined(__cplusplus) || defined(__cplusplus__))
#define USER_EXTERN_C extern "C"
#else
#define USER_EXTERN_C
#endif
#ifdef CLSERIAL_EXPORTS
#define CLSERIALEXPORT USER_EXTERN_C __declspec(dllexport)
#else
#define CLSERIALEXPORT USER_EXTERN_C __declspec(dllimport)
#endif
#ifndef CLSERIALCC
// Note that the CLAllSerial.dll uses __stdcall instead of __cdecl
#define CLSERIALCC __cdecl
#endif
//==============================================================================
// exported functions
//==============================================================================
/*! \ingroup PublicInterfaces */
/*@{*/
/*! \defgroup CLSerialInterface CLSerial C-Function Interface */
/*@{*/
/*!
\brief This function returns the name of the manufacturer represented by the index parameter
and the version of the Camera Link specifications with which the specified .dll complies.
\return At completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_BUFFER_TOO_SMALL
CL_ERR_FUNCTION_NOT_FOUND
CL_ERR_INVALID_INDEX
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clGetManufacturerInfo (
CLINT8* ManufacturerName, /*!< A pointer to a user-allocated buffer into which the function
copies the manufacturer name. The returned name is
NULL-terminated. In the case that the .dll conforms to the October 2000 spec,
this parameter will contain the file name of the .dll rather than
the manufacturer name. */
CLUINT32* bufferSize, /*!< As an input, this value should be the size of the buffer that
is passed. On successful return, this parameter contains the
number of bytes written into the buffer, including the NULL
termination character. On CL_ERR_BUFFER_TOO_SMALL,
this parameter contains the size of the buffer needed to write
the data text. */
CLUINT32* version /*!< The version of the Camera Link Specifications with which this
.dll complies. */
);
/*!
\brief This function initializes the device referred to by serialIndex and returns
a pointer to an internal serial reference structure.
\return
On completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_PORT_IN_USE
CL_ERR_INVALID_INDEX
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clSerialInit(
CLUINT32 serialIndex, //!< A zero-based index value. For n serial devices
//!< in your system supported by this library,
//!< serialIndex has a range of 0 to(n-1).
//!< The order of the serial devices is vendor specific.
hSerRef* serialRefPtr //!< Points to a value that contains, on a successful call,
); //!< a pointer to the vendor-specific reference to the current session.
/*!
\brief This function reads numBytes from the serial device referred to by serialRef.
clSerialRead will return when numBytes are available at the serial port or
when the serialTimeout period has passed.
Upon success, numBytes are copied into buffer.
In the case of any error, including CL_ERR_TIMEOUT, no data is copied into buffer.
\return On completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_TIMEOUT
CL_ERR_INVALID_REFERENCE
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clSerialRead(
hSerRef serialRef, //!< The value obtained from the clSerialInit function.
CLINT8* buffer, //!< Points to a user-allocated buffer. Upon a successful call,
//!< buffer contains the data read from the serial device.
//!< Upon failure, this buffer is not affected.
//!< Caller should ensure that buffer is at least numBytes in size.
CLUINT32* bufferSize, //!< This is the number of bytes requested by the caller.
CLUINT32 serialTimeOut //!< Indicates the timeout in milliseconds.
);
/*!
\brief This function writes the data in the buffer to the serial device referenced by serialRef.
\return On completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_INVALID_REFERENCE
CL_ERR_TIMEOUT
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clSerialWrite(
hSerRef serialRef, //!< The value obtained from the clSerialInit function.
CLINT8* buffer, //!< Contains data to write to the serial device.
CLUINT32* bufferSize, //!< Contains the buffer size indicating
//!< the number of bytes to be written.
//!< Upon a successful call, bufferSize contains the number of
//!< bytes written to the serial device.
CLUINT32 serialTimeOut //!< Indicates the timeout in milliseconds.
);
/*!
\brief This function closes the serial device and cleans up the resources associated with serialRef.
Upon return, serialRef is no longer usable.
*/
CLSERIALEXPORT void CLSERIALCC
clSerialClose(
hSerRef serialRef //!< The value obtained from the clSerialInit function for clean up.
);
/*!
\brief This function returns the number of serial ports in your system from a specified manufacturer.
Use this number to determine the number of times you should loop through the
clGetSerialPortIdentifier function.
\return At completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_FUNCTION_NOT_FOUND
CL_ERR_MANU_DOES_NOT_EXIST
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clGetNumSerialPorts(
CLUINT32* numSerialPorts //!< The number of serial ports in your system
); //!< that you can access with the current .dll.
/*
\brief This function returns a manufacturer-specific identifier for each serial port in your system.
\return At completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_BUFFER_TOO_SMALL
CL_ERR_FUNCTION_NOT_FOUND
CL_ERR_INVALID_INDEX
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clGetSerialPortIdentifier(
CLUINT32 serialIndex, //!< A zero-based index value. The valid range for serialIndex
//!< is 0 to n-1, where n is the value of numSerialPorts,
//!< as returned by clGetNumManuSerialPorts.
CLINT8* PortID, //!< Manufacturer-specific identifier for the serial port.
//!< In the case that the manufacturer .dll conforms to the
//!< October 2000 specification, on return this parameter will
//!< be "Port #n" where n is a unique index for the port.
CLUINT32 *bufferSize //!< As an input, this value should be the size of the buffer that
); //!< is passed. On successful return, this parameter contains
//!< the number of bytes written into the buffer,
//!< including the NULL termination character.
//!< On CL_ERR_BUFFER_TOO_SMALL, this parameter contains the size
//!< of the buffer needed to write the data text.
/*!
\brief This function will output how many bytes have are available at the port specified by serialRef.
\return At completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_INVALID_REFERENCE
CL_ERR_FUNCTION_NOT_FOUND
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clGetNumBytesAvail(
hSerRef serialRef, //!< The value obtained by the clSerialInit function.
CLUINT32 *numBytes //!< The number of bytes currently available to be read from the port.
);
/*!
\brief This function will discard any bytes that are available in the input buffer.
\return At completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_INVALID_REFERENCE
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clFlushPort(
hSerRef serialRef //!< The value obtained by the clSerialInit function that describes the port to be flushed.
);
/*!
\brief This function returns the valid baud rates of the current interface.
\return At completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_INVALID_REFERENCE
CL_ERR_FUNCTION_NOT_FOUND
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clGetSupportedBaudRates(
hSerRef serialRef, //!< Points to a value that contains, on a successful call,
//!< a pointer to the vendor-specific reference to the current session.
CLUINT32 *baudRates //!< Bitfield that describes all supported baud rates of the serial port
); //!< as described by serialRefPtr. See Table B-2 of the Camera Link
//!< docu for more information on constants.
/*!
\brief This function sets the baud rate for the serial port of the selected device.
Use clGetSupportedBaudRate to determine supported baud rates.
\return On completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_INVALID_REFERENCE
CL_ERR_BAUD_RATE_NOT_SUPPORTED
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clSetBaudRate(
hSerRef serialRef, //!< The value obtained from the clSerialInit function.
CLUINT32 baudRate //!< The baud rate you want to use. This parameter expects the
); //!< values represented by the CL_BAUDRATE constants in table B-2.
//!< By default, the baud rate for serial communication is 9600.
/*!
\brief This function converts an error code to error text for display in a
dialog box or in a standard I/O window.
Note: clGetErrorText first looks for the error code in CCTserial.dll.
If the error code is not found in CCTserial.dll, it is not a standard Camera Link error.
clGetErrorText then passes the error code to the manufacturer-specific .dll,
which returns the manufacturer-specific error text.
\return On completion, this function returns one of the following status codes:
CL_ERR_NO_ERR
CL_ERR_BUFFER_TOO_SMALL
CL_ERR_ERROR_NOT_FOUND
*/
CLSERIALEXPORT CLINT32 CLSERIALCC
clGetErrorText(
CLINT32 errorCode, //!< The error code used to find the appropriate error text.
//!< An error code is returned by every function in this library.
CLINT8* errorText, //!< A caller-allocated buffer which contains the
//!< NULL-terminated error text on function return.
CLUINT32* errorTextSize //!< On success, contains the number of bytes written
); //!< into the buffer, including the NULL-termination character.
//!< This value should be the size in bytes of the error text
//!< buffer passed in. On CL_ERR__BUFFER_TOO_SMALL,
//!< contains the size of the buffer needed to write the error text.
/*@}*/ // CLSerialInterface
/*@}*/ // PublicInterfaces
//==============================================================================
// helper functions
//==============================================================================
#endif // CLPROTOCOL_CLSERIAL_H

@ -0,0 +1,123 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief types and constants as used by the Camera Link's API definition
*/
#ifndef CLPROTOCOL_CLSERIALTYPES_H
#define CLPROTOCOL_CLSERIALTYPES_H
//==============================================================================
// Macros
//==============================================================================
//------------------------------------------------------------------------------
// CL serial DLL versions
//------------------------------------------------------------------------------
#define CL_DLL_VERSION_NO_VERSION 1 // Not a CL dll
#define CL_DLL_VERSION_1_0 2 // Oct 2000 compliant
#define CL_DLL_VERSION_1_1 3 // Oct 2001 compliant
//------------------------------------------------------------------------------
// Baud Rates (CLUINT32)
//------------------------------------------------------------------------------
#define CL_BAUDRATE_9600 0x00000001
#define CL_BAUDRATE_19200 0x00000002
#define CL_BAUDRATE_38400 0x00000004
#define CL_BAUDRATE_57600 0x00000008
#define CL_BAUDRATE_115200 0x00000010
#define CL_BAUDRATE_230400 0x00000020
#define CL_BAUDRATE_460800 0x00000040
#define CL_BAUDRATE_921600 0x00000080
#define CL_BAUDRATE_AUTOMAX 0x40000000
//------------------------------------------------------------------------------
// Error Codes
//------------------------------------------------------------------------------
#define CL_ERR_NO_ERR 0
#define CL_ERR_BUFFER_TOO_SMALL -10001
#define CL_ERR_MANU_DOES_NOT_EXIST -10002
#define CL_ERR_PORT_IN_USE -10003
#define CL_ERR_TIMEOUT -10004
#define CL_ERR_INVALID_INDEX -10005
#define CL_ERR_INVALID_REFERENCE -10006
#define CL_ERR_ERROR_NOT_FOUND -10007
#define CL_ERR_BAUD_RATE_NOT_SUPPORTED -10008
#define CL_ERR_OUT_OF_MEMORY -10009
#define CL_ERR_REGISTRY_KEY_NOT_FOUND -10010
#define CL_ERR_INVALID_PTR -10011
#define CL_ERR_IN_USE -10012
#define CL_ERR_UNABLE_TO_LOAD_DLL -10098
#define CL_ERR_FUNCTION_NOT_FOUND -10099
#define CL_ERR_PENDING_WRITE 20101
#define CL_ERR_INVALID_DEVICEID -20100
#define CL_ERR_NO_DEVICE_FOUND -20101
#define CL_ERR_NO_XMLDESCRIPTION_FOUND -20102
#define CL_ERR_INVALID_COOKIE -20103
#define CL_ERR_GET_LAST_ERROR -20104
#define CL_ERR_PARAM_NOT_SUPPORTED -20105
#define CL_ERR_PARAM_READ_ONLY -20106
#define CL_ERR_PARAM_DATA_SIZE -20107
#define CL_ERR_PARAM_DATA_VALUE -20108
//------------------------------------------------------------------------------
// Types
//------------------------------------------------------------------------------
#ifndef _CL_hSerRef_DEFINED_
#define _CL_hSerRef_DEFINED_
typedef void* hSerRef;
#endif
#ifndef _CL_INT32_DEFINED_
#define _CL_INT32_DEFINED_
typedef int CLINT32;
#endif
#ifndef _CL_UINT32_DEFINED_
#define _CL_UINT32_DEFINED_
typedef unsigned int CLUINT32;
#endif
#ifndef _CL_INT64_DEFINED_
#define _CL_INT64_DEFINED_
typedef __int64 CLINT64;
#endif
#ifndef _CL_INT8_DEFINED_
#define _CL_INT8_DEFINED_
typedef char CLINT8;
#endif
#ifndef _CL_BOOL8_DEFINED_
#define _CL_BOOL8_DEFINED_
typedef char BOOL8;
#endif
#endif // CLPROTOCOL_CLSERIALTYPES_H

@ -0,0 +1,115 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GENICAM_NAMESPACE Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.GENICAM_NAMESPACE.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM_NAMESPACE STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM_NAMESPACE STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
*/
#ifndef CLPROTOCOL_DEVICEID_H
#define CLPROTOCOL_DEVICEID_H
#include <Base/GCBase.h>
#include <Base/GCUtilities.h>
#include <GenApi/PortImpl.h>
#include <CLProtocol/CLAllSerial.h>
#include <CLProtocol/CLProtocol.h>
#include <CLProtocol/ISerial.h>
#include <CLProtocol/CVersion.h>
#include <iostream>
#include <fstream>
namespace CLProtocol
{
//! Helper class which can split DeviceIDs strings into tokens
/*! \ingroup PublicInterfaces */
class CLPROTOCOL_DECL CDeviceID
{
public:
//! returns the token separator string
static const char* GetTokenSeparator();
//! returns the token separator string
/** \deprecated This function has been declared <b>deprecated</b> because of a typo in the functions name. Use <b>CDeviceID::GetTokenSeparator()</b> instead.
*/
GENICAM_DEPRECATED( static const char* GetTokenSeperator() );
public:
//! Constructor
CDeviceID();
//! parse string
bool FromString(const GENICAM_NAMESPACE::gcstring &DeviceID);
//! retrieves the directory the CL protocol driver is located in
/*!
\param ReplaceEnvironmentVariables If true environment variables like $(GENICAM_CLPROTOCOL)
are replaced by their value.
*/
GENICAM_NAMESPACE::gcstring GetDriverDirectory(const bool ReplaceEnvironmentVariables = true) const;
//! retrieves the file name of the CL protocol driver
GENICAM_NAMESPACE::gcstring GetDriverFileName() const;
//! retrieves the path of the CL protocol driver is located in
GENICAM_NAMESPACE::gcstring GetDriverPath() const;
//! retrieves the manufacturer name of the camera
GENICAM_NAMESPACE::gcstring GetCameraManufacturer() const;
//! retrieves the camera family (may return empty string in case of a template)
GENICAM_NAMESPACE::gcstring GetCameraFamily() const;
//! retrieves the camera model (may return empty string in case of a template)
GENICAM_NAMESPACE::gcstring GetCameraModel() const;
//! retrieves the camera model's version in any format (may return empty string in case of a template)
GENICAM_NAMESPACE::gcstring GetCameraVersion() const;
//! retrieves the camera model's serial number in any format (may return empty string in case of a template)
GENICAM_NAMESPACE::gcstring GetCameraSerialNumber() const;
//! retrieves the ShortDeviceID/DeviceIDTemplate without the DriverDriectory and the Driver FileName in front
GENICAM_NAMESPACE::gcstring GetShortDeviceID() const;
//! retrieves the DeviceID without the DriverDriectory and the Driver FileName in front
GENICAM_NAMESPACE::gcstring GetDeviceID(const bool ReplaceEnvironmentVariables = true) const;
private:
//! The positions of the tokens within the DeviceID string
typedef enum
{
didDriverDirectory = 0,
didDriverFileName = 1,
didCameraManufacturer = 2,
didCameraFamily = 3,
didCameraModel = 4,
didCameraVersion = 5,
didCameraSerialNumber = 6
} EDeviceIDIndex;
//! The tokens which form the DeviceID
GENICAM_NAMESPACE::gcstring_vector m_DeviceIDTokens;
};
}
#endif // CLPROTOCOL_DEVICEID_H

@ -0,0 +1,97 @@
//-----------------------------------------------------------------------------
// (c) 2008 by Basler Vision Technologies
// Section: Vision Components
// Project: GenApi
// Author: Fritz Dierks
// $Header$
//
// License: This file is published under the license of the EMVA GenICam Standard Group.
// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
// If for some reason you are missing this file please contact the EMVA or visit the website
// (http://www.genicam.org) for a full copy.
//
// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD GROUP
// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
/*!
\file
\brief Exported C functions for camera link protocol drivers
*/
#ifndef CLPROTOCOL_ISERIAL_H
#define CLPROTOCOL_ISERIAL_H
#include <ObjBase.h>
#include <CLProtocol\CLSerialTypes.h>
//==============================================================================
// Macros
//==============================================================================
#ifdef CLPROTOCOL_EXPORTS
#define CLPROTOCOLEXPORT USER_EXTERN_C __declspec(dllexport)
#else
#define CLPROTOCOLEXPORT USER_EXTERN_C __declspec(dllimport)
#endif
#ifndef CLPROTOCOL
#define CLPROTOCOL __cdecl
#endif
//==============================================================================
// Exported Functions
//==============================================================================
/*! \ingroup PublicInterfaces */
/*@{*/
//! Abstract interface used by the CLProtocol driver to use a serial port
class ISerial
{
public:
//! calls clSerialRead as defined by the camera link standard
virtual CLINT32 CLPROTOCOL clSerialRead(
CLINT8* buffer, //!< Points to a user-allocated buffer. Upon a successful call,
//!< buffer contains the data read from the serial device.
//!< Upon failure, this buffer is not affected.
//!< Caller should ensure that buffer is at least numBytes in size.
CLUINT32* bufferSize, //!< This is the number of bytes requested by the caller.
CLUINT32 serialTimeOut //!< Indicates the timeout in milliseconds.
) = 0;
//! calls clSerialWrite as defined by the camera link standard
virtual CLINT32 CLPROTOCOL clSerialWrite(
CLINT8* buffer, //!< Contains data to write to the serial device.
CLUINT32* bufferSize,//!< Contains the buffer size indicating
//!< the number of bytes to be written.
//!< Upon a successful call, bufferSize contains the number of
//!< bytes written to the serial device.
CLUINT32 serialTimeOut //!< Indicates the timeout in milliseconds.
) = 0;
//! returns the valid baud rates of the current interface.
virtual CLINT32 CLPROTOCOL clGetSupportedBaudRates(
CLUINT32 *baudRates //!< Bitfield that describes all supported baud rates of the serial port
) = 0; //!< as described by serialRefPtr. See Table B-2 of the Camera Link
//!< docu for more information on constants.
//! This function sets the baud rate for the serial port of the selected device.
virtual CLINT32 CLPROTOCOL clSetBaudRate(
CLUINT32 baudRate //!< The baud rate you want to use. This parameter expects the
) = 0; //!< values represented by the CL_BAUDRATE constants in table B-2.
//!< By default, the baud rate for serial communication is 9600.
};
/*@}*/ // PublicInterfaces
#endif // CLPROTOCOL_ISERIAL_H

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save