/** @File GxIAPI.h @Brief the interface for the GxIAPI dll module. @Author Software Department @Date 2023-03-16 @Version 1.4.2303.9161 */ #ifndef GX_GALAXY_H #define GX_GALAXY_H //////////////////////////////////////////////////////////////////////////////////////////// // Type definitions. The following types are defined in the standard C library header // stdint.h. This file is not included in the previous version of Microsoft's compilation // platform VS 2010, so type definitions need to be redefined here. //////////////////////////////////////////////////////////////////////////////////////////// #if defined(_WIN32) #ifndef _STDINT_H #ifdef _MSC_VER // Microsoft compiler #if _MSC_VER < 1600 typedef __int8 int8_t; typedef __int16 int16_t; typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #else // In Visual Studio 2010 is stdint.h already included #include #endif #else // Not a Microsoft compiler #include #endif #endif #else // Linux #include #endif //------------------------------------------------------------------------------ // Operating System Platform Definition //------------------------------------------------------------------------------ #include #ifdef WIN32 #ifndef _WIN32 #define _WIN32 #endif #endif #ifdef _WIN32 #include #define GX_DLLIMPORT __declspec(dllimport) #define GX_DLLEXPORT __declspec(dllexport) #define GX_STDC __stdcall #define GX_CDEC __cdecl #if defined(__cplusplus) #define GX_EXTC extern "C" #else #define GX_EXTC #endif #else // remove the None #define conflicting with GenApi #undef None #if __GNUC__>=4 #define GX_DLLIMPORT __attribute__((visibility("default"))) #define GX_DLLEXPORT __attribute__((visibility("default"))) #if defined(__i386__) #define GX_STDC __attribute__((stdcall)) #define GX_CDEC __attribute__((cdecl)) #else #define GX_STDC #define GX_CDEC #endif #if defined(__cplusplus) #define GX_EXTC extern "C" #else #define GX_EXTC #endif #else #error Unknown compiler #endif #endif #ifdef GX_GALAXY_DLL #define GX_DLLENTRY GX_EXTC GX_DLLEXPORT #else #define GX_DLLENTRY GX_EXTC GX_DLLIMPORT #endif //------------------------------------------------------------------------------ // Error Code Definition //------------------------------------------------------------------------------ typedef enum GX_STATUS_LIST { GX_STATUS_SUCCESS = 0, ///< Success GX_STATUS_ERROR = -1, ///< There is an unspecified internal error that is not expected to occur GX_STATUS_NOT_FOUND_TL = -2, ///< The TL library cannot be found GX_STATUS_NOT_FOUND_DEVICE = -3, ///< The device is not found GX_STATUS_OFFLINE = -4, ///< The current device is in an offline status GX_STATUS_INVALID_PARAMETER = -5, ///< Invalid parameter. Generally, the pointer is NULL or the input IP and other parameter formats are invalid GX_STATUS_INVALID_HANDLE = -6, ///< Invalid handle GX_STATUS_INVALID_CALL = -7, ///< The interface is invalid, which refers to software interface logic error GX_STATUS_INVALID_ACCESS = -8, ///< The function is currently inaccessible or the device access mode is incorrect GX_STATUS_NEED_MORE_BUFFER = -9, ///< The user request buffer is insufficient: the user input buffer size during the read operation is less than the actual need GX_STATUS_ERROR_TYPE = -10, ///< The type of FeatureID used by the user is incorrect, such as an integer interface using a floating-point function code GX_STATUS_OUT_OF_RANGE = -11, ///< The value written by the user is crossed GX_STATUS_NOT_IMPLEMENTED = -12, ///< This function is not currently supported GX_STATUS_NOT_INIT_API = -13, ///< There is no call to initialize the interface GX_STATUS_TIMEOUT = -14, ///< Timeout error }GX_STATUS_LIST; typedef int32_t GX_STATUS; //------------------------------------------------------------------------------ // Frame Status Definition //------------------------------------------------------------------------------ typedef enum GX_FRAME_STATUS_LIST { GX_FRAME_STATUS_SUCCESS = 0, ///< Normal frame GX_FRAME_STATUS_INCOMPLETE = -1, ///< Incomplete frame GX_FRAME_STATUS_INVALID_IMAGE_INFO = -2, ///< Information Error Frame }GX_FRAME_STATUS_LIST; typedef int32_t GX_FRAME_STATUS; //------------------------------------------------------------------------------ // Device Type Definition //------------------------------------------------------------------------------ typedef enum GX_DEVICE_CLASS_LIST { GX_DEVICE_CLASS_UNKNOWN = 0, ///< Unknown device type GX_DEVICE_CLASS_USB2 = 1, ///< USB2.0 Vision device GX_DEVICE_CLASS_GEV = 2, ///< Gige Vision device GX_DEVICE_CLASS_U3V = 3, ///< USB3 Vision device GX_DEVICE_CLASS_SMART = 4, ///< Smart camera device }GX_DEVICE_CLASS_LIST; typedef int32_t GX_DEVICE_CLASS; //------------------------------------------------------------------------------ // Feature Mask Definition //------------------------------------------------------------------------------ typedef enum GX_FEATURE_MASK { GX_FEATURE_TYPE_MASK = 0xF0000000, ///Feature type mask GX_FEATURE_LEVEL_MASK = 0x0F000000, ///Feature level mask }GX_FEATURE_MASK; //------------------------------------------------------------------------------ // Feature Type Definition //------------------------------------------------------------------------------ typedef enum GX_FEATURE_TYPE { GX_FEATURE_INT = 0x10000000, ///< Integer type GX_FEATURE_FLOAT = 0X20000000, ///< Floating point type GX_FEATURE_ENUM = 0x30000000, ///< Enum type GX_FEATURE_BOOL = 0x40000000, ///< Boolean type GX_FEATURE_STRING = 0x50000000, ///< String type GX_FEATURE_BUFFER = 0x60000000, ///< Block data type GX_FEATURE_COMMAND = 0x70000000, ///< Command type }GX_FEATURE_TYPE; //------------------------------------------------------------------------------ // Feature Level Definition //------------------------------------------------------------------------------ typedef enum GX_FEATURE_LEVEL { GX_FEATURE_LEVEL_REMOTE_DEV = 0x00000000, ///< Remote device layer GX_FEATURE_LEVEL_TL = 0x01000000, ///< TL layer GX_FEATURE_LEVEL_IF = 0x02000000, ///< Interface layer GX_FEATURE_LEVEL_DEV = 0x03000000, ///< Device layer GX_FEATURE_LEVEL_DS = 0x04000000, ///< DataStream layer }GX_FEATURE_LEVEL; //------------------------------------------------------------------------------ // Access Mode of Device //------------------------------------------------------------------------------ typedef enum GX_ACCESS_MODE { GX_ACCESS_READONLY = 2, ///< Open the device in read-only mode GX_ACCESS_CONTROL = 3, ///< Open the device in controlled mode GX_ACCESS_EXCLUSIVE = 4, ///< Open the device in exclusive mode }GX_ACCESS_MODE; typedef int32_t GX_ACCESS_MODE_CMD; //------------------------------------------------------------------------------ // Access Status of Current Device //------------------------------------------------------------------------------ typedef enum GX_ACCESS_STATUS { GX_ACCESS_STATUS_UNKNOWN = 0, ///< The device's current status is unknown GX_ACCESS_STATUS_READWRITE = 1, ///< The device currently supports reading and writing GX_ACCESS_STATUS_READONLY = 2, ///< The device currently only supports reading GX_ACCESS_STATUS_NOACCESS = 3, ///< The device currently does neither support reading nor support writing }GX_ACCESS_STATUS; typedef int32_t GX_ACCESS_STATUS_CMD; //------------------------------------------------------------------------------ // Open Mode Definition //------------------------------------------------------------------------------ typedef enum GX_OPEN_MODE { GX_OPEN_SN = 0, ///< Opens the device via a serial number GX_OPEN_IP = 1, ///< Opens the device via an IP address GX_OPEN_MAC = 2, ///< Opens the device via a MAC address GX_OPEN_INDEX = 3, ///< Opens the device via a serial number (Start from 1, such as 1, 2, 3, 4...) GX_OPEN_USERID = 4, ///< Opens the device via user defined ID }GX_OPEN_MODE; typedef int32_t GX_OPEN_MODE_CMD; //------------------------------------------------------------------------------ // IP Configure Mode //------------------------------------------------------------------------------ enum GX_IP_CONFIGURE_MODE_LIST { GX_IP_CONFIGURE_DHCP = 0x6, ///< Enable the DHCP mode to allocate the IP address by the DHCP server GX_IP_CONFIGURE_LLA = 0x4, ///< Enable the LLA mode to allocate the IP address GX_IP_CONFIGURE_STATIC_IP = 0x5, ///< Enable the static IP mode to configure the IP address GX_IP_CONFIGURE_DEFAULT = 0x7, ///< Enable the default mode to configure the IP address }; typedef int32_t GX_IP_CONFIGURE_MODE; typedef enum GX_FEATURE_ID { ////////////////////////////////////////////////////////////////////////// /// Remote device layer(Remote Device Feature) ////////////////////////////////////////////////////////////////////////// //---------------DeviceInfomation Section-------------------------- GX_STRING_DEVICE_VENDOR_NAME = 0 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Name of the manufacturer of the device. GX_STRING_DEVICE_MODEL_NAME = 1 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Model of the device. GX_STRING_DEVICE_FIRMWARE_VERSION = 2 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Version of the firmware in the device. GX_STRING_DEVICE_VERSION = 3 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Version of the device. GX_STRING_DEVICE_SERIAL_NUMBER = 4 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Device serial number. GX_STRING_FACTORY_SETTING_VERSION = 6 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Factory parameter version GX_STRING_DEVICE_USERID = 7 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< User-programmable device identifier. GX_INT_DEVICE_LINK_SELECTOR = 8 | GX_FEATURE_INT | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Selects which Link of the device to control. GX_ENUM_DEVICE_LINK_THROUGHPUT_LIMIT_MODE = 9 | GX_FEATURE_ENUM | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Controls if the DeviceLinkThroughputLimit is active. GX_INT_DEVICE_LINK_THROUGHPUT_LIMIT = 10 | GX_FEATURE_INT | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Limits the maximum bandwidth of the data that will be streamed out by the device on the selected Link. GX_INT_DEVICE_LINK_CURRENT_THROUGHPUT = 11 | GX_FEATURE_INT | GX_FEATURE_LEVEL_REMOTE_DEV, ///< The bandwidth of current device acquisition GX_COMMAND_DEVICE_RESET = 12 | GX_FEATURE_COMMAND| GX_FEATURE_LEVEL_REMOTE_DEV, ///< reset device GX_INT_TIMESTAMP_TICK_FREQUENCY = 13 | GX_FEATURE_INT | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Time stamp clock frequency GX_COMMAND_TIMESTAMP_LATCH = 14 | GX_FEATURE_COMMAND| GX_FEATURE_LEVEL_REMOTE_DEV, ///< Timestamp latch GX_COMMAND_TIMESTAMP_RESET = 15 | GX_FEATURE_COMMAND| GX_FEATURE_LEVEL_REMOTE_DEV, ///< reset Timestamp GX_COMMAND_TIMESTAMP_LATCH_RESET = 16 | GX_FEATURE_COMMAND| GX_FEATURE_LEVEL_REMOTE_DEV, ///< reset Timestamp latch GX_INT_TIMESTAMP_LATCH_VALUE = 17 | GX_FEATURE_INT | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Timestamp Latch value GX_STRING_DEVICE_PHY_VERSION = 18 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Device network chip version GX_ENUM_DEVICE_TEMPERATURE_SELECTOR = 19 | GX_FEATURE_ENUM | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Device temperature selection GX_FLOAT_DEVICE_TEMPERATURE = 20 | GX_FEATURE_FLOAT | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Device temperature GX_STRING_DEVICE_ISP_FIRMWARE_VERSION = 21 | GX_FEATURE_STRING | GX_FEATURE_LEVEL_REMOTE_DEV, ///< Devide isp firmware version GX_ENUM_LOWPOWER_MODE = 22 | GX_FEATURE_ENUM | GX_FEATURE_LEVEL_REMOTE_DEV, ///