iCub-main
Public Member Functions | Protected Attributes | List of all members
iCub::ctrl::RateLimiter Class Reference

Rate Limiter. More...

#include <filters.h>

+ Inheritance diagram for iCub::ctrl::RateLimiter:

Public Member Functions

 RateLimiter (const yarp::sig::Vector &rL, const yarp::sig::Vector &rU)
 Creates a Rate Limiter which keeps the rate of the input within assigned thresholds. More...
 
virtual void init (const yarp::sig::Vector &u0)
 Init internal state. More...
 
void getLimits (yarp::sig::Vector &rL, yarp::sig::Vector &rU)
 Returns the current Rate limits. More...
 
void setLimits (const yarp::sig::Vector &rL, const yarp::sig::Vector &rU)
 Sets new Rate limits. More...
 
virtual const yarp::sig::Vector & filt (const yarp::sig::Vector &u)
 Limits the input rate. More...
 
virtual const yarp::sig::Vector & output () const
 Return current filter output. More...
 
- Public Member Functions inherited from iCub::ctrl::IFilter
virtual ~IFilter ()
 Destructor. More...
 

Protected Attributes

yarp::sig::Vector uD
 
yarp::sig::Vector uLim
 
yarp::sig::Vector rateUpperLim
 
yarp::sig::Vector rateLowerLim
 
size_t n
 

Detailed Description

Rate Limiter.

Definition at line 180 of file filters.h.

Constructor & Destructor Documentation

◆ RateLimiter()

RateLimiter::RateLimiter ( const yarp::sig::Vector &  rL,
const yarp::sig::Vector &  rU 
)

Creates a Rate Limiter which keeps the rate of the input within assigned thresholds.

Parameters
rLRate lower limit.
rURate upper limit.

Definition at line 168 of file filters.cpp.

Member Function Documentation

◆ filt()

const Vector & RateLimiter::filt ( const yarp::sig::Vector &  u)
virtual

Limits the input rate.

Parameters
uis the current input.
Returns
the output within the thresholds.

Implements iCub::ctrl::IFilter.

Definition at line 201 of file filters.cpp.

◆ getLimits()

void RateLimiter::getLimits ( yarp::sig::Vector &  rL,
yarp::sig::Vector &  rU 
)

Returns the current Rate limits.

Parameters
rLRate lower limit.
rURate upper limit.

Definition at line 185 of file filters.cpp.

◆ init()

void RateLimiter::init ( const yarp::sig::Vector &  u0)
virtual

Init internal state.

Parameters
u0new internal state.

Implements iCub::ctrl::IFilter.

Definition at line 178 of file filters.cpp.

◆ output()

virtual const yarp::sig::Vector& iCub::ctrl::RateLimiter::output ( ) const
inlinevirtual

Return current filter output.

Returns
the filter output.

Implements iCub::ctrl::IFilter.

Definition at line 232 of file filters.h.

◆ setLimits()

void RateLimiter::setLimits ( const yarp::sig::Vector &  rL,
const yarp::sig::Vector &  rU 
)

Sets new Rate limits.

Parameters
rLRate lower limit.
rURate upper limit.
Note
coherence between new limits length and the state length is not veriified.

Definition at line 193 of file filters.cpp.

Member Data Documentation

◆ n

size_t iCub::ctrl::RateLimiter::n
protected

Definition at line 188 of file filters.h.

◆ rateLowerLim

yarp::sig::Vector iCub::ctrl::RateLimiter::rateLowerLim
protected

Definition at line 186 of file filters.h.

◆ rateUpperLim

yarp::sig::Vector iCub::ctrl::RateLimiter::rateUpperLim
protected

Definition at line 185 of file filters.h.

◆ uD

yarp::sig::Vector iCub::ctrl::RateLimiter::uD
protected

Definition at line 183 of file filters.h.

◆ uLim

yarp::sig::Vector iCub::ctrl::RateLimiter::uLim
protected

Definition at line 184 of file filters.h.


The documentation for this class was generated from the following files: