YARP
Yet Another Robot Platform
PortCorePackets.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_IMPL_PORTCOREPACKETS_H
8#define YARP_OS_IMPL_PORTCOREPACKETS_H
9
11
12#include <yarp/os/Log.h>
13
14#include <list>
15
16namespace yarp::os::impl {
17
24{
25private:
26 std::list<PortCorePacket*> inactive; // unused packets we may reuse
27 std::list<PortCorePacket*> active; // a list of packets being sent
28public:
29 virtual ~PortCorePackets();
30
34 size_t getCount();
35
44
51 void freePacket(PortCorePacket* packet, bool clear = true);
52
59 bool completePacket(PortCorePacket* packet);
60
67 bool checkPacket(PortCorePacket* packet);
68};
69
70
71} // namespace yarp::os::impl
72
73#endif // YARP_OS_IMPL_PORTCOREPACKETS_H
A single message, potentially being transmitted on multiple connections.
A collection of messages being transmitted over connections.
bool completePacket(PortCorePacket *packet)
Send a completion notification if a packet has finished being sent on all connections.
PortCorePacket * getFreePacket()
Get a packet that we can prepare for sending.
bool checkPacket(PortCorePacket *packet)
Move a packet to the inactive state if it has finished being sent on all connections.
void freePacket(PortCorePacket *packet, bool clear=true)
Force the given packet into an inactive state.
The components from which ports and connections are built.