YARP
Yet Another Robot Platform
Carriers.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 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_CARRIERS_H
11 #define YARP_OS_CARRIERS_H
12 
13 #include <yarp/os/Bottle.h>
14 #include <yarp/os/Bytes.h>
15 #include <yarp/os/Carrier.h>
16 #include <yarp/os/Contact.h>
17 #include <yarp/os/Face.h>
18 #include <yarp/os/OutputProtocol.h>
19 
20 #include <string>
21 
22 
23 namespace yarp {
24 namespace os {
25 
33 {
34  Carriers();
35 
36 public:
37 
41  virtual ~Carriers();
42 
49  static Carrier* chooseCarrier(const std::string& name);
50 
54  static Carrier* getCarrierTemplate(const std::string& name);
55 
62  static Carrier* chooseCarrier(const Bytes& bytes);
63 
78  static Face* listen(const Contact& address);
79 
87  static OutputProtocol* connect(const Contact& address);
88 
92  void clear();
93 
102  static bool addCarrierPrototype(Carrier* carrier);
103 
104  static Carriers& getInstance();
105 
106  static Bottle listCarriers();
107 
108 private:
109 #ifndef DOXYGEN_SHOULD_SKIP_THIS
110  class Private;
111  Private* const mPriv;
112 #endif // DOXYGEN_SHOULD_SKIP_THIS
113 };
114 
115 } // namespace os
116 } // namespace yarp
117 
118 
119 #endif // YARP_OS_CARRIERS_H
yarp::os::Bottle
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
yarp::os::Carrier
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
Definition: Carrier.h:48
yarp::os::OutputProtocol
The output side of an active connection between two ports.
Definition: OutputProtocol.h:33
Face.h
YARP_os_API
#define YARP_os_API
Definition: api.h:19
yarp::os::Bytes
A simple abstraction for a block of bytes.
Definition: Bytes.h:28
yarp::os::Carriers
Collection of carriers, a singleton.
Definition: Carriers.h:33
Carrier.h
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
Bytes.h
yarp::os::Contact
Represents how to reach a part of a YARP network.
Definition: Contact.h:39
Contact.h
yarp::os::Face
The initial point-of-contact with a port.
Definition: Face.h:24
Bottle.h
OutputProtocol.h