예제 #1
0
파일: LogTester.cpp 프로젝트: diverger/dnp3
int LogTester::NextErrorCode()
{
	LogEntry le;
	while(mBuffer.ReadLog(le))
	{		
		if(le.GetErrorCode() >= 0) return le.GetErrorCode();
	}
	return -1;
}
예제 #2
0
파일: LogTester.cpp 프로젝트: diverger/dnp3
int LogTester::ClearLog()
{
	int max = -1;
	LogEntry le;
	while(mBuffer.ReadLog(le)) {
		if(le.GetErrorCode() > max) max = le.GetErrorCode();
	}

	return max;
}
예제 #3
0
int LogTester::NextErrorCode()
{
	LogEntry le;
	while(!mBuffer.empty()) {
		le = mBuffer.front();
		mBuffer.pop();
		if(le.GetErrorCode() >= 0) {						
			return le.GetErrorCode();
		}
	}
	return -1;
}
예제 #4
0
파일: Log.cpp 프로젝트: AlanMarshall/dnp3-1
void EventLog::Log( const LogEntry& arEntry )
{
	SubscriberMap::iterator i = mSubscribers.begin();
	for(; i != mSubscribers.end(); ++i) {
		if(this->SetContains(i->second, -1) || this->SetContains(i->second, arEntry.GetErrorCode())) {
			i->first->Log(arEntry);
		}
	}
}
예제 #5
0
int LogTester::ClearLog()
{
	int max = -1;
	LogEntry le;
	while(!mBuffer.empty()) {		
		if(mBuffer.front().GetErrorCode() > max) max = le.GetErrorCode();
		mBuffer.pop();
	}

	return max;
}