diff --git a/src/pub_sub_stream/dc_stats.cc b/src/pub_sub_stream/dc_stats.cc index 7458cb44f17167f1336dd52c2210d660eaefcec5..e2011bee2ea55c90a3997a1b28268ebdb0384261 100644 --- a/src/pub_sub_stream/dc_stats.cc +++ b/src/pub_sub_stream/dc_stats.cc @@ -202,7 +202,7 @@ DCStats::DCStats( std::vector< SimplePV >& pvs, } total_chans_ = boost::accumulate( channels_, 0, count_data_channels ); - channel_config_hash_ = static_cast< int >( crc.result( ) ); + channel_config_hash_ = static_cast< double >( crc.result( ) ); std::cerr << "Loaded " << channels_.size( ) << " tp + channels" << std::endl; @@ -250,7 +250,7 @@ DCStats::DCStats( std::vector< SimplePV >& pvs, } ); pvs.emplace_back( SimplePV{ "PRDCR_DATA_CRC", - SIMPLE_PV_INT, + SIMPLE_PV_DOUBLE, reinterpret_cast< void* >( &data_crc_ ), std::numeric_limits< int >::max( ), std::numeric_limits< int >::min( ), @@ -259,7 +259,7 @@ DCStats::DCStats( std::vector< SimplePV >& pvs, } ); pvs.emplace_back( SimplePV{ "CHANNEL_LIST_CHECK_SUM", - SIMPLE_PV_INT, + SIMPLE_PV_DOUBLE, reinterpret_cast< void* >( &channel_config_hash_ ), std::numeric_limits< int >::max( ), std::numeric_limits< int >::min( ), @@ -297,10 +297,10 @@ DCStats::DCStats( std::vector< SimplePV >& pvs, "PRDCR_UNIQUE_DCU_REPORTED_PER_S", SIMPLE_PV_INT, reinterpret_cast< void* >( &unique_dcus_per_sec_ ), - static_cast< int >( dcus.size( ) ) + 1, - static_cast< int >( dcus.size( ) ) - 1, - static_cast< int >( dcus.size( ) ) + 1, - static_cast< int >( dcus.size( ) ) - 1, + static_cast< double >( dcus.size( ) ) + 1, + static_cast< double >( dcus.size( ) ) - 1, + static_cast< double >( dcus.size( ) ) + 1, + static_cast< double >( dcus.size( ) ) - 1, } ); pvs.emplace_back( SimplePV{ "DATA_RATE", @@ -315,10 +315,10 @@ DCStats::DCStats( std::vector< SimplePV >& pvs, "TOTAL_CHANS", SIMPLE_PV_INT, reinterpret_cast< void* >( &total_chans_ ), - total_chans_ + 1, - total_chans_ - 1, - total_chans_ + 1, - total_chans_ - 1, + static_cast< double >( total_chans_ + 1 ), + static_cast< double >( total_chans_ - 1 ), + static_cast< double >( total_chans_ + 1 ), + static_cast< double >( total_chans_ - 1 ), } ); pvs.emplace_back( SimplePV{ "PRDCR_OPEN_TP_COUNT", @@ -733,7 +733,7 @@ DCStats::run( simple_pv_handle epics_server ) total_data_crc.add( &( entry.second ), sizeof( entry.second ) ); } ); - data_crc_ = static_cast< unsigned int >( total_data_crc.result( ) ); + data_crc_ = static_cast< double >( total_data_crc.result( ) ); } // we can either do this off of our counter or off of the diff --git a/src/pub_sub_stream/dc_stats.hh b/src/pub_sub_stream/dc_stats.hh index 449f13916a00f338fc2ead105c00ab38284d5c62..905f21cbbf9ea981a607af1ae49ab3ae36342d1e 100644 --- a/src/pub_sub_stream/dc_stats.hh +++ b/src/pub_sub_stream/dc_stats.hh @@ -147,8 +147,8 @@ private: int not_stalled_{ 0 }; int uptime_{ 0 }; unsigned int gpstime_{ 0 }; - int data_crc_{ 0 }; - int channel_config_hash_{ 0 }; + double data_crc_{ 0 }; + double channel_config_hash_{ 0 }; int unique_dcus_per_sec_{ 0 }; int data_rate_{ 0 }; int total_chans_{ 0 };