123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- #ifndef _DEVICECONF_API_H_
- #define _DEVICECONF_API_H_
- #ifdef CONFXMLPARSE_EXPORTS
- #define CONFXML_API extern "C" __declspec(dllexport)
- #else
- #define CONFXML_API extern "C" __declspec(dllimport)
- #endif
- #ifndef CONFXMLPARSE_EXPORTS
- #ifdef WIN64
- #ifdef _DEBUG
- #pragma comment(lib,"ConfXMLParseX64D.lib")
- #else
- #pragma comment(lib,"ConfXMLParseX64.lib")
- #endif
- #else
- #pragma comment(lib,"ConfXMLParse.lib")
- #endif // DEBUG
- #endif
- #include <vector>
- #include <map>
- #include <list>
- using namespace std;
- typedef basic_string<TCHAR, char_traits<TCHAR>, allocator<TCHAR> >
- tstring;
- //---------------------------------------------------------------------------------------
- enum
- {
- FW_NEED_UPDATE = 1,
- FW_MANDATORY_UPDATE,
- FW_NOT_SUPPORT,
- FW_NEW,
- FW_GET_ERROR
- };
- typedef struct
- {
- int nFullWidth;
- int nFullHeight;
- int nWidthOffset;
- int nHeightOffset;
- int nPreviewEnable;
- int nPreviewWidth;
- int nPreviewHeight;
- }Image;
- typedef struct
- {
- int nReferDose;
- int nAvgNum;
- }RefrenceCal;
- struct PanelBasicItem
- {
- int nSyncMode;
- int nCalibrationMode;
- int nPanelExpWindowMode;
- int nSaveRawDataMode;
- int nSaturationValue;
- int nGridSuppressed;
- int nPanelID;
- int nCOMPort;
- int nPanelChannel;
- wchar_t* strPanelType;
- wchar_t* strPanelFileName;
- wchar_t* strIPAddress;
- wchar_t* strPanelSerial;
- };
- struct PanelAdvanceItem
- {
- int nAutoBadPixel;
- int nTempUpperLimit;
- int nTempMaxLimit;
- int nTempLowerLimit;
- int nBatteryUpperLimit;
- int nBatteryLowerLimit;
- int nWifiUpperLimit;
- int nWifiLowerLimit;
- int nStandardEXI;
- int nDoseOfEXI;
- int nOffsetType; //
- wchar_t* strLastCalibrationDate;
- Image ImageStruct;
- vector<RefrenceCal> vecRefrenceCal;
- };
- struct PanelInternalItem
- {
- int nVersion;
- int nEnable;
- };
- struct PanelInfo
- {
- PanelBasicItem panelBasicItem;
- PanelAdvanceItem panelAdvanceItem;
- PanelInternalItem panelInternalItem;
- };
- //---------------------------------------------------------------------------------------
- struct GenBasicItem
- {
- int nGenPort;
- int nGenCtrlMode;
- int nGenWSLying;
- int nGenWSStand;
- int nGenWSConventional;
- int nGenWSFree;
- int nGenWSConventionalLying;
- int nGenWSConventionalStand;
- int nOrthoGenWSLying;
- int nOrthoGenWSStand;
- int nOrthoGenWSConventional;
- int nOrthoGenWSFree;
- int nOrthoGenWSConventionalLying;
- int nOrthoGenWSConventionalStand;
- //int nGenWSConventionalFree;
- wchar_t* strCalledIP;
- int nCalledPort;
- wchar_t* strCallingAETitle;
- wchar_t* strCalledAETitle;
- float fLargeFocalSpot;
- float fSmallFocalSpot;
- wchar_t* strXRayTubeVendor;
- int nReserved1;
- int nReserved2;
- };
- struct GenAdvanceItem
- {
- };
- struct GenInternalItem
- {
- wchar_t* strGenType;
- int nGenState;
- };
- struct GenInfo
- {
- GenBasicItem genBasicItem;
- GenAdvanceItem genAdvanceItem;
- GenInternalItem genInternalItem;
- };
- struct SNList
- {
- int nID;
- string strPanelType;
- string strPanelSN;
- string strActive;
- string strIPAddress;
- string strCalibDate;
- SNList()
- {
- nID = 0;
- strActive = "";
- strPanelType = "";
- strPanelSN = "";
- strIPAddress = "";
- strCalibDate = "";
- }
- };
- CONFXML_API bool LoadGenConXML( const wchar_t* strGenXMLName,GenInfo *genInfo);
- CONFXML_API bool LoadPanelConfXML(const wchar_t* strPanelXMLPath,PanelInfo *panelInfo);
- CONFXML_API bool LoadSynBoxConXML( const wchar_t* strSynXMLName,map<wstring,wstring> &);
- CONFXML_API bool LoadGenConf(const wchar_t* strGenXMLPath,map<wstring,wstring> &);
- CONFXML_API bool LoadPanelConf(const wchar_t* strPanelXMLPath,map<wstring,wstring> &);
- CONFXML_API bool GetPanelCalibItem(const wchar_t* strPanelXMLPath, list<RefrenceCal> & );
- CONFXML_API bool GetCalibReport(char* strConfXML, char* strKey, string& strValue);
- CONFXML_API bool CreatCalibReport(char* strConfXML, char* strKey, char* strValue);
- CONFXML_API bool SetDefectClass(char* strPanelXMLPath, char* strKey, int nValue, int nValueMax, bool bNewNode = true);
- CONFXML_API bool AddNewPanelSerial(char* strPanelXMLPath, SNList);
- CONFXML_API bool GetPanelSerialList(char* strPanelXMLPath,list<SNList> &listPanelSerial);
- CONFXML_API bool ClearSNList(char* pszPanelXMLPath);
- CONFXML_API bool LoadWlanAPConf(const char *strWlanConf, const char* strKey, string &strValue);
- CONFXML_API bool SetWlanAPConf(const char *strWlanConf, const char* strKey, string &strValue);
- CONFXML_API bool GetWlanAPLogin(const char *strWlanConf, string &strLogin, string &strPassword);
- CONFXML_API bool GetWlanAPIP(const char *strWlanConf, string &strIP,int &nPort);
- //CONFXML_API const wchar_t* GetKeyValueW(const wchar_t* strConfXML, const wchar_t* strKey);
- //CONFXML_API const char* GetKeyValueA(const char* strConfXML, const char* strKey);
- CONFXML_API bool GetValueByKeyA(const char* strConfXML, const char* strKey, string &strValue);
- CONFXML_API int LoadFirmwareList(const char *strFirmwareListConf, const char* strPN, const char* strFW);
- CONFXML_API bool LoadShockInfo(const char* strDeviceConfXML, map<string, string> &vecShockInfo);
- #endif
|