YARP
Yet Another Robot Platform
Carriers.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_CARRIERS_H
8 #define YARP_OS_CARRIERS_H
9 
10 #include <yarp/os/Bottle.h>
11 #include <yarp/os/Bytes.h>
12 #include <yarp/os/Carrier.h>
13 #include <yarp/os/Contact.h>
14 #include <yarp/os/Face.h>
15 #include <yarp/os/OutputProtocol.h>
16 
17 #include <string>
18 
19 
20 namespace yarp {
21 namespace os {
22 
30 {
31  Carriers();
32 
33 public:
34 
38  virtual ~Carriers();
39 
46  static Carrier* chooseCarrier(const std::string& name);
47 
51  static Carrier* getCarrierTemplate(const std::string& name);
52 
59  static Carrier* chooseCarrier(const Bytes& bytes);
60 
75  static Face* listen(const Contact& address);
76 
84  static OutputProtocol* connect(const Contact& address);
85 
89  void clear();
90 
99  static bool addCarrierPrototype(Carrier* carrier);
100 
101  static Carriers& getInstance();
102 
103  static Bottle listCarriers();
104 
105 private:
106 #ifndef DOXYGEN_SHOULD_SKIP_THIS
107  class Private;
108  Private* const mPriv;
109 #endif // DOXYGEN_SHOULD_SKIP_THIS
110 };
111 
112 } // namespace os
113 } // namespace yarp
114 
115 
116 #endif // YARP_OS_CARRIERS_H
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:74
A simple abstraction for a block of bytes.
Definition: Bytes.h:25
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
Definition: Carrier.h:45
Collection of carriers, a singleton.
Definition: Carriers.h:30
Represents how to reach a part of a YARP network.
Definition: Contact.h:36
The initial point-of-contact with a port.
Definition: Face.h:21
The output side of an active connection between two ports.
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_os_API
Definition: api.h:18