| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- #ifndef TIRAY_DEF_H
- #define TIRAY_DEF_H
- typedef enum {
- Err_Success,
- Err_SystemFailure, //system internal error
- Err_WrongModel, //the specified model is incorrect
- Err_DetectorNonExists, //the specified detector with the given ID does not exist
- Err_NetworkFailure, //the network communication has failed
- Err_InvalidParam, //the provided parameters are incorrect
- Err_UploadInProgress, //the upload is in progress
- Err_Busy, //the device is busy processing, can't do anything else.
- Err_Timeout, //process timed out
- Err_ImageNotExist, //image not exist when fetch historical image
- } TiRayError;
- typedef enum {
- Model_GQ1613,
- Model_DY1613,
- Model_LT1719,
- Model_DY4343,
- Model_DY2530W,
- Model_DY2121,
- Model_DY4343D,
- Model_GZ0404,
- Model_DY3543W,
- Model_DY4343W,
- Model_DY3543,
- Model_DY2430DP,
- Model_DY2530D,
- } TiRayModel;
- typedef enum {
- Cmd_ReadAttribute = 1,
- Cmd_WriteAttribute,
- Cmd_Photo,
- Cmd_UploadOffsetTemplate, //upload offset template to detector
- Cmd_UploadGainTemplate, //upload gain template to detector
- Cmd_UpdateFirmware,
- Cmd_ResetInner,
- Cmd_StopPhoto,
- Cmd_FetchHistoricalImageList,
- Cmd_FetchHistoricalImage,
- Cmd_DownloadOffsetTemplate, //download offset template from detector to pc
- Cmd_DownloadGainTemplate, //download gain template from detector to pc
- } TiRayCommand;
- typedef enum {
- Attr_WorkMode = 2, //int WorkMode
- Attr_BinningMode, //int BinningMode
- Attr_CalibrationMode, //int CalibrationMode
- Attr_PhotoInterval, //int interval
- Attr_PhotoNumber, //int number
- Attr_SelfClearInterval, //int interval
- Attr_GainLevel, //int level
- Attr_ROI, //int x1, int y1, int x2, int y2
- Attr_AEDSensitivity, //int sensitivity
- Attr_AEDDelay, //int delay
- Attr_WifiMode, //int Wi-Fi mode ap or station
- Attr_WifiApSSID, //string Wi-Fi ap ssid
- Attr_WifiApPSK, //string Wi-Fi ap psk
- Attr_WifiStationSSID, //string Wi-Fi station ssid
- Attr_WifiStationPSK, //string Wi-Fi station psk
- Attr_HibernationTimeout, //int Hibernation after timeout for wireless detector, at least 60 seconds
- Attr_BiasVoltMode, //int BiasVoltMode [GZ0404]
- Attr_BiasVoltage, //float bias voltage [GZ0404]
- Attr_OverlayNumber, //int image overlay number
- Attr_OverlayMode, //int image overlay mode
- Attr_RefDac, //int ref dac
- Attr_WifiStationHostIp, //string Wi-Fi station mode host ip
- Attr_WifiStationDeviceIp, //string Wi-Fi station mode detector ip
- //readonly attribute
- Attr_BatteryStatus = 1000, //int battery_level, int charging_status
- Attr_WifiStatus, //int signal_intensity, int link_quality(percent)
- Attr_Humiture, //int Celsius temperature, int humidity(percent)
- Attr_DeviceTime, //device datetime
- Attr_ExpiredTime, //device activation expired time
- Attr_DeviceSN, //device serial number
- Attr_CtrlVersion,
- Attr_FpgaVersion,
- Attr_McuVersion,
- Attr_ConnectionType,
- } TiRayAttribute;
- typedef enum {
- Evt_DetectorConnect = 1,
- Evt_DetectorDisconnect,
- Evt_ReadAttribute = 1000,
- Evt_WriteAttribute,
- Evt_ImageReceived,
- Evt_UploadProgress,
- Evt_UploadTimeout,
- Evt_UpdateFinish,
- Evt_ExposureStatus, //1 closed 0 open
- Evt_FetchHistoricalImageList,
- Evt_FetchHistoricalImage,
- Evt_DownloadOffsetTemplate,
- Evt_DownloadGainTemplate,
- Evt_DetectorStatus, //0 idle 1 busy
- } TiRayEvent;
- typedef enum {
- WorkMode_Idle,
- WorkMode_AED = 2,
- WorkMode_SyncOut,
- WorkMode_SyncIn = 5,
- WorkMode_Prep,
- WorkMode_Continuous,
- WorkMode_Inner,
- WorkMode_FreeSync,
- WorkMode_DDR,
- } WorkMode;
- typedef enum {
- Binning_None,
- Binning_2X1,
- Binning_2X2,
- } BinningMode;
- typedef enum {
- CalibrationMode_None = 1,
- CalibrationMode_Gain,
- CalibrationMode_Offset,
- CalibrationMode_Defect,
- } CalibrationMode;
- typedef enum {
- TemplateType_Gain,
- TemplateType_Offset,
- TemplateType_Mean,
- TemplateType_GainV2,
- } TemplateType;
- typedef enum {
- WifiMode_AP,
- WifiMode_Station,
- } WifiMode;
- typedef enum {
- ConnectionType_None,
- ConnectionType_Wired,
- ConnectionType_Wireless
- } ConnectionType;
- typedef enum {
- BiasVoltMode_LowVoltage,
- BiasVoltMode_HighVoltage,
- } BiasVoltMode;
- typedef enum {
- OverlayMode_Average, //overlay value = sum / number
- OverlayMode_Additive, //overlay value = sum
- } OverlayMode;
- #pragma pack(push, 1)
- typedef struct {
- char Ip[20];
- unsigned short Port; //not used for now
- int EnableLog;
- } StartupOption;
- typedef struct {
- enum {TiRayInt, TiRayFloat, TiRayBuffer, TiRayInt64} Type;
- union {
- int IntValue;
- long long Int64Value;
- float FloatValue;
- struct {
- char* DataValue;
- int DataLen;
- };
- };
-
- } TiRayVariant;
- #pragma pack(pop)
- #endif // #ifndef TIRAY_DEF_H
|