YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::os::impl::PortCorePacket Class Reference

A single message, potentially being transmitted on multiple connections. More...

#include <yarp/os/impl/PortCorePacket.h>

Public Member Functions

 PortCorePacket ()
 Constructor.
 
virtual ~PortCorePacket ()
 Destructor.
 
int getCount ()
 
void inc ()
 Increment the usage count for this messagae.
 
void dec ()
 Decrement the usage count for this messagae.
 
const yarp::os::PortWritergetContent ()
 
const yarp::os::PortWritergetCallback ()
 
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.
 
void reset ()
 Delete anything we own and enter a clean state, as if freshly created.
 
void complete ()
 Send a completion notification if we haven't already, and there's somewhere to send it to.
 

Public Attributes

PortCorePacketprev_
 this packet will be in a list of active packets
 
PortCorePacketnext_
 this packet will be in a list of active packets
 
const yarp::os::PortWritercontent
 the object being sent
 
const yarp::os::PortWritercallback
 where to send event notifications
 
int ct
 number of uses of the messagae
 
bool owned
 should we memory-manage the content object
 
bool ownedCallback
 should we memory-manage the callback object
 
bool completed
 has a notification of completion been sent
 

Detailed Description

A single message, potentially being transmitted on multiple connections.

This tracks uses of the message for memory management purposes.

Definition at line 19 of file PortCorePacket.h.

Constructor & Destructor Documentation

◆ PortCorePacket()

yarp::os::impl::PortCorePacket::PortCorePacket ( )
inline

Constructor.

Definition at line 34 of file PortCorePacket.h.

◆ ~PortCorePacket()

virtual yarp::os::impl::PortCorePacket::~PortCorePacket ( )
inlinevirtual

Destructor.

Destroy any owned objects unconditionally.

Definition at line 50 of file PortCorePacket.h.

Member Function Documentation

◆ complete()

void yarp::os::impl::PortCorePacket::complete ( )
inline

Send a completion notification if we haven't already, and there's somewhere to send it to.

Definition at line 140 of file PortCorePacket.h.

◆ dec()

void yarp::os::impl::PortCorePacket::dec ( )
inline

Decrement the usage count for this messagae.

Definition at line 75 of file PortCorePacket.h.

◆ getCallback()

const yarp::os::PortWriter * yarp::os::impl::PortCorePacket::getCallback ( )
inline
Returns
the object to which notifications should be sent.

Definition at line 91 of file PortCorePacket.h.

◆ getContent()

const yarp::os::PortWriter * yarp::os::impl::PortCorePacket::getContent ( )
inline
Returns
the object being sent.

Definition at line 83 of file PortCorePacket.h.

◆ getCount()

int yarp::os::impl::PortCorePacket::getCount ( )
inline
Returns
number of users of this message.

Definition at line 59 of file PortCorePacket.h.

◆ inc()

void yarp::os::impl::PortCorePacket::inc ( )
inline

Increment the usage count for this messagae.

Definition at line 67 of file PortCorePacket.h.

◆ reset()

void yarp::os::impl::PortCorePacket::reset ( )
inline

Delete anything we own and enter a clean state, as if freshly created.

Definition at line 120 of file PortCorePacket.h.

◆ setContent()

void yarp::os::impl::PortCorePacket::setContent ( const yarp::os::PortWriter writable,
bool  owned = false,
const yarp::os::PortWriter callback = nullptr,
bool  ownedCallback = false 
)
inline

Configure the object being sent and where to send notifications.

Parameters
writablethe object being sent
ownedshould we memory-manage writable
callbackwhere to send notifications
ownedCallbackshould we memory-manage callback

Definition at line 104 of file PortCorePacket.h.

Member Data Documentation

◆ callback

const yarp::os::PortWriter* yarp::os::impl::PortCorePacket::callback

where to send event notifications

Definition at line 25 of file PortCorePacket.h.

◆ completed

bool yarp::os::impl::PortCorePacket::completed

has a notification of completion been sent

Definition at line 29 of file PortCorePacket.h.

◆ content

const yarp::os::PortWriter* yarp::os::impl::PortCorePacket::content

the object being sent

Definition at line 24 of file PortCorePacket.h.

◆ ct

int yarp::os::impl::PortCorePacket::ct

number of uses of the messagae

Definition at line 26 of file PortCorePacket.h.

◆ next_

PortCorePacket* yarp::os::impl::PortCorePacket::next_

this packet will be in a list of active packets

Definition at line 23 of file PortCorePacket.h.

◆ owned

bool yarp::os::impl::PortCorePacket::owned

should we memory-manage the content object

Definition at line 27 of file PortCorePacket.h.

◆ ownedCallback

bool yarp::os::impl::PortCorePacket::ownedCallback

should we memory-manage the callback object

Definition at line 28 of file PortCorePacket.h.

◆ prev_

PortCorePacket* yarp::os::impl::PortCorePacket::prev_

this packet will be in a list of active packets

Definition at line 22 of file PortCorePacket.h.


The documentation for this class was generated from the following file: