4 #ifndef ROSBAG_FANCY_TOPIC_CONFIG_MANAGER_H 5 #define ROSBAG_FANCY_TOPIC_CONFIG_MANAGER_H 66 static constexpr
float LOG05 = -0.6931471805599453f;
76 bytesInStatsPeriod += bytes;
80 float expL = std::exp(-DECAY * tDelta);
82 lambdaSmoothLast = DECAY * tDelta * expL * lambdaLast + expL *
lambdaSmoothLast;
84 lastMessageTime = time;
91 float expL = std::exp(-DECAY * tDelta);
94 float t0Delta = (time -
T0).toSec();
95 float S = (1.0f + DECAY * t0Delta) * std::exp(-DECAY * t0Delta);
97 return (DECAY * tDelta * expL * lambdaLast + expL * lambdaSmoothLast) / (1.0f - S);
109 void addTopic(
const std::string& topic,
float rateLimit = 0.0
f,
int flags = 0);
111 void updateStatistics();
decltype(sizeof(void *)) typede size_t)
std::vector< Topic > m_topics
Topic(const std::string &name, std::size_t id, float rateLimit=0.0f, int flags=0)
unsigned int numPublishers
std::vector< Topic > & topics()
static const ros::WallTime T0
static constexpr float HALF_LIFE
Topic & operator=(const Topic &other)=delete
void notifyMessage(std::uint64_t bytes)
std::uint64_t bytesInStatsPeriod
float messageRateAt(const ros::WallTime &time)
std::uint64_t totalMessages
std::uint64_t dropCounter
ros::Time lastMessageReceivedROSTime
std::uint64_t messagesInStatsPeriod
ros::WallTime lastMessageTime
ros::Time lastMessageROSTime
static constexpr float LOG05
static constexpr float DECAY