YARP
Yet Another Robot Platform
WireLink.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_OS_WIRELINK_H
10 #define YARP_OS_WIRELINK_H
11 
12 #include <yarp/os/api.h>
13 
14 #include <string>
15 
16 namespace yarp {
17 namespace os {
18 
19 class PortReader;
20 class PortWriter;
21 class UnbufferedContactable;
22 
27 {
28 public:
29  WireLink();
30 
31  ~WireLink();
32 
39  bool isValid() const;
40 
48  bool setOwner(yarp::os::PortReader& owner);
49 
55  bool attachAsClient(yarp::os::UnbufferedContactable& port);
56 
63  bool attachAsClient(yarp::os::PortReader& reader);
64 
70  bool attachAsServer(yarp::os::UnbufferedContactable& port);
71 
77  bool setStreamingMode(bool streaming);
78 
84  bool write(PortWriter& writer);
85 
92  bool write(PortWriter& writer, PortReader& reader);
93 
102  bool callback(PortWriter& writer, PortReader& reader, const std::string& tag = "");
103 
107  bool canWrite() const;
108 
112  bool canRead() const;
113 
114 #ifndef DOXYGEN_SHOULD_SKIP_THIS
115 private:
116  class Private;
117  Private* mPriv;
118 #endif // DOXYGEN_SHOULD_SKIP_THIS
119 };
120 
121 } // namespace os
122 } // namespace yarp
123 
124 #endif // YARP_OS_WIRELINK_H
yarp::os::Time::isValid
bool isValid()
Check if time is valid (non-zero).
Definition: Time.cpp:317
yarp::os::UnbufferedContactable
An abstract unbuffered port.
Definition: UnbufferedContactable.h:22
api.h
YARP_os_API
#define YARP_os_API
Definition: api.h:19
yarp::os::PortWriter
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:27
yarp::os::PortReader
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:28
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::sig::file::write
bool write(const ImageOf< PixelRgb > &src, const std::string &dest, image_fileformat format=FORMAT_PPM)
Definition: ImageFile.cpp:971