2 #include "ErrorHandler/MessageAnalyzer/ma_function_is_syncd.h"
3 #include "ErrorHandler/MessageAnalyzer/ma_condition.h"
5 #include <boost/lexical_cast.hpp>
7 using namespace novadaq::errorhandler;
22 std::string time_str = cond.get_msg_group(1);
23 std::string source = cond.get_msg_source();
29 time = boost::lexical_cast<uint64_t>(time_str);
31 catch( boost::bad_lexical_cast & )
33 return boost::any(
true);
38 if( sync_time.empty() || sync_time.find(source)!=sync_time.end() )
45 sync_time.insert(std::make_pair(source, time));
46 return boost::any(
false);
51 sync_time.insert(std::make_pair(source, time));
53 if( time<min ) min = time;
54 if( time>max ) max = time;
56 if( max-min > 5 )
return boost::any(
true);
57 else return boost::any(
false);