82 sigma = tot2 / ct - mu * mu;
118 if (target !=
nullptr) {
125 this->target = target;
152 accumConnect.
add(lastConnect);
163 " %s connection time (%s with name lookup)\n",
168 " %s +/- %s on average (%s +/- %s with name lookup)\n",
187 }
else if (t > 1
e-3) {
190 }
else if (t > 1
e-6) {
193 }
else if (t > 1
e-9) {
198 std::snprintf(buf,
sizeof(buf),
"%.*f%s",
decimal, t * times,
unit.c_str());
220 bool ok = b.
read(connection);
225 double dt = now - lastTime;
230 "Period is %g +/- %g (%d)\n",
251 "Period is %g +/- %g (%d)\n",
260 accumConnect.
clear();
bool read(ConnectionReader &connection) override
Read this object from a network connection.
A simple collection of objects that can be described and transmitted in a portable way.
void addVocab32(yarp::conf::vocab32_t x)
Places a vocabulary item in the bottle, at the end of the list.
bool read(ConnectionReader &reader) override
Set the bottle's value based on input from a network connection.
A mini-server for performing network communication in the background.
void add(const ConnectResult &alt)
An interface for reading from a network connection.
static bool connect(const std::string &src, const std::string &dest, const std::string &carrier="", bool quiet=true)
Request that an output port connect to an input port.
static Contact queryName(const std::string &name)
Find out information about a registered name.
static bool write(const Contact &contact, PortWriter &cmd, PortReader &reply, bool admin=false, bool quiet=false, double timeout=-1)
Send a single command to a port and await a single response.
bool setTarget(const char *target)
Ping(const char *target=nullptr)
static std::string renderTime(double t, int space, int decimal)
ConnectResult getAverageConnect()
ConnectResult getLastConnect()
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
A mini-server for network communication.
void setReader(PortReader &reader) override
Set an external reader for port data.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
void add(const RateResult &alt)
static double nowSystem()
static void delaySystem(double seconds)
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_OS_LOG_COMPONENT(name, name_string)
An interface to the operating system, including Port based communication.