YARP
Yet Another Robot Platform
WireLink.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_OS_WIRELINK_H
7#define YARP_OS_WIRELINK_H
8
9#include <yarp/os/api.h>
10
11#include <string>
12
13namespace yarp::os {
14
15class PortReader;
16class PortWriter;
17class UnbufferedContactable;
18
23{
24public:
25 WireLink();
26
27 ~WireLink();
28
35 bool isValid() const;
36
44 bool setOwner(yarp::os::PortReader& owner);
45
51 bool attachAsClient(yarp::os::UnbufferedContactable& port);
52
59 bool attachAsClient(yarp::os::PortReader& reader);
60
66 bool attachAsServer(yarp::os::UnbufferedContactable& port);
67
73 bool setStreamingMode(bool streaming);
74
80 bool write(PortWriter& writer);
81
88 bool write(const PortWriter& writer, PortReader& reader) const;
89
98 bool callback(PortWriter& writer, PortReader& reader, const std::string& tag = "");
99
103 bool canWrite() const;
104
108 bool canRead() const;
109
110#ifndef DOXYGEN_SHOULD_SKIP_THIS
111private:
112 class Private;
113 Private* mPriv;
114#endif // DOXYGEN_SHOULD_SKIP_THIS
115};
116
117} // namespace yarp::os
118
119#endif // YARP_OS_WIRELINK_H
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:24
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:23
An abstract unbuffered port.
bool isValid()
Check if time is valid (non-zero).
Definition: Time.cpp:314
An interface to the operating system, including Port based communication.
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:1091
#define YARP_os_API
Definition: api.h:18