YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ShiftStream.h
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 */
6
7#ifndef YARP_OS_SHIFTSTREAM_H
8#define YARP_OS_SHIFTSTREAM_H
9
11
12namespace yarp::os {
13
22{
23public:
28
32 virtual ~ShiftStream();
33
37 virtual void check() const;
38
39 InputStream& getInputStream() override;
40 OutputStream& getOutputStream() override;
41
42 const Contact& getLocalAddress() const override;
43 const Contact& getRemoteAddress() const override;
44
45 void close() override;
46
52 virtual void takeStream(TwoWayStream* stream);
53
60 virtual TwoWayStream* giveStream();
61
66 virtual TwoWayStream* getStream() const;
67
71 virtual bool isEmpty() const;
72
73 bool isOk() const override;
74
75 void reset() override;
76
77 void beginPacket() override;
78
79 void endPacket() override;
80
81#ifndef DOXYGEN_SHOULD_SKIP_THIS
82private:
83 class Private;
84 Private* mPriv;
85#endif // DOXYGEN_SHOULD_SKIP_THIS
86};
87
88} // namespace yarp::os
89
90#endif // YARP_OS_SHIFTSTREAM_H
Represents how to reach a part of a YARP network.
Definition Contact.h:33
Simple specification of the minimum functions needed from input streams.
Definition InputStream.h:25
Simple specification of the minimum functions needed from output streams.
A container for a stream, allowing the stream implementation to be replaced when needed.
Definition ShiftStream.h:22
A stream which can be asked to perform bidirectional communication.
An interface to the operating system, including Port based communication.
#define YARP_os_API
Definition api.h:18