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 
13 namespace yarp {
14 namespace os {
15 
16 class PortReader;
17 class PortWriter;
18 class UnbufferedContactable;
19 
24 {
25 public:
26  WireLink();
27 
28  ~WireLink();
29 
36  bool isValid() const;
37 
45  bool setOwner(yarp::os::PortReader& owner);
46 
52  bool attachAsClient(yarp::os::UnbufferedContactable& port);
53 
60  bool attachAsClient(yarp::os::PortReader& reader);
61 
67  bool attachAsServer(yarp::os::UnbufferedContactable& port);
68 
74  bool setStreamingMode(bool streaming);
75 
81  bool write(PortWriter& writer);
82 
89  bool write(const PortWriter& writer, PortReader& reader) const;
90 
99  bool callback(PortWriter& writer, PortReader& reader, const std::string& tag = "");
100 
104  bool canWrite() const;
105 
109  bool canRead() const;
110 
111 #ifndef DOXYGEN_SHOULD_SKIP_THIS
112 private:
113  class Private;
114  Private* mPriv;
115 #endif // DOXYGEN_SHOULD_SKIP_THIS
116 };
117 
118 } // namespace os
119 } // namespace yarp
120 
121 #endif // YARP_OS_WIRELINK_H
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:25
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:24
An abstract unbuffered port.
bool isValid()
Check if time is valid (non-zero).
Definition: Time.cpp:314
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:1099
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18