|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
21 PortCorePackets::~PortCorePackets()
23 while (!inactive.empty()) {
24 delete inactive.back();
27 while (!active.empty()) {
40 if (inactive.empty()) {
43 yCAssert(PORTCOREPACKETS, obj !=
nullptr);
44 inactive.push_back(obj);
47 if (next ==
nullptr) {
48 yCError(PORTCOREPACKETS,
"*** YARP consistency check failed.\n");
49 yCError(PORTCOREPACKETS,
"*** There has been a low-level failure in \"PortCorePackets\".\n");
50 yCError(PORTCOREPACKETS,
"*** This typically occurs when ports are accessed in a non-threadsafe way.\n");
51 yCError(PORTCOREPACKETS,
"*** For help: https://github.com/robotology/yarp/issues/new\n");
53 yCAssert(PORTCOREPACKETS, next !=
nullptr);
54 inactive.remove(next);
55 active.push_back(next);
61 if (packet !=
nullptr) {
66 active.remove(packet);
67 inactive.push_back(packet);
73 if (packet !=
nullptr) {
84 if (packet !=
nullptr) {
bool checkPacket(PortCorePacket *packet)
Move a packet to the inactive state if it has finished being sent on all connections.
A single message, potentially being transmitted on multiple connections.
void reset()
Delete anything we own and enter a clean state, as if freshly created.
void freePacket(PortCorePacket *packet, bool clear=true)
Force the given packet into an inactive state.
bool completed
has a notification of completion been sent
PortCorePacket * getFreePacket()
Get a packet that we can prepare for sending.
#define yCAssert(component, x)
#define yCError(component,...)
bool completePacket(PortCorePacket *packet)
Send a completion notification if a packet has finished being sent on all connections.
A collection of messages being transmitted over connections.
#define YARP_OS_LOG_COMPONENT(name, name_string)
void complete()
Send a completion notification if we haven't already, and there's somewhere to send it to.