YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
AbstractContactable.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_ABSTRACTCONTACTABLE_H
7#define YARP_OS_ABSTRACTCONTACTABLE_H
8
9#include <yarp/os/Port.h>
11
12namespace yarp::os {
13
24{
25
26public:
30 virtual Port& asPort() = 0;
31
35 virtual const Port& asPort() const = 0;
36
37 // Documented in Contactable
38 bool open(const std::string& name) override;
39
40 // Documented in Contactable
41 bool open(const Contact& contact, bool registerName = true) override;
42
43 // Documented in Contactable
44 bool addOutput(const std::string& name) override;
45
46 // Documented in Contactable
47 bool addOutput(const std::string& name, const std::string& carrier) override;
48
49 // Documented in Contactable
50 bool addOutput(const Contact& contact) override;
51
52 // Documented in Contactable
53 void close() override;
54
55 // Documented in Contactable
56 void interrupt() override;
57
58 // Documented in Contactable
59 void resume() override;
60
61 // Documented in Contactable
62 Contact where() const override;
63
64 // Documented in Contactable
65 std::string getName() const override;
66
67 // Documented in Contactable
68 bool setEnvelope(PortWriter& envelope) override;
69
70 // Documented in Contactable
71 bool getEnvelope(PortReader& envelope) override;
72
73 // Documented in Contactable
74 int getInputCount() override;
75
76 // Documented in Contactable
77 int getOutputCount() override;
78
79 // Documented in Contactable
80 void getReport(PortReport& reporter) override;
81
82 // Documented in Contactable
83 void setReporter(PortReport& reporter) override;
84
85 // Documented in Contactable
86 void resetReporter() override;
87
88 // Documented in Contactable
89 bool isWriting() override;
90
91 // Documented in Contactable
92 void setReader(PortReader& reader) override;
93
94 // Documented in Contactable
95 void setAdminReader(PortReader& reader) override;
96
97 // Documented in Contactable
98 void setInputMode(bool expectInput) override;
99
100 // Documented in Contactable
101 void setOutputMode(bool expectOutput) override;
102
103 // Documented in Contactable
104 void setRpcMode(bool expectRpc) override;
105
106 // Documented in Contactable
107 Type getType() override;
108
109 // Documented in Contactable
110 void promiseType(const Type& typ) override;
111
112 // Documented in Contactable
113 Property* acquireProperties(bool readOnly) override;
114
115 // Documented in Contactable
116 void releaseProperties(Property* prop) override;
117
118 // Documented in UnbufferedContactable
119 bool write(const PortWriter& writer,
120 const PortWriter* callback = nullptr) const override;
121
122 // Documented in UnbufferedContactable
123 bool write(const PortWriter& writer,
124 PortReader& reader,
125 const PortWriter* callback = nullptr) const override;
126
127 // Documented in UnbufferedContactable
128 bool read(PortReader& reader, bool willReply = false) override;
129
130 // Documented in UnbufferedContactable
131 bool reply(PortWriter& writer) override;
132
133 // Documented in UnbufferedContactable
134 bool replyAndDrop(PortWriter& writer) override;
135
136 // Documented in Contactable
137 void includeNodeInName(bool flag) override;
138
139 // Documented in Contactable
140 bool setCallbackLock(std::mutex* mutex = nullptr) override;
141
142 // Documented in Contactable
143 bool removeCallbackLock() override;
144
145 // Documented in Contactable
146 bool lockCallback() override;
147
148 // Documented in Contactable
149 bool tryLockCallback() override;
150
151 // Documented in Contactable
152 void unlockCallback() override;
153};
154
155} // namespace yarp::os
156
157#endif // YARP_OS_ABSTRACTCONTACTABLE_H
A default implementation of an abstract port.
virtual Port & asPort()=0
Get the concrete Port being used for communication.
virtual const Port & asPort() const =0
Get the concrete Port being used for communication, const version.
A mini-server for performing network communication in the background.
Represents how to reach a part of a YARP network.
Definition Contact.h:33
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition PortReader.h:24
A base class for objects that want information about port status changes.
Definition PortReport.h:25
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition PortWriter.h:23
A mini-server for network communication.
Definition Port.h:46
A class for storing options and configuration information.
Definition Property.h:33
An abstract unbuffered port.
An interface to the operating system, including Port based communication.
#define YARP_os_API
Definition api.h:18