SystemConfigStruct.cpp 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #include "SystemConfigStruct.h"
  2. /* =============================================================================
  3. * 基础配置结构体
  4. * ============================================================================= */
  5. bool BaseConfig_t::operator==(const BaseConfig_t &other) const
  6. {
  7. if(&other == this)
  8. {
  9. return true; // 自身比较
  10. }
  11. if(strServerIP == other.strServerIP &&
  12. nRecordMode == other.nRecordMode &&
  13. strDriverName == other.strDriverName &&
  14. nNotConsistency == other.nNotConsistency &&
  15. isEnableMultiCore == other.isEnableMultiCore &&
  16. isEnableDebugLog == other.isEnableDebugLog &&
  17. isClearDirSystemOn == other.isClearDirSystemOn &&
  18. isUsingSoundCardName == other.isUsingSoundCardName)
  19. {
  20. return true;
  21. }
  22. return false;
  23. }
  24. bool AICompareConfig_t::operator==(const AICompareConfig_t &other) const
  25. {
  26. if(&other == this)
  27. {
  28. return true; // 自身比较
  29. }
  30. if(nAiComputeDuration == other.nAiComputeDuration &&
  31. strAiCompareDir == other.strAiCompareDir)
  32. {
  33. return true;
  34. }
  35. return false;
  36. }
  37. bool NoiseDetectBaseConfig_t::operator==(const NoiseDetectBaseConfig_t &other) const
  38. {
  39. if(&other == this)
  40. {
  41. return true;
  42. }
  43. if( strNoiseServerAddr == other.strNoiseServerAddr &&
  44. strNoiseDetectDir == other.strNoiseDetectDir &&
  45. strServerPath == other.strServerPath &&
  46. nNoiseDetectDuration == other.nNoiseDetectDuration &&
  47. isEnableNoiseDetect == other.isEnableNoiseDetect &&
  48. isEnableMainRoadDetect == other.isEnableMainRoadDetect
  49. )
  50. {
  51. return true;
  52. }
  53. return false;
  54. }
  55. bool NoiseDetectParam_t::operator==(const NoiseDetectParam_t &other) const
  56. {
  57. if(&other == this)
  58. {
  59. return true; // 自身比较
  60. }
  61. if( strRegitrationCode == other.strRegitrationCode &&
  62. nNoiseDetectContinueCount == other.nNoiseDetectContinueCount &&
  63. nNoiseContinueCountIsWarn == other.nNoiseContinueCountIsWarn &&
  64. nNoiseContinueCountPercent == other.nNoiseContinueCountPercent &&
  65. nFreqComponentMini == other.nFreqComponentMini &&
  66. nFreqComponentMax == other.nFreqComponentMax &&
  67. fOneDBThreshold == other.fOneDBThreshold &&
  68. nOneDBComponentMini == other.nOneDBComponentMini &&
  69. fNoiseThreshold == other.fNoiseThreshold &&
  70. nNoiseComponentMini == other.nNoiseComponentMini &&
  71. nNoiseDetectDuration == other.nNoiseDetectDuration &&
  72. nNoiseDetectPercent == other.nNoiseDetectPercent &&
  73. nNoiseDBMax == other.nNoiseDBMax
  74. )
  75. {
  76. return true;
  77. }
  78. return false;
  79. }
  80. bool DatabaseConfig_t::operator==(const DatabaseConfig_t &other) const
  81. {
  82. if(&other == this)
  83. {
  84. return true; // 自身比较
  85. }
  86. if( nRecordLogRetain == other.nRecordLogRetain &&
  87. nOperatorLogRetain == other.nOperatorLogRetain &&
  88. nRecordFileRetain == other.nRecordFileRetain &&
  89. nClientPort == other.nClientPort &&
  90. nListenPort == other.nListenPort &&
  91. strRecordFilePath == other.strRecordFilePath
  92. )
  93. {
  94. return true;
  95. }
  96. return false;
  97. }