10 #ifndef YARP_OS_IMPL_PORTCOREPACKET_H
11 #define YARP_OS_IMPL_PORTCOREPACKET_H
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
virtual void onCompletion() const
This is called when the port has finished all writing operations.
A single message, potentially being transmitted on multiple connections.
bool completed
has a notification of completion been sent
void setContent(const yarp::os::PortWriter *writable, bool owned=false, const yarp::os::PortWriter *callback=nullptr, bool ownedCallback=false)
Configure the object being sent and where to send notifications.
PortCorePacket * prev_
this packet will be in a list of active packets
int ct
number of uses of the messagae
void inc()
Increment the usage count for this messagae.
const yarp::os::PortWriter * getContent()
const yarp::os::PortWriter * callback
where to send event notifications
virtual ~PortCorePacket()
Destructor.
void complete()
Send a completion notification if we haven't already, and there's somewhere to send it to.
void reset()
Delete anything we own and enter a clean state, as if freshly created.
const yarp::os::PortWriter * content
the object being sent
bool ownedCallback
should we memory-manage the callback object
const yarp::os::PortWriter * getCallback()
PortCorePacket * next_
this packet will be in a list of active packets
void dec()
Decrement the usage count for this messagae.
bool owned
should we memory-manage the content object
PortCorePacket()
Constructor.
The main, catch-all namespace for YARP.