YARP
Yet Another Robot Platform
UnbufferedContactable.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_UNBUFFEREDCONTACTABLE_H
7#define YARP_OS_UNBUFFEREDCONTACTABLE_H
8
10
11
12namespace yarp::os {
13
18{
19public:
29 virtual bool write(const PortWriter& writer,
30 const PortWriter* callback = nullptr) const = 0;
31
43 virtual bool write(const PortWriter& writer,
44 PortReader& reader,
45 const PortWriter* callback = nullptr) const = 0;
46
55 virtual bool read(PortReader& reader, bool willReply = false) = 0;
56
67 virtual bool reply(PortWriter& writer) = 0;
68
79 virtual bool replyAndDrop(PortWriter& writer) = 0;
80};
81
82} // namespace yarp::os
83
84#endif // YARP_OS_UNBUFFEREDCONTACTABLE_H
An abstract port.
Definition: Contactable.h:28
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.
virtual bool write(const PortWriter &writer, PortReader &reader, const PortWriter *callback=nullptr) const =0
Write an object to the port, then expect one back.
virtual bool read(PortReader &reader, bool willReply=false)=0
Read an object from the port.
virtual bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const =0
Write an object to the port.
virtual bool reply(PortWriter &writer)=0
Send an object as a reply to an object read from the port.
virtual bool replyAndDrop(PortWriter &writer)=0
Same as reply(), but closes connection after reply.
An interface to the operating system, including Port based communication.
#define YARP_os_API
Definition: api.h:18