|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
31 if (name ==
nullptr) {
37 if (s.find(
"/quit") == std::string::npos) {
55 yCError(TERMINATOR,
"Terminator port not found");
67 #define TermineeHelper Port
68 #define HELPER(x) (*((TermineeHelper*)(x)))
74 if (name ==
nullptr) {
76 yCError(TERMINATOR,
"Terminator: Please supply a proper port name");
93 yCError(TERMINATOR,
"Kill port conflict: make sure you supply a distinct --name /PORTNAME");
125 while (!isStopping() && !quit) {
128 bool ok = helper.
read(cmd,
true);
A simple collection of objects that can be described and transmitted in a portable way.
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
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.
virtual ~Terminee()
Destructor.
Simple Readable and Writable object representing a command to a YARP port.
void onStop() override
Call-back, called while halting the thread (before join).
bool waitQuit() const
Call this method to wait for a quit message.
void run() override
Main body of the new thread.
static Contact queryName(const std::string &name)
Find out information about a registered name.
bool isOk() const
Check whether the message mechanism is ok.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
bool mustQuit() const
Call this method to see whether a quit message has been received.
virtual std::string asString() const
Get string value.
void addVocab(int x)
Places a vocabulary item in the bottle, at the end of the list.
classes to handle graceful process termination.
static bool terminateByName(const char *name)
Send a quit message to a specific socket port.
#define yCAssert(component, x)
#define yCError(component,...)
An interface to the operating system, including Port based communication.
Terminee(const char *name)
Constructor.
bool read(ConnectionReader &reader) override
Set the bottle's value based on input from a network connection.
RandScalar * implementation(void *t)
static int sendMessage(const std::string &port, yarp::os::PortWriter &writable, bool silent=false)
Just a reminder to sendMessage with temporary output parameter that will be discarded.
#define YARP_OS_LOG_COMPONENT(name, name_string)
The components from which ports and connections are built.