YARP
Yet Another Robot Platform
RpcClient.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_OS_RPCCLIENT_H
11 #define YARP_OS_RPCCLIENT_H
12 
14 
15 namespace yarp {
16 namespace os {
17 
26 {
27 public:
31  RpcClient();
32 
36  ~RpcClient() override;
37 
38  // Non-copyable
39  RpcClient(const RpcClient& alt) = delete;
40  const RpcClient& operator=(const RpcClient& alt) = delete;
41 
42  // documented in UnbufferedContactable
43  bool read(PortReader& reader, bool willReply = false) override;
44 
45  // documented in UnbufferedContactable
46  bool reply(PortWriter& writer) override;
47 
48  // documented in UnbufferedContactable
49  bool replyAndDrop(PortWriter& writer) override;
50 
51  void setInputMode(bool expectInput) override;
52  void setOutputMode(bool expectOutput) override;
53  void setRpcMode(bool expectRpc) override;
54 
55  Port& asPort() override;
56  const Port& asPort() const override;
57 
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59 private:
60  class Private;
61  Private* mPriv;
62 #endif // DOXYGEN_SHOULD_SKIP_THIS
63 };
64 
65 } // namespace os
66 } // namespace yarp
67 
68 #endif // YARP_OS_RPCCLIENT_H
A default implementation of an abstract port.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition: PortReader.h:28
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition: PortWriter.h:27
A mini-server for network communication.
Definition: Port.h:50
A port that is specialized as an RPC client.
Definition: RpcClient.h:26
const RpcClient & operator=(const RpcClient &alt)=delete
RpcClient(const RpcClient &alt)=delete
bool read(ImageOf< PixelRgb > &dest, const std::string &src, image_fileformat format=FORMAT_ANY)
Definition: ImageFile.cpp:920
The main, catch-all namespace for YARP.
Definition: dirs.h:19
#define YARP_os_API
Definition: api.h:21