ThrottleDown
: Portmonitor plugin for reducing the throughput of a port connection, decimating the transmitted messages.
More...
Public Member Functions | |
bool | create (const yarp::os::Property &options) override |
This will be called when the dll is properly loaded by the portmonitor carrier. | |
void | destroy () override |
This will be called when the portmonitor object destroyes. | |
bool | setparam (const yarp::os::Property ¶ms) override |
This will be called when the portmonitor carrier parameters are set via YARP admin port. | |
bool | getparam (yarp::os::Property ¶ms) override |
This will be called when the portmonitor carrier parameters are requested via YARP admin port. | |
bool | accept (yarp::os::Things &thing) override |
This will be called when the data reach the portmonitor object. | |
yarp::os::Things & | update (yarp::os::Things &thing) override |
After data get accpeted in the accept() callback, an instance of that is given to the update function where the data can be accessed and modified. | |
void | getParamsFromCommandLine (std::string carrierString, yarp::os::Property &prop) |
![]() | |
virtual | ~MonitorObject () |
virtual void | trig () |
This will be called when one of the peer connections to the same import port receives data. | |
virtual yarp::os::Things & | updateReply (yarp::os::Things &thing) |
The updateReply makes it possible to modify a reply from a port when the portmonitor object is attached to a two-ways connection (e.g., RPC). | |
ThrottleDown
: Portmonitor plugin for reducing the throughput of a port connection, decimating the transmitted messages.
For example, this portmonitor can be used to reduce a port streamed data from 10 to 1 message per second, reducing the overall bandwidth usage. Please note that this portmonitor can be attached to both the sender and the receiver port, however bandwidth consumption will be reduced only if the portmonitor is attached to the sender port.
Example usage: yarp write /test –period 0.01 yarp read ... /in yarp connect /test /in tcp+send.portmonitor+type.dll+file.throttleDown+period_ms.500
Definition at line 30 of file ThrottleDown.h.
|
overridevirtual |
This will be called when the data reach the portmonitor object.
thing | An instance of yarp::os::Thing object which can be used to typecast the data to the correct type. |
Reimplemented from yarp::os::MonitorObject.
Definition at line 107 of file ThrottleDown.cpp.
|
overridevirtual |
This will be called when the dll is properly loaded by the portmonitor carrier.
options | A set of useful information of the current connection which the monitor object is attached. |
Reimplemented from yarp::os::MonitorObject.
Definition at line 38 of file ThrottleDown.cpp.
This will be called when the portmonitor object destroyes.
Reimplemented from yarp::os::MonitorObject.
Definition at line 66 of file ThrottleDown.cpp.
|
overridevirtual |
This will be called when the portmonitor carrier parameters are requested via YARP admin port.
params | The Property |
Reimplemented from yarp::os::MonitorObject.
Definition at line 102 of file ThrottleDown.cpp.
void ThrottleDown::getParamsFromCommandLine | ( | std::string | carrierString, |
yarp::os::Property & | prop | ||
) |
Definition at line 70 of file ThrottleDown.cpp.
|
overridevirtual |
This will be called when the portmonitor carrier parameters are set via YARP admin port.
params | The Property |
Reimplemented from yarp::os::MonitorObject.
Definition at line 97 of file ThrottleDown.cpp.
|
overridevirtual |
After data get accpeted in the accept() callback, an instance of that is given to the update function where the data can be accessed and modified.
thing | An instance of yarp::os::Thing object which can be used to typecast the data to the correct type. |
Reimplemented from yarp::os::MonitorObject.
Definition at line 118 of file ThrottleDown.cpp.