Yet Another Robot Platform
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
10 using namespace yarp::os;
11 using namespace yarp::os::impl;
16 {
17  return {nullptr, 0};
18 }
21 {
22  YARP_UNUSED(parentConnectionReader);
23 }
26 {
27  auto* reader = new StreamConnectionReader();
28  Route r;
29  reader->reset(is, nullptr, r, 0, false);
30  return reader;
31 }
34 {
36  Route r;
37  reader.reset(is, nullptr, r, 0, false);
38  return portable.read(reader);
39 }
A simple abstraction for a block of bytes.
Definition: Bytes.h:24
An interface for reading from a network connection.
virtual void setParentConnectionReader(ConnectionReader *parentConnectionReader)
Set ConnectionReader to be used for reading the envelope.
static ConnectionReader * createConnectionReader(InputStream &is)
Create an instance of YARP's standard connection reader implementation.
virtual ~ConnectionReader()
virtual Bytes readEnvelope()
Read a message envelope, if available.
static bool readFromStream(PortReader &portable, InputStream &is)
Simple specification of the minimum functions needed from input streams.
Definition: InputStream.h:25
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:24
virtual bool read(ConnectionReader &reader)=0
Read this object from a network connection.
Information about a connection between two ports.
Definition: Route.h:28
Lets Readable objects read from the underlying InputStream associated with the connection between two...
void reset(yarp::os::InputStream &in, TwoWayStream *str, const Route &route, size_t len, bool textMode, bool bareMode=false)
The components from which ports and connections are built.
An interface to the operating system, including Port based communication.
#define YARP_UNUSED(var)
Definition: api.h:162