123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520 |
- #pragma once
- #include <string>
- #pragma region DEFINITION
- //探测器异步事件状态
- enum ENUM_PANEL_EVENT_STATE
- {
- PANEL_EVENT_END_OK = 0,
- PANEL_EVENT_END_ERROR = 1,
- PANEL_EVENT_START = 2,
- PANEL_EVENT_SUCCESS = 3,
- PANEL_EVENT_END = 4,
- PANEL_EVENT_BEGIN = 5,
- PANEL_EVENT_TIMEOUT = 6
- };
- enum AcqMode
- {
- UNDEFINE = 0,
- RAD,
- };
- enum ENUM_EXPOSE_STATUS
- {
- DOSE_ACCEPT = 0,
- DOSE_TOO_HIGH = 1,
- DOSE_TOO_LOW = 2,
- DOSE_OBJECT = 3
- };
- typedef enum
- {
- EVT_LEVEL_CONFIGURATION = 0x00,
- EVT_LEVEL_INFORMATOION = 0x01,
- EVT_LEVEL_STATUS = 0x02,
- EVT_LEVEL_DATA = 0x03,
- EVT_LEVEL_WARNING = 0x04,
- EVT_LEVEL_ERROR = 0x05,
- } CcosEventLevel;
- typedef enum
- {
- EVT_CONF_PANEL_SERIAL = 0x00,
- EVT_CONF_RAW_WIDTH = 0x01,
- EVT_CONF_RAW_HIGHT = 0x02,
- EVT_CONF_RAW_BITS = 0x03,
- EVT_CONF_PIXELSPACE = 0x04,
- EVT_CONF_PREVIEW_WIDTH = 0x05,
- EVT_CONF_PREVIEW_HIGHT = 0x06,
- EVT_CONF_MODULE_TYPE = 0x07,
- EVT_CONF_MODULE_IP = 0x08,
- EVT_CONF_MODULE_SN = 0x09,
- EVT_CONF_FIRWARE_UPDATE = 0x0A,
- EVT_CONF_PART_NUMBER = 0x0B,
- EVT_CONF_BATTERY_SN = 0x0C,
- EVT_CONF_WIFI_SSID = 0x0D,
- EVT_CONF_IFBOARD = 0x0E,
- EVT_CONF_DATECODE = 0x0F,
- EVT_CONF_LIFETIME = 0x10,
- } CcosEventConfigID;
- typedef enum
- {
- EVT_INFO_POWER_ON = 0x00,
- EVT_INFO_BATTERY_CAPACITY = 0x01,
- EVT_INFO_BATTERY_TEMPERATURE = 0x02,
- EVT_INFO_BATTERY_CHARGES = 0x03,
- EVT_INFO_WIFI_DATARATE = 0x04,
- EVT_INFO_WIFI_CHANNEL = 0x05,
- EVT_INFO_WIFI_SIGNALPOWER = 0x06,
- EVT_INFO_WIFI_NOISEPOWER = 0x07,
- EVT_INFO_FIRMWARE = 0x08,
- EVT_INFO_SHOCKSENSOR_INFO = 0x09,
- EVT_INFO_CALIBRATIOIN_TIME = 0x0A,
- EVT_INFO_FPVOLTAGE = 0x0B,
- EVT_INFO_CALIBRATIOIN_TIMEL = 0x0C, //长曝光模式
- } CcosEventInfoID;
- typedef enum
- {
- EVT_STATUS_INIT = 0x00,
- EVT_STATUS_MOTION = 0x01,
- EVT_STATUS_UPDATE_FIRMWARE = 0x02,
- EVT_STATUS_SELFTEST = 0x03,
- EVT_STATUS_DETECTORSHARE = 0x04,
- EVT_STATUS_SINGLEINIT = 0x05,
- EVT_STATUS_SELECTPANEL = 0x06,
- EVT_STATUS_PANEL = 0x07,
- EVT_STATUS_CALIBRATIOIN = 0x08,
- EVT_STATUS_SAVECALIB = 0x09,
- EVT_STATUS_SAVEDEFECT = 0x0A,
- EVT_STATUS_ACQUISITION = 0x0B,
- EVT_STATUS_SINGLEEXP = 0x0C,
- EVT_STATUS_IMAGEPENDING = 0x0D,
- EVT_STATUS_TEMPERATURE = 0x0E,
- EVT_STATUS_WIFI = 0x0F,
- EVT_STATUS_BATTERY_VALUE = 0x10,
- EVT_STATUS_BATTERY_CHARGING = 0x11,
- EVT_STATUS_SHOCK_SENSOR = 0x12,
- EVT_STATUS_HALL_SENSOR = 0x13,
- EVT_STATUS_PING = 0x14,
- EVT_STATUS_PMSNOTOPEN = 0x15,
- EVT_STATUS_RESTOREFILES = 0x16,
- EVT_STATUS_LASTERROR = 0x17,
- EVT_STATUS_RESET = 0x18,
- EVT_STATUS_SLEEP = 0x19,
- EVT_AUTONUMOUS_STATUS = 0x20,
- } CcosEventStatusID;
- typedef enum
- {
- EVT_DATA_RAW_IMAGE = 0x00,
- EVT_DATA_PREVIEW_IMAGE = 0x01,
- EVT_DATA_DOSEPARAM = 0x02,
- } CcosEventDataID;
- typedef enum
- {
- EVT_ERR_COMMUNICATE = 0x00,
- EVT_ERR_EXP_REQUEST = 0x01,
- EVT_ERR_GET_IMAGE = 0x02,
- EVT_ERR_MAX_NUMBER = 0x03,
- EVT_ERR_SN_NOTINLIST = 0x04,
- EVT_ERR_POWER_OFF = 0x05,
- EVT_ERR_INIT_FAILED = 0x06,
- } CcosEventErrorID;
- enum ENUM_PANEL_RESET
- {
- PANEL_RESET_BEGIN = 1,
- PANEL_RESET_OK = 2,
- PANEL_RESET_ERROR = 3
- };
- //探测器状态
- enum ENUM_PANEL_STATUS
- {
- PANEL_CLOSE,
- PANEL_CONNECT,
- PANEL_STANDBY,
- PANEL_READY_EXP,
- PANEL_XWINDOW_ON,
- PANEL_XWINDOW_OFF,
- PANEL_START_TRANSMIT,
- PANEL_END_TRANSMIT,
- PANEL_START_ACQ,
- PANEL_END_ACQ,
- PANEL_EXP_END_TIMEOUT,
- PANEL_OFFSET_CAL,
- PANEL_OFFSET_FINISH,
- PANEL_GAIN_CAL,
- PANEL_GAIN_FINISH,
- PANEL_DEFECT_CAL,
- PANEL_DEFECT_FINISH,
- PANEL_XRAY_ON,
- PANEL_XRAY_OFF,
- PANEL_INIT = 21,
- PANEL_SLEEP,
- PANEL_GET_IMAGE,
- PANEL_GAIN_PREPARE,
- PANEL_GAIN_READY_EXP
- };
- struct DeviceIndexStruct
- {
- bool bPreviewEnable;
- bool bInitOK;
- bool bConnectStatus;
- bool bModuleEnable;
- bool bExisted;
- bool bEventReturn;
- bool bSetCorrection;
- bool bReadWifi;
- bool bHallSensor;
- bool bReadTemperature;
- bool bReadBattery;
- bool bWriteROM;
- bool bTaskEnd;
- bool bCharging;
- bool bOffsetOver;
- bool bUpdateFirmware;
- bool bUploadCalibFile;
- bool bRecoveringImage;
- bool bWireless;
- bool bLivingTime;
- bool bImagePending;
- bool bConnectChanged;
- bool bActived;
- int HWindex;
- int Realindex;
- int nSyncMode;
- int nPanelExpWindowMode;
- int nSaturationValue;
- int nPanelID;
- int nDoseOfEXI;
- int nRequirehwMode;
- int nWorkstation;
- int nSaveRaw;
- int nSID;
- int nShockTimes;
- int nMaxShockNumber;
- //温度、电量、wifi
- int nNotifyStatusTimePeriod;//通知状态信息时间间隔,从模型文件中读取
- int nWifiChannel;
- int nWifiDataRate;
- int nWifiSignalPower;
- int nWifiNoisePower;
- int nWifiWarning;//低信号警告
- int nWifiLimit;//最低信号值
- int nCurrentWifiValue;//当前wifi信号值
- int nBatteryWarning;//低电量警告
- int nBatteryLimit;//最低电量限制
- int nBatLowerLimitInCali;
- int nCurrentBatteryValue;//当前电量
- float fTemperatureErrorMin;//最低温度值
- float fTemperatureErrorMax;//最高温度值
- float fTemperatureWarnMin;//低温警告
- float fTemperatureWarnMax;//高温警告
- float fCurrentTemperValue;//当前温度
- //栅相关
- int nForceGridSuppress;
- int nGridSuppressed;
- float fGridSuppressParam1;
- float fGridSuppressParam2;
- float fGridSuppressParam3;
- float fGridSuppressParam4;
- float fGridSuppressParam5;
- float fGridSuppressParam6;
- float fGridSuppressParam7;
- float fGridSuppressParam8;
- float fGridSuppressParam9;
- //ECM信息相关
- int nImageBits;
- int nRawWidth;
- int nRawHeight;
- int nFullImageWidth;
- int nFullImageHeight;
- int nMaxImgHeight;
- int nMaxImgWidth;
- int nPreviewWidth;
- int nPreviewHeight;
- int nWidthOffset;
- int nHeightOffset;
- int nImageTopffset;
- int nImageRightOffset;
- int nImageBottomOffset;
- int nImageLeftOffset;
- int nGridSuppFilterType;
- int nLifeTime;
- int nPowerOn;
- int nFirmwareStatus;
- int nTemperatureStatus;
- int nLastImageID;
- int nPixelSpace;
- std::string strAppConfFilePath; //配置文件路径
- std::string strDeviceName; //探测器名称
- std::string strPartNumber;
- std::string strWifiSSID;
- std::string strPanelSerial;
- std::string strFPDConfFilePath;//探测器自身配置文件路径
- std::string strDetectorWiredIP;
- std::string strDetectorWirelessIP;
- std::string strLocalIP;
- std::string strCalibrationDate; //校正日期
- std::string strCalibrationDue;
- std::string strCalibrationLTEDate; //LTE校正日期
- std::string strCalibrationLTEDue;
- std::string strInterfaceBoard;
- std::string strDateCode;
- std::string strFirmware;
- std::string strSoftware;
- std::string strWorkDir; //SDK配置文件路径
- std::string strSupportSyncMode;
- std::string strShowTemperature;
- std::string strShowWifi;
- std::string strShowBattery;
- std::string strShowBluetooth;
- std::string strLastCalibrationDate;
- std::string strCalibrationFileExpireTime;
- std::string strCalibrationFileExpirationReminder;
- bool bSupportDDR; //是否支持DDR采集模式
- int nOffsetInterval;//offset刷新间隔 单位(分钟)
- int nDetectorWidth;
- int nDetectorHeight;
- int nCalibMode;
- int nReconnectTimePeriod;
- DeviceIndexStruct()
- {
- bPreviewEnable = false;
- bInitOK = false;
- bConnectStatus = false;
- bModuleEnable = false;
- bExisted = false;
- bEventReturn = false;
- bSetCorrection = false;
- bReadWifi = false;
- bHallSensor = false;
- bReadTemperature = false;
- bReadBattery = false;
- bWriteROM = false;
- bTaskEnd = false;
- bCharging = false;
- bOffsetOver = false;
- bUpdateFirmware = false;
- bUploadCalibFile = false;
- bRecoveringImage = false;
- bWireless = false;
- bLivingTime = false;
- bImagePending = false;
- bConnectChanged = false;
- bActived = false;
- HWindex = 0;
- Realindex = 0;
- nSyncMode = 0;
- nPanelExpWindowMode = 0;
- nSaturationValue = 0;
- nPanelID = 0;
- nDoseOfEXI = 0;
- nRequirehwMode = 0;
- nWorkstation = 0;
- nSaveRaw = 0;
- nSID = 0;
- nShockTimes = 0;
- nMaxShockNumber = 0;
- nNotifyStatusTimePeriod = 0;
- nWifiChannel = 0;
- nWifiDataRate = 0;
- nWifiSignalPower = 0;
- nWifiNoisePower = 0;
- nWifiWarning = 0;
- nWifiLimit = 0;
- nCurrentWifiValue = 0;
- nBatteryWarning = 0;
- nBatteryLimit = 0;
- nBatLowerLimitInCali = 0;
- nCurrentBatteryValue = 0;
- fTemperatureErrorMin = 0.0f;
- fTemperatureErrorMax = 0.0f;
- fTemperatureWarnMin = 0.0f;
- fTemperatureWarnMax = 0.0f;
- fCurrentTemperValue = 0.0f;
- nForceGridSuppress = 0;
- nGridSuppressed = 0;
- fGridSuppressParam1 = 0.0f;
- fGridSuppressParam2 = 0.0f;
- fGridSuppressParam3 = 0.0f;
- fGridSuppressParam4 = 0.0f;
- fGridSuppressParam5 = 0.0f;
- fGridSuppressParam6 = 0.0f;
- fGridSuppressParam7 = 0.0f;
- fGridSuppressParam8 = 0.0f;
- fGridSuppressParam9 = 0.0f;
- nImageBits = 0;
- nRawWidth = 0;
- nRawHeight = 0;
- nFullImageWidth = 0;
- nFullImageHeight = 0;
- nMaxImgHeight = 0;
- nMaxImgWidth = 0;
- nPreviewWidth = 0;
- nPreviewHeight = 0;
- nWidthOffset = 0;
- nHeightOffset = 0;
- nImageTopffset = 0;
- nImageRightOffset = 0;
- nImageBottomOffset = 0;
- nImageLeftOffset = 0;
- nGridSuppFilterType = 0;
- nLifeTime = 0;
- nPowerOn = 0;
- nFirmwareStatus = 0;
- nTemperatureStatus = 0;
- nLastImageID = 0;
- nPixelSpace = 0;
- strAppConfFilePath = ""; //配置文件路径
- strDeviceName = "";//探测器名称
- strPartNumber = "";
- strWifiSSID = "";
- strPanelSerial = "";
- strFPDConfFilePath = "";//探测器自身配置文件路径
- strDetectorWiredIP = "";
- strDetectorWirelessIP = "";
- strLocalIP = "";
- strCalibrationDate = ""; //校正日期
- strCalibrationDue = "";
- strCalibrationLTEDate = ""; //LTE校正日期
- strCalibrationLTEDue = "";
- strInterfaceBoard = "";
- strDateCode = "";
- strFirmware = "";
- strSoftware = "";
- strWorkDir = ""; //SDK配置文件路径
- strSupportSyncMode = "";
- strShowTemperature = "";
- strShowWifi = "";
- strShowBattery = "";
- strShowBluetooth = "";
- strLastCalibrationDate = "";
- strCalibrationFileExpireTime = "";
- strCalibrationFileExpirationReminder = "";
- bSupportDDR = false;
- nOffsetInterval = 30;
- nDetectorWidth = 0;
- nDetectorHeight = 0;
- nCalibMode = 0;
- nReconnectTimePeriod = 0;
- }
- };
- typedef enum
- {
- FD_INIT_NULL = -1,
- FD_INIT_FAILED = 0,
- FD_INIT_SUCCESS = 1,
- }fd_init_status;
- enum
- {
- GRID_CONF_AUTO = 0,
- GRID_CONF_YES = 1,
- GRID_CONF_NO = 2,
- };
- enum
- {
- GRID_STATE_ERROR = -3,
- GRID_STATE_PARAM_ERROR = -2,
- GRID_STATE_PARAM_NULL = -1,
- GRID_STATE_NO = 0,
- GRID_STATE_VERTICAL = 1,
- GRID_STATE_HORIZONTAL = 2,
- };
- enum TEMP_STATUS
- {
- TEMP_NORMAL = 0,
- TEMP_WARNING, //1
- TEMP_TOO_HIGH, //2
- TEMP_TOO_LOW, //3
- };
- enum APP_STATUS
- {
- APP_STATUS_IDLE = 0,
- APP_STATUS_WORK_BEGIN, //1
- APP_STATUS_WORK_END, //2
- APP_STATUS_DETSHARE_BEGIN, //3
- APP_STATUS_DETSHAR_END, //4
- APP_STATUS_CAL_BEGIN, //5
- APP_STATUS_CAL_END, // 6
- APP_STATUS_WORK_IN_SENSITIVITY, //7
- APP_STATUS_MAX,
- };
- #ifndef PZDR_INIT_RESULT
- #define PZDR_INIT_RESULT
- enum INIT_RESULT
- {
- INIT_FAILED,
- INIT_CONNECT_ERR,
- INIT_SUCCESS,
- INIT_RESULT_MAX,
- };
- #endif
- #ifndef PZDPC_STATE
- #define PZDPC_STATE
- enum PZDPC_State
- {
- PZDPC_STATE_INIT = 0,
- PZDPC_STATE_STANDBY,
- PZDPC_STATE_WORK,
- PZDPC_STATE_CALIBRATION,
- PZDPC_STATE_EXIT,
- PZDPC_STATE_MAX,
- };
- #endif
- // PZMedical校正过程
- enum PZ_CALIBRATION_State
- {
- PZ_CALIBRATION = 0,
- PZ_CALIBRATION_INIT,
- PZ_CALIBRATION_OFFSET,
- PZ_CALIBRATION_GAIN,
- PZ_CALIBRATION_MAX,
- };
- #pragma endregion DEFINITION
|