123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- #ifndef TIRAY_DEF_H
- #define TIRAY_DEF_H
- typedef enum {
- Err_Success = 0,
- Err_SystemFailure = 1, //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,
- } TiRayModel;
- typedef enum {
- Cmd_ReadAttribute = 1,
- Cmd_WriteAttribute,
- Cmd_Photo,
- Cmd_UploadOffsetTemplate,
- Cmd_UploadGainTemplate,
- Cmd_UpdateFirmware,
- Cmd_ResetInner,
- Cmd_StopPhoto,
- Cmd_FetchHistoricalImageList,
- Cmd_FetchHistoricalImage,
- } 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
- Attr_BiasVoltMode, //int BiasVoltMode for GZ0404
- Attr_BiasVoltage, //float bias voltage for GZ0404
- //The following attributes currently apply only to DY2530W
- 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_ControllerVersion,
- Attr_FpgaVersion,
- Attr_ArmVersion,
- } 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,
- } TiRayEvent;
- typedef enum {
- WorkMode_Idle = 0,
- WorkMode_AED = 2,
- WorkMode_SyncOut,
- WorkMode_SyncIn = 5,
- WorkMode_Prep,
- WorkMode_Continuous,
- WorkMode_Inner,
- WorkMode_FreeSync,
- } WorkMode;
- typedef enum {
- Binning_None,
- Binning_2X1,
- Binning_2X2,
- } BinningMode;
- typedef enum {
- CalibrationMode_None = 1,
- CalibrationMode_Gain,
- CalibrationMode_Offset,
- CalibrationMode_Defect,
- } CalibrationMode;
- typedef enum {
- Gain,
- Offset,
- Mean,
- GainV2,
- } TemplateType;
- typedef enum {
- AP,
- Station,
- } WifiMode;
- typedef enum {
- LowVoltage,
- HighVoltage,
- } BiasVoltMode;
- #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
|