22 RUNLOG(
"RunWrite: could not open output port")
23 fprintf(stderr,
"RunWrite: could not open output port\n");
30 fprintf(stderr,
"RunWrite: could not mmake connection with the logger\n");
36 std::string tag=std::string(
"[")+
wPortName+std::string(
"]");
40 if (!fgets(txt, 2048, stdin) || ferror(stdin) || feof(stdin)) {
69 RUNLOG(
"RunRead: could not open input port")
70 fprintf(stderr,
"RunRead: could not open input port\n");
79 RUNLOG(
"!rPort.read(bot, true)")
93 printf(
"%s\n", bot.
toString().c_str());
114 RUNLOG(
"RunReadWrite: could not open input port")
115 fprintf(stderr,
"RunReadWrite: could not open input port\n");
129 tag=std::string(
"[")+
fPortName+std::string(
"]");
132 RUNLOG(
"RunReadWrite: could not open forward port")
133 fprintf(stderr,
"RunReadWrite: could not open forward port\n");
143 if (yarp::os::impl::getppid()!=1)
152 if (yarp::os::impl::getppid() == 1) {
161 RUNLOG(
"!rPort.read(bot, true)")
170 if (yarp::os::impl::getppid() == 1) {
190 printf(
"%s\n", bot.
toString().c_str());
215 int warn_suppress = yarp::run::impl::pipe(term_pipe);
217 yarp::run::impl::dup2(term_pipe[0], STDIN_FILENO);
218 FILE* file_term_pipe=fdopen(term_pipe[1],
"w");
219 fprintf(file_term_pipe,
"SHKIATTETE!\n");
220 fflush(file_term_pipe);
221 fclose(file_term_pipe);
238 RUNLOG(
"RunReadWrite: could not open output port")
239 fprintf(stderr,
"RunReadWrite: could not open output port\n");
253 if (yarp::os::impl::getppid() == 1) {
258 if (!fgets(txt, 2048, stdin) || ferror(stdin) || feof(stdin)) {
265 if (yarp::os::impl::getppid() == 1) {
279 RUNLOG(
"<<<wPort.write(bot)")
281 RUNLOG(
">>>wPort.write(bot)")
void run() override
Main body of the new thread.
A simple collection of objects that can be described and transmitted in a portable way.
size_type size() const
Gets the number of elements in the bottle.
Value & get(size_type index) const
Reads a Value v from a certain part 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.
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 bool exists(const std::string &port, bool quiet=true, bool checkVer=true)
Check for a port to be ready and responsive.
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
bool read(PortReader &reader, bool willReply=false) override
Read an object from the port.
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.
bool start()
Start the new thread running.
virtual std::string asString() const
Get string value.