HWConf_API.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef __HWCONF_API_H__
  2. #define __HWCONF_API_H__
  3. #ifdef CONFXMLPARSE_EXPORTS
  4. #define HWCONF_API extern "C" _declspec(dllexport)
  5. #else
  6. #define HWCONF_API extern "C" _declspec(dllimport)
  7. #endif
  8. #include <map>
  9. #include <vector>
  10. struct DeviceConf
  11. {
  12. wchar_t* strDeviceConfName;
  13. wchar_t* strConfigFile;
  14. };
  15. struct DeviceASConf
  16. {
  17. wstring strDeviceType;
  18. int nDeviceIndex;
  19. int nDeviceWS;
  20. DeviceASConf()
  21. {
  22. nDeviceIndex = 0;
  23. nDeviceWS = 0;
  24. }
  25. };
  26. struct AcqStation
  27. {
  28. wstring strAngle;
  29. wstring strWS;
  30. vector<DeviceASConf> vecDeviceASConf;
  31. };
  32. struct StructWS
  33. {
  34. int nIndex;
  35. wchar_t* strFileName;
  36. };
  37. struct StructConfigProfile
  38. {
  39. wchar_t* strProcName;
  40. wchar_t* strMSMQName;
  41. wchar_t* strHostName;
  42. vector<StructWS> vecWS;
  43. };
  44. struct StructDeviceConfig
  45. {
  46. wchar_t* strVersion;
  47. wchar_t* strDeviceType;
  48. vector<StructConfigProfile> vecConfigProcfile;
  49. };
  50. struct StructGroupConf
  51. {
  52. vector<wchar_t*> vecGroup;
  53. };
  54. HWCONF_API bool LoadResourceConfXML(const wchar_t* strResourceXMLPath,vector<DeviceConf> &vecDeviceConf);
  55. HWCONF_API bool LoadASConfXML(const wchar_t* strASConfXML,vector<AcqStation> &vecASConf);
  56. HWCONF_API bool LoadASMap( const wchar_t* strASConfXML ,vector< map<wstring,wstring> > &vecASConf );
  57. HWCONF_API bool LoadDeviceConfXML(const wchar_t* strDeviceConfXML,StructDeviceConfig &deviceConf);
  58. HWCONF_API bool LoadGroupConfXML(const wchar_t* strGroupConfXML,StructGroupConf &groupConf);
  59. HWCONF_API wchar_t* GetHWItemValue(const wchar_t* strConfXML, const char* strKey );
  60. #endif //__HWCONF_API_H__