123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- #include "SystemConfigStruct.h"
- /* =============================================================================
- * 基础配置结构体
- * ============================================================================= */
- 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 &&
- strAiCompareDir == other.strAiCompareDir)
- {
- 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 &&
- nNoiseDetectDuration == other.nNoiseDetectDuration &&
- 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( strRegitrationCode == other.strRegitrationCode &&
- nNoiseDetectContinueCount == other.nNoiseDetectContinueCount &&
- nNoiseContinueCountIsWarn == other.nNoiseContinueCountIsWarn &&
- nNoiseContinueCountPercent == other.nNoiseContinueCountPercent &&
- nFreqComponentMini == other.nFreqComponentMini &&
- nFreqComponentMax == other.nFreqComponentMax &&
- fOneDBThreshold == other.fOneDBThreshold &&
- nOneDBComponentMini == other.nOneDBComponentMini &&
- fNoiseThreshold == other.fNoiseThreshold &&
- nNoiseComponentMini == other.nNoiseComponentMini &&
- nNoiseDetectDuration == other.nNoiseDetectDuration &&
- nNoiseDetectPercent == other.nNoiseDetectPercent &&
- nNoiseDBMax == other.nNoiseDBMax
- )
- {
- 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
- )
- {
- return true;
- }
- return false;
- }
|