YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ThrottleDown.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025-2025 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_PM_THROTTLEDOWN
7#define YARP_PM_THROTTLEDOWN
8
9#include <yarp/os/Property.h>
10#include <yarp/os/Things.h>
12
13#include <string>
14#include <vector>
15
31{
32 double m_last_time = 0;
33 double m_period = 1.0;
34
35public:
36 bool create(const yarp::os::Property& options) override;
37 void destroy() override;
38
39 bool setparam(const yarp::os::Property& params) override;
40 bool getparam(yarp::os::Property& params) override;
41
42 bool accept(yarp::os::Things& thing) override;
44
45 void getParamsFromCommandLine(std::string carrierString, yarp::os::Property& prop);
46};
47
48#endif // YARP_PM_THROTTLEDOWN
ThrottleDown: Portmonitor plugin for reducing the throughput of a port connection,...
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...
bool setparam(const yarp::os::Property &params) override
This will be called when the portmonitor carrier parameters are set via YARP admin port.
void getParamsFromCommandLine(std::string carrierString, yarp::os::Property &prop)
void destroy() override
This will be called when the portmonitor object destroyes.
bool create(const yarp::os::Property &options) override
This will be called when the dll is properly loaded by the portmonitor carrier.
bool getparam(yarp::os::Property &params) override
This will be called when the portmonitor carrier parameters are requested via YARP admin port.
A class for storing options and configuration information.
Definition Property.h:33
Base class for generic things.
Definition Things.h:18