Classes | Macros | Functions | Variables
throttle.cpp File Reference
#include <cstdio>
#include <cstdlib>
#include <deque>
#include "topic_tools/shape_shifter.h"
#include "topic_tools/parse.h"
Include dependency graph for throttle.cpp:

Go to the source code of this file.

Classes

class  Sent
 

Macros

#define USAGE
 

Functions

void conn_cb (const ros::SingleSubscriberPublisher &)
 
void in_cb (const ros::MessageEvent< ShapeShifter > &msg_event)
 
bool is_latching (const boost::shared_ptr< const ros::M_string > &connection_header)
 
int main (int argc, char **argv)
 
void subscribe ()
 

Variables

bool g_advertised = false
 
uint32_t g_bps = 0
 
bool g_force_latch = false
 
bool g_force_latch_value = true
 
string g_input_topic
 
ros::Time g_last_time
 
bool g_lazy
 
ros::NodeHandleg_node = NULL
 
string g_output_topic
 
ros::Duration g_period
 
ros::Publisher g_pub
 
deque< Sentg_sent
 
ros::Subscriberg_sub
 
ros::TransportHints g_th
 
bool g_use_messages
 
bool g_use_wallclock
 
double g_window = 1.0
 

Macro Definition Documentation

◆ USAGE

#define USAGE
Value:
"\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 171 of file throttle.cpp.

Function Documentation

◆ conn_cb()

void conn_cb ( const ros::SingleSubscriberPublisher )

Definition at line 81 of file throttle.cpp.

◆ in_cb()

void in_cb ( const ros::MessageEvent< ShapeShifter > &  msg_event)

Definition at line 107 of file throttle.cpp.

◆ is_latching()

bool is_latching ( const boost::shared_ptr< const ros::M_string > &  connection_header)

Definition at line 92 of file throttle.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 181 of file throttle.cpp.

◆ subscribe()

void subscribe ( )

Definition at line 76 of file throttle.cpp.

Variable Documentation

◆ g_advertised

bool g_advertised = false

Definition at line 51 of file throttle.cpp.

◆ g_bps

uint32_t g_bps = 0

Definition at line 48 of file throttle.cpp.

◆ g_force_latch

bool g_force_latch = false

Definition at line 60 of file throttle.cpp.

◆ g_force_latch_value

bool g_force_latch_value = true

Definition at line 61 of file throttle.cpp.

◆ g_input_topic

string g_input_topic

Definition at line 53 of file throttle.cpp.

◆ g_last_time

ros::Time g_last_time

Definition at line 57 of file throttle.cpp.

◆ g_lazy

bool g_lazy

Definition at line 59 of file throttle.cpp.

◆ g_node

ros::NodeHandle* g_node = NULL

Definition at line 47 of file throttle.cpp.

◆ g_output_topic

string g_output_topic

Definition at line 52 of file throttle.cpp.

◆ g_period

ros::Duration g_period

Definition at line 49 of file throttle.cpp.

◆ g_pub

Definition at line 54 of file throttle.cpp.

◆ g_sent

deque<Sent> g_sent

Definition at line 71 of file throttle.cpp.

◆ g_sub

Definition at line 55 of file throttle.cpp.

◆ g_th

Definition at line 62 of file throttle.cpp.

◆ g_use_messages

bool g_use_messages

Definition at line 56 of file throttle.cpp.

◆ g_use_wallclock

bool g_use_wallclock

Definition at line 58 of file throttle.cpp.

◆ g_window

double g_window = 1.0

Definition at line 50 of file throttle.cpp.



topic_tools
Author(s): Morgan Quigley, Brian Gerkey, Dirk Thomas
autogenerated on Mon Feb 28 2022 23:34:17