#include <yarp/os/Network.h>#include <yarp/conf/environment.h>#include <yarp/conf/filesystem.h>#include <yarp/os/Bottle.h>#include <yarp/os/Carriers.h>#include <yarp/os/Face.h>#include <yarp/os/MultiNameSpace.h>#include <yarp/os/NameSpace.h>#include <yarp/os/NetType.h>#include <yarp/os/OutputProtocol.h>#include <yarp/os/Port.h>#include <yarp/os/Route.h>#include <yarp/os/Time.h>#include <yarp/os/Vocab.h>#include <yarp/os/YarpPlugin.h>#include <yarp/os/impl/BufferedConnectionWriter.h>#include <yarp/os/impl/LogComponent.h>#include <yarp/os/impl/LogForwarder.h>#include <yarp/os/impl/NameConfig.h>#include <yarp/os/impl/PortCoreClient.h>#include <yarp/os/impl/PlatformSignal.h>#include <yarp/os/impl/PlatformStdio.h>#include <yarp/os/impl/PlatformUnistd.h>#include <yarp/os/impl/PortCommand.h>#include <yarp/os/impl/Terminal.h>#include <yarp/os/impl/TimeImpl.h>#include <cstdio>#include <cstdlib>#include <mutex>#include <string>
Include dependency graph for Network.cpp:Go to the source code of this file.
Classes | |
| class | YarpAutoInit |
| A single-use class to shut down the yarp library if it was initialized automatically. More... | |
| class | ForwardingCarrier |
| class | StubCarrier |
Functions | |
| static MultiNameSpace & | getNameSpace () |
| static bool | needsLookup (const Contact &contact) |
| static int | noteDud (const Contact &src) |
| Notify the name server that a port did not respond (i.e. | |
| static int | enactConnection (const Contact &src, const Contact &dest, const ContactStyle &style, int mode, bool reversed) |
Connect, disconnect, or check the connection between two ports, by sending administrative commands to the port src, which is the one in charge of the connection (it is called by metaConnect()). | |
| static std::string | collectParams (Contact &c) |
| static std::string | extractCarrierNameOnly (const std::string &carrier_name_with_params) |
| static bool | is_log_port (const std::string &src, const std::string &dest) |
| Check if the given source and destination ports are log ports. | |
| static bool | is_stats_port (const std::string &src, const std::string &dest) |
| Check if the given source and destination ports are stats ports. | |
| static void | addStatsMonitorIfNeeded (const std::string &src, const std::string &dest, ContactStyle &style, int mode) |
| static int | metaConnect (const std::string &src, const std::string &dest, ContactStyle style, int mode) |
| static bool | setPortQos (const std::string &port, const std::string &other, bool isOutput, const QosStyle &style, bool quiet) |
| static bool | getPortQos (const std::string &port, const std::string &other, bool isOutput, QosStyle &style, bool quiet) |
Variables | |
| static int | __yarp_is_initialized = 0 |
| static bool | __yarp_auto_init_active = false |
| static YarpAutoInit | yarp_auto_init |
| destructor is called on shutdown. | |
|
static |
Definition at line 337 of file Network.cpp.
Definition at line 280 of file Network.cpp.
|
static |
Connect, disconnect, or check the connection between two ports, by sending administrative commands to the port src, which is the one in charge of the connection (it is called by metaConnect()).
The steps are:
src is asked (getConnectionInfoOut/getConnectionInfoIn, see PortCoreMsgs.thrift) about the current connection with dest. If src does not respond, it is reported to the name server as dead (noteDud());style.carrier);src is asked to add (addConnection) or to remove (delConnection) the connection.| src | the port which is asked to make/break/check the connection |
| dest | the port at the other end of the connection |
| style | the options of the connection (carrier, timeout, quiet, ...) |
| mode | one of YARP_ENACT_CONNECT, YARP_ENACT_DISCONNECT, YARP_ENACT_EXISTS |
| reversed | false if src is the sender of the data (push connection), true if src is the receiver of the data (pull connection) |
Definition at line 161 of file Network.cpp.
Definition at line 290 of file Network.cpp.
|
static |
Definition at line 87 of file Network.cpp.
|
static |
Definition at line 1259 of file Network.cpp.
Check if the given source and destination ports are log ports.
Note: /log/... ports are used by clients (the application which send the log) /logger/... ports are used by the log server (the application which receives the log)
| src | the source port |
| dest | the destination port |
Definition at line 303 of file Network.cpp.
Check if the given source and destination ports are stats ports.
# Note: /stats_monitor/... ports are used by clients (the application which send the stats) /yarpConnectionsStats/... ports are used by the stats server (the application which receives the stats)
| src | the source port |
| dest | the destination port |
Definition at line 324 of file Network.cpp.
|
static |
Definition at line 400 of file Network.cpp.
Definition at line 93 of file Network.cpp.
Notify the name server that a port did not respond (i.e.
it is probably dead), by announcing it with activity 0. The name server can use this information to mark the port as non-live and to clean up its registration.
If a local name store is available (query bypass), it is notified directly, otherwise an "announce <port> 0" message is sent to the name server.
| src | the port which did not respond |
Definition at line 116 of file Network.cpp.
|
static |
Definition at line 1163 of file Network.cpp.
Definition at line 58 of file Network.cpp.
|
static |
Definition at line 57 of file Network.cpp.
|
static |
destructor is called on shutdown.
Definition at line 85 of file Network.cpp.