#pragma once #include extern const char * TriggerModeName[]; extern const char * PanelStatus[]; extern const char * PanelErrorStatus[]; extern const char * DetectorState[]; extern const char * PrepCapMode[]; extern const char * Enm_Switch[]; extern const char * InnerSubFlow[]; typedef struct { int nReferDose; int nAvgNum; }RefrenceCal; enum FW_STATUS { FW_NEED_UPDATE = 1, FW_MANDATORY_UPDATE, FW_NOT_SUPPORT, FW_NEW, FW_GET_ERROR }; enum IRAY_TRIGGER_MODE { TRIGGER_NONE, TRIGGER_SOFT, TRIGGER_INNER, TRIGGER_INNER2, TRIGGER_FREESYNC, TRIGGER_PREP, TRIGGER_MAX }; enum IRAY_SYNCMODE_CHANGE { E_IRAY_SYNCMODE_NOCHANGE = 0, E_IRAY_SYNCMODE_CHANGED = 2, E_IRAY_SYNCMODE_SETFAILED = 4 }; enum ENUM_EXPOSE_STATUS { DOSE_ACCEPT = 0, DOSE_TOO_HIGH = 1, DOSE_TOO_LOW = 2, DOSE_OBJECT = 3 }; //探测器异步事件状态 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, PANEL_EVENT_FWU_ERROR_BATTERY = 7, PANEL_EVENT_CALIB_REPORT = 8, PANEL_EVENT_FWU_ERROR_OMIT = 9, }; 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_DATE = 0x0A, EVT_INFO_FPVOLTAGE = 0x0B, EVT_INFO_CALIBRATIOIN_DATEL = 0x0C, //长曝光模式 EVT_INFO_CALIBRATIOIN_TIME = 0x0D, EVT_INFO_CALIBRATIOIN_TIMEL = 0x0E, } 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_IMAGERECOVERAUTO = 0x19, EVT_STATUS_PREPARE_EDNCALIBRATION = 0x21, } 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_STATUS { PANEL_CLOSE = 0, PANEL_STANDBY = 1, PANEL_READY_EXP = 2, PANEL_XWINDOW_ON = 3, PANEL_XWINDOW_OFF = 4, PANEL_START_TRANSMIT = 5, PANEL_END_TRANSMIT = 6, PANEL_START_ACQ = 7, PANEL_END_ACQ = 8, PANEL_EXP_END_TIMEOUT = 9, PANEL_OFFSET_CAL = 10, PANEL_OFFSET_FINISH = 11, PANEL_GAIN_CAL = 12, PANEL_GAIN_FINISH = 13, PANEL_DEFECT_CAL = 14, PANEL_DEFECT_FINISH = 15, PANEL_AED_XRAY_ON = 16, PANEL_AED_XRAY_OFF = 17, PANEL_INIT = 21, PANEL_SLEEP = 22, PANEL_GET_IMAGE = 23, PANEL_GAIN_PREPARE = 24, PANEL_GAIN_READY_EXP = 25, PANEL_OFFSET_FAILED = 26, }; struct DeviceIndexStruct { bool bInitOK; bool bConnectStatus; bool bActived; bool bExisted; bool bEventReturn; bool bSetCorrection; bool bReadWifi; bool bHallSensor; bool bReadTemperature; bool bReadBattery; bool bTaskEnd; bool bCharging; bool bUpdateFirmware; bool bUploadCalibFile; bool bRecoveringImage; bool bWireless; bool bLivingTime; bool bImagePending; bool bConnectChanged; bool bPreviewEnable; bool bStatusPollEnable; bool bTemperatureEnable; bool bBatteryEnable; bool bWifiEnable; int nSyncMode; int nSaturationValue; int nPanelID; int nDoseOfEXI; int nWorkstation; int nWifiWarning; int nWifiLimit; int nCurrentWifiValue; int nBatteryWarning; int nBatteryLimit; int nCurrentBatteryValue; int nWifiChannel; int nWifiDataRate; int nWifiSignalPower; int nWifiNoisePower; int nCalibDueSetting; int nShockTimes; int nMaxShockNumber; int nForceGridSuppress; float fGradientMean; float fGradientStdDev; int nGridSuppressed; float fGridSuppressParam1; float fGridSuppressParam2; float fGridSuppressParam3; float fGridSuppressParam4; float fGridSuppressParam5; float fGridSuppressParam6; float fGridSuppressParam7; float fGridSuppressParam8; float fGridSuppressParam9; float fCalibTemperature; float fCalibTemperatureLTE; float fCalibTemperature1; float fCalibTemperature2; int nSaveRaw; int nSID; int nCorrectionType; //校正策略 int nCalibMode; //校正方式:0(ZSKK校正);1(厂商校正) //ECM信息相关 int nImageBits; int nRawWidth; int nRawHeight; int nFullImageWidth; int nFullImageHeight; int nPreviewWidth; int nPreviewHeight; int nWidthOffset; int nHeightOffset; int nImageLeftOffset; int nImageTopOffset; int nImageRightOffset; int nImageBottomOffset; int nGridSuppFilterType; int nLifeTime; int nPowerOn; int nFirmwareStatus; int nTemperatureStatus; int nLastImageID; int nPixelSpace; //像素大小 int nExpWindowMode; int nXWindow; float fFactorEXI2UGY; //探测器EXI -> UGY 转换系数 //Temperature float fTemperMaxLimit; float fTemperUpLimit; float fTemperLowLimit; float fTemperMinLimit; float fCalibTemperUp; float fCalibTemperLow; float fCurrentTemperValue; std::string strDetectorModel; //探测器类型 std::string strDeviceName; //探测器名称 std::string strPartNumber; std::string strWifiSSID; std::string strPanelSerial; std::string strFPDConfFilePath;//探测器自身配置文件路径 std::string strIPAddress; //探测器IP std::string strWiredIP; //有线IP std::string strWirelessIP; //无线IP std::string strLocalIP; //本地IP std::string strCalibrationDate; //校正日期 std::string strCalibrationTime; //校正时间 std::string strCalibrationDue; //校正过期日 std::string strCalibrationLTEDate; //LTE校正日期 std::string strCalibrationLTETime; //LTE校正时间 std::string strCalibrationLTEDue; //LTE校正过期日 std::string strDateCode; std::string strFirmware; std::string strSoftware; std::string strWorkDir; //SDK配置文件路径 std::string strLastCalibrationDate; //上一次校正日期时间 std::string strCalibrationFileExpireTime; //校正文件过期天数 DeviceIndexStruct() { bInitOK = false; bConnectStatus = false; bExisted = false; bEventReturn = false; bSetCorrection = false; bReadWifi = false; bHallSensor = false; bReadTemperature = false; bReadBattery = false; bTaskEnd = true; bCharging = false; bUpdateFirmware = false; bUploadCalibFile = false; bRecoveringImage = false; bWireless = false; bLivingTime = false; bImagePending = false; bConnectChanged = false; bActived = true; bStatusPollEnable = false; bTemperatureEnable = false; bBatteryEnable = false; bWifiEnable = false; nCalibMode = 0; strDetectorModel = ""; //探测器名称 strDeviceName = ""; //探测器名称 strWifiSSID = "NULL"; //无线探测器SSID名称 nSyncMode = 0; nSaturationValue = 0; nGridSuppressed = 0; nPanelID = 0; nDoseOfEXI = 0; strPanelSerial = ""; strFPDConfFilePath = "";//探测器自身配置文件路径 strCalibrationDate = (" "); strCalibrationTime = (" "); strCalibrationDue = (" "); strCalibrationLTEDate = (" "); strCalibrationLTETime = (" "); strCalibrationLTEDue = (" "); fFactorEXI2UGY = 0.0f; bPreviewEnable = false; fTemperMaxLimit = 0.0f; fTemperUpLimit = 0.0f; fTemperLowLimit = 0.0f; fTemperMinLimit = 0.0f; fCalibTemperUp = 0.0f; fCalibTemperLow = 0.0f; fCalibTemperature = 0.0f; fCalibTemperatureLTE = 0.0f; fCalibTemperature1 = 0.0f; fCalibTemperature2 = 0.0f; fCurrentTemperValue = 0.0f; nWorkstation = -1; nWifiWarning = 0; nWifiLimit = 0; nCurrentWifiValue = -1; nBatteryWarning = 0; nBatteryLimit = 0; nCurrentBatteryValue = 0;//fixbug 9728泰雷兹探测器电量为0时不给这个值赋值,西门子还是想要0 nGridSuppFilterType = 0; nShockTimes = -1; nWifiChannel = 0; nWifiDataRate = 0; nWifiSignalPower = 0; nWifiNoisePower = 0; nCalibDueSetting = 0; nMaxShockNumber = 0; nForceGridSuppress = 0; fGradientMean = 0.0; fGradientStdDev = 0.0; nGridSuppressed = 0; fGridSuppressParam1 = 0.0; fGridSuppressParam2 = 0.0; fGridSuppressParam3 = 0.0; fGridSuppressParam4 = 0.0; fGridSuppressParam5 = 0.0; fGridSuppressParam6 = 0.0; fGridSuppressParam7 = 0.0; fGridSuppressParam8 = 0.0; fGridSuppressParam9 = 0.0; nSaveRaw = 0; nSID = 0; nPixelSpace = 143; //ECM信息相关 nImageBits = 0; nRawWidth = 0; nRawHeight = 0; nFullImageWidth = 0; nFullImageHeight = 0; nPreviewWidth = 0; nPreviewHeight = 0; nWidthOffset = 0; nHeightOffset = 0; nLifeTime = 0; nPowerOn = 0; nFirmwareStatus = -1; nTemperatureStatus = 0; nLastImageID = 0; strWiredIP = ""; strWirelessIP = ""; strLocalIP = ""; strWorkDir = ""; strLastCalibrationDate = "0000-00-00 00:00:00"; strCalibrationFileExpireTime = "365"; } }; 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 }; enum GRID_STATUS { 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 };