#include "SystemConfigStruct.h" #include /* ============================================================================= * 基础配置结构体 * ============================================================================= */ bool BaseConfig_t::operator==(const BaseConfig_t &other) const { if(&other == this) { return true; // 自身比较 } if(strServerIP == other.strServerIP && nRecordMode == other.nRecordMode && strDriverName == other.strDriverName && nNotConsistency == other.nNotConsistency && isEnableMultiCore == other.isEnableMultiCore && isEnableDebugLog == other.isEnableDebugLog && isClearDirSystemOn == other.isClearDirSystemOn && isUsingSoundCardName == other.isUsingSoundCardName) { return true; } return false; } bool AICompareConfig_t::operator==(const AICompareConfig_t &other) const { if(&other == this) { return true; // 自身比较 } if( nAiComputeDuration == other.nAiComputeDuration && nAiCompareCount == other.nAiCompareCount && std::abs(fNotSimilarThrehold - other.fNotSimilarThrehold) <= fespipe && std::abs(fSimilarThrehold - other.fSimilarThrehold) <= fespipe && bNoConsistencyAlarmOtherAlarm == other.bNoConsistencyAlarmOtherAlarm) { return true; } return false; } bool NoiseDetectBaseConfig_t::operator==(const NoiseDetectBaseConfig_t &other) const { if(&other == this) { return true; } if( strNoiseServerAddr == other.strNoiseServerAddr && strNoiseDetectDir == other.strNoiseDetectDir && strServerPath == other.strServerPath && nNoiseDetectInterval == other.nNoiseDetectInterval && isEnableNoiseDetect == other.isEnableNoiseDetect && isEnableMainRoadDetect == other.isEnableMainRoadDetect ) { return true; } return false; } bool NoiseDetectParam_t::operator==(const NoiseDetectParam_t &other) const { if(&other == this) { return true; // 自身比较 } if( nNoiseOneDetectDuration == other.nNoiseOneDetectDuration && nNoiseDetectContinueCount == other.nNoiseDetectContinueCount && nNoiseContinueCountIsWarn == other.nNoiseContinueCountIsWarn && nNoiseContinueCountPercent == other.nNoiseContinueCountPercent && std::abs(dThresholdSlient - other.dThresholdSlient) <= despipe && std::abs(dThresholdDB - other.dThresholdDB) <= despipe && std::abs(dThresholdCV - other.dThresholdCV) <= despipe && nPerseg == other.nPerseg && nOverlap == other.nOverlap && nFFT == other.nFFT ) { return true; } return false; } bool DatabaseConfig_t::operator==(const DatabaseConfig_t &other) const { if(&other == this) { return true; // 自身比较 } if( nRecordLogRetain == other.nRecordLogRetain && nOperatorLogRetain == other.nOperatorLogRetain && nRecordFileRetain == other.nRecordFileRetain && nClientPort == other.nClientPort && nListenPort == other.nListenPort && strRecordFilePath == other.strRecordFilePath && strFtpPath == other.strFtpPath ) { return true; } return false; }