83 sigma = tot2 / ct - mu * mu;
119 if (target !=
nullptr) {
126 this->target = target;
151 accumConnect.
add(lastConnect);
162 " %s connection time (%s with name lookup)\n",
167 " %s +/- %s on average (%s +/- %s with name lookup)\n",
186 }
else if (t > 1
e-3) {
189 }
else if (t > 1
e-6) {
192 }
else if (t > 1
e-9) {
197 std::snprintf(buf,
sizeof(buf),
"%.*f%s",
decimal, t * times,
unit.c_str());
219 bool ok = b.
read(connection);
224 double dt = now - lastTime;
229 "Period is %g +/- %g (%d)\n",
250 "Period is %g +/- %g (%d)\n",
259 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.
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.
bool setTarget(const char *target)
Ping(const char *target=nullptr)
static std::string renderTime(double t, int space, int decimal)
ConnectResult getAverageConnect()
ConnectResult getLastConnect()
virtual return_getAdminProtocolVersion getAdminProtocolVersion()
Report the version of the administrative protocol of this port (it is distinct from the version of th...
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)
Client side of the administrative commands defined in PortCoreMsgs.thrift and handled by PortCore::ad...
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_OS_LOG_COMPONENT(name, name_string)
An interface to the operating system, including Port based communication.