36 void start(
const char *hostname,
int portnum) {
37 this->hostname = hostname;
38 this->portnum = portnum;
45 while (!done.
check()) {
70 bool ok = cmd.
read(reader);
71 if (!ok)
return false;
80 if (writer==NULL) {
return false; }
const yarp::os::LogComponent & TCPROSCARRIER()
yarp::os::Contact where()
void start(const char *hostname, int portnum)
bool read(yarp::os::ConnectionReader &reader) override
Read this object from a network connection.
A simple collection of objects that can be described and transmitted in a portable way.
Bottle & addList()
Places an empty nested list 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.
bool write(ConnectionWriter &writer) const override
Output a representation of the bottle to a network connection.
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
void addString(const char *str)
Places a string in the bottle, at the end of the list.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
An interface for reading from a network connection.
virtual ConnectionWriter * getWriter()=0
Gets a way to reply to the message, if possible.
An interface for writing to a network connection.
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.
Contact where() const override
Returns information about how this port can be reached.
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.
A class for thread synchronization and mutual exclusion.
bool check()
Decrement the counter, unless that would require waiting.
void post()
Increment the counter.
static void delaySystem(double seconds)
#define yCDebug(component,...)
void delay(double seconds)
Wait for a certain number of seconds.