#include <cstdio>
#include <cstdlib>
#include <deque>
#include "topic_tools/shape_shifter.h"
#include "topic_tools/parse.h"
Go to the source code of this file.
Classes | |
class | Sent |
Defines | |
#define | USAGE |
Functions | |
void | in_cb (const boost::shared_ptr< ShapeShifter const > &msg) |
int | main (int argc, char **argv) |
Variables | |
static bool | g_advertised = false |
static uint32_t | g_bps = 0 |
static ros::Time | g_last_time |
static ros::NodeHandle * | g_node = NULL |
static string | g_output_topic |
static ros::Duration | g_period |
static ros::Publisher | g_pub |
deque< Sent > | g_sent |
static bool | g_use_messages |
static double | g_window = 1.0 |
#define USAGE |
"\nusage: \n"\ " throttle messages IN_TOPIC MSGS_PER_SEC [OUT_TOPIC]]\n"\ "OR\n"\ " throttle bytes IN_TOPIC BYTES_PER_SEC WINDOW [OUT_TOPIC]]\n\n"\ " This program will drop messages from IN_TOPIC so that either: the \n"\ " average bytes per second on OUT_TOPIC, averaged over WINDOW \n"\ " seconds, remains below BYTES_PER_SEC, or: the minimum inter-message\n"\ " period is 1/MSGS_PER_SEC. The messages are output \n"\ " to OUT_TOPIC, or (if not supplied), to IN_TOPIC_throttle.\n\n"
Definition at line 102 of file throttle.cpp.
void in_cb | ( | const boost::shared_ptr< ShapeShifter const > & | msg | ) |
Definition at line 67 of file throttle.cpp.
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 112 of file throttle.cpp.
bool g_advertised = false [static] |
Definition at line 51 of file throttle.cpp.
uint32_t g_bps = 0 [static] |
Definition at line 48 of file throttle.cpp.
ros::Time g_last_time [static] |
Definition at line 55 of file throttle.cpp.
ros::NodeHandle* g_node = NULL [static] |
Definition at line 47 of file throttle.cpp.
string g_output_topic [static] |
Definition at line 52 of file throttle.cpp.
ros::Duration g_period [static] |
Definition at line 49 of file throttle.cpp.
ros::Publisher g_pub [static] |
Definition at line 53 of file throttle.cpp.
Definition at line 65 of file throttle.cpp.
bool g_use_messages [static] |
Definition at line 54 of file throttle.cpp.
double g_window = 1.0 [static] |
Definition at line 50 of file throttle.cpp.