YARP
Yet Another Robot Platform
UnbufferedContactable.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_UNBUFFEREDCONTACTABLE_H
10 #define YARP_OS_UNBUFFEREDCONTACTABLE_H
11 
12 #include <yarp/os/Contactable.h>
13 
14 
15 namespace yarp {
16 namespace os {
17 
22 {
23 public:
33  virtual bool write(const PortWriter& writer,
34  const PortWriter* callback = nullptr) const = 0;
35 
47  virtual bool write(const PortWriter& writer,
48  PortReader& reader,
49  const PortWriter* callback = nullptr) const = 0;
50 
59  virtual bool read(PortReader& reader, bool willReply = false) = 0;
60 
71  virtual bool reply(PortWriter& writer) = 0;
72 
83  virtual bool replyAndDrop(PortWriter& writer) = 0;
84 };
85 
86 } // namespace os
87 } // namespace yarp
88 
89 #endif // YARP_OS_UNBUFFEREDCONTACTABLE_H
yarp::os::UnbufferedContactable::write
virtual bool write(const PortWriter &writer, PortReader &reader, const PortWriter *callback=nullptr) const =0
Write an object to the port, then expect one back.
yarp::os::UnbufferedContactable
An abstract unbuffered port.
Definition: UnbufferedContactable.h:22
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::UnbufferedContactable::write
virtual bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const =0
Write an object to the port.
yarp::os::PortReader
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:28
yarp::os::UnbufferedContactable::replyAndDrop
virtual bool replyAndDrop(PortWriter &writer)=0
Same as reply(), but closes connection after reply.
yarp::os::UnbufferedContactable::reply
virtual bool reply(PortWriter &writer)=0
Send an object as a reply to an object read from the port.
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::os::UnbufferedContactable::read
virtual bool read(PortReader &reader, bool willReply=false)=0
Read an object from the port.
Contactable.h
yarp::os::Contactable
An abstract port.
Definition: Contactable.h:38