This is the heart of a yarp port. More...
#include <yarp/os/impl/PortCore.h>
Public Member Functions | |
PortDataModifier () | |
virtual | ~PortDataModifier () |
void | releaseOutModifier () |
void | releaseInModifier () |
Public Attributes | |
yarp::os::Carrier * | outputModifier |
yarp::os::Carrier * | inputModifier |
std::mutex | outputMutex |
std::mutex | inputMutex |
This is the heart of a yarp port.
It is the thread manager. All other port components are insulated from threading. It maintains a collection of incoming and outgoing connections. Data coming from incoming connections is directed to the handler set with setReadHandler(). Calls to send() result in data being sent to all the outgoing connections. This class is used to construct yarp::os::Port, which in turn is used to construct yarp::os::BufferedPort and several other port variants.
The port's phase in its lifecycle is reflected by flags as follows.
The port is constructed in an inactive, dormant state. All flags off initially.
A call to listen puts the port on the network
A call to start creates a thread to serve network requests
A call to close winds everything down
It is possible to create a port without creating a server for it, by using manualStart() rather than start(). Such ports don't get registered and are not reachable on the network, but can interact with other ports.
The port's connections are stored in the PortCore::units list. Input and output connections are stored in the same list, and a lot of the code does not distinguish them. Outgoing messages on the connections are tracked using the PortCore::packets list. A single message may be associated with many connections.
The yarp::os::impl::PortDataModifier class is a helper class to manage the port data modifiers
Definition at line 101 of file PortCore.h.
|
inline |
Definition at line 104 of file PortCore.h.
|
inlinevirtual |
Definition at line 110 of file PortCore.h.
|
inline |
Definition at line 125 of file PortCore.h.
|
inline |
Definition at line 116 of file PortCore.h.
yarp::os::Carrier* yarp::os::impl::PortDataModifier::inputModifier |
Definition at line 136 of file PortCore.h.
std::mutex yarp::os::impl::PortDataModifier::inputMutex |
Definition at line 138 of file PortCore.h.
yarp::os::Carrier* yarp::os::impl::PortDataModifier::outputModifier |
Definition at line 135 of file PortCore.h.
std::mutex yarp::os::impl::PortDataModifier::outputMutex |
Definition at line 137 of file PortCore.h.