SystemConfigStruct.cpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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( nNoiseOneDetectDuration == other.nNoiseOneDetectDuration &&
  62. nNoiseDetectContinueCount == other.nNoiseDetectContinueCount &&
  63. nNoiseContinueCountIsWarn == other.nNoiseContinueCountIsWarn &&
  64. nNoiseContinueCountPercent == other.nNoiseContinueCountPercent &&
  65. dThresholdSlient == other.dThresholdSlient &&
  66. dThresholdDB == other.dThresholdDB &&
  67. dThresholdCV == other.dThresholdCV &&
  68. nPerseg == other.nPerseg &&
  69. nOverlap == other.nOverlap &&
  70. nFFT == other.nFFT
  71. )
  72. {
  73. return true;
  74. }
  75. return false;
  76. }
  77. bool DatabaseConfig_t::operator==(const DatabaseConfig_t &other) const
  78. {
  79. if(&other == this)
  80. {
  81. return true; // 自身比较
  82. }
  83. if( nRecordLogRetain == other.nRecordLogRetain &&
  84. nOperatorLogRetain == other.nOperatorLogRetain &&
  85. nRecordFileRetain == other.nRecordFileRetain &&
  86. nClientPort == other.nClientPort &&
  87. nListenPort == other.nListenPort &&
  88. strRecordFilePath == other.strRecordFilePath
  89. )
  90. {
  91. return true;
  92. }
  93. return false;
  94. }