YARP
Yet Another Robot Platform
yarp::os::Ping Class Reference

Measure performance of a YARP port. More...

#include <yarp/os/Ping.h>

Detailed Description

Measure performance of a YARP port.

Can also be partially used for non-YARP ports with a compatible protocol.

Definition at line 72 of file Ping.h.

Public Member Functions

 Ping (const char *target=nullptr)
 
bool setTarget (const char *target)
 
void connect ()
 
void sample ()
 
void clear ()
 
ConnectResult getLastConnect ()
 
ConnectResult getAverageConnect ()
 
void report ()
 

Static Public Member Functions

static std::string renderTime (double t, int space, int decimal)
 

Private Attributes

std::string target
 
ConnectResult lastConnect
 
ConnectResult accumConnect
 

Constructor & Destructor Documentation

◆ Ping()

Ping::Ping ( const char *  target = nullptr)

Definition at line 113 of file Ping.cpp.

Member Function Documentation

◆ clear()

void Ping::clear ( )

Definition at line 249 of file Ping.cpp.

◆ connect()

void Ping::connect ( )

Definition at line 127 of file Ping.cpp.

◆ getAverageConnect()

ConnectResult Ping::getAverageConnect ( )

Definition at line 260 of file Ping.cpp.

◆ getLastConnect()

ConnectResult Ping::getLastConnect ( )

Definition at line 255 of file Ping.cpp.

◆ renderTime()

std::string Ping::renderTime ( double  t,
int  space,
int  decimal 
)
static

Definition at line 172 of file Ping.cpp.

◆ report()

void Ping::report ( )

Definition at line 151 of file Ping.cpp.

◆ sample()

void Ping::sample ( )

Definition at line 233 of file Ping.cpp.

◆ setTarget()

bool Ping::setTarget ( const char *  target)

Definition at line 120 of file Ping.cpp.

Member Data Documentation

◆ accumConnect

ConnectResult yarp::os::Ping::accumConnect
private

Definition at line 93 of file Ping.h.

◆ lastConnect

ConnectResult yarp::os::Ping::lastConnect
private

Definition at line 93 of file Ping.h.

◆ target

std::string yarp::os::Ping::target
private

Definition at line 92 of file Ping.h.


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