#include <Contact.h>
Inheritance diagram for dtn::Contact:
This is basically a repository for any state about the contact opportunity including start time, estimations for bandwidth or latency, etc.
It also contains the CLInfo slot for the convergence layer to put any state associated with the active connection.
Since the contact object may be used by multiple threads in the case of a connection-oriented convergence layer, and because the object is intended to be deleted when the contact opportunity ends, all object instances are reference counted and will be deleted when the last reference is removed.
Definition at line 69 of file Contact.h.
Public Member Functions | |
Contact (Link *link) | |
Constructor. | |
void | set_cl_info (CLInfo *cl_info) |
Store the convergence layer state associated with the contact. | |
CLInfo * | cl_info () |
Accessor to the convergence layer info. | |
Link * | link () |
Accessor to the link. | |
int | format (char *buf, size_t sz) const |
Formatting. | |
Public Attributes | |
timeval | start_time_ |
Time when the contact begin. | |
u_int32_t | duration_ms_ |
Contact duration (0 if unknown). | |
u_int32_t | bps_ |
Approximate bandwidth. | |
u_int32_t | latency_ms_ |
Approximate latency. | |
Protected Attributes | |
Link * | link_ |
Pointer to parent link on which this contact exists. | |
CLInfo * | cl_info_ |
convergence layer specific info | |
Private Member Functions | |
virtual | ~Contact () |
Destructor -- private since the class is reference counted and therefore is never explicitly deleted. | |
Friends | |
class | oasys::RefCountedObject |
dtn::Contact::Contact | ( | Link * | link | ) |
Constructor.
Definition at line 51 of file Contact.cc.
References bps_, duration_ms_, dtnsim::gettimeofday(), latency_ms_, log_info, and start_time_.
dtn::Contact::~Contact | ( | ) | [private, virtual] |
Destructor -- private since the class is reference counted and therefore is never explicitly deleted.
Definition at line 64 of file Contact.cc.
void dtn::Contact::set_cl_info | ( | CLInfo * | cl_info | ) | [inline] |
CLInfo* dtn::Contact::cl_info | ( | ) | [inline] |
Accessor to the convergence layer info.
Definition at line 101 of file Contact.h.
References cl_info_.
Referenced by set_cl_info().
Link* dtn::Contact::link | ( | ) | [inline] |
int dtn::Contact::format | ( | char * | buf, | |
size_t | sz | |||
) | const [virtual] |
Formatting.
..
Reimplemented from oasys::RefCountedObject.
Definition at line 73 of file Contact.cc.
References link_, dtn::Link::nexthop(), and start_time_.
friend class oasys::RefCountedObject [friend] |
struct timeval dtn::Contact::start_time_ |
u_int32_t dtn::Contact::duration_ms_ |
u_int32_t dtn::Contact::bps_ |
u_int32_t dtn::Contact::latency_ms_ |
Link* dtn::Contact::link_ [protected] |
CLInfo* dtn::Contact::cl_info_ [protected] |
convergence layer specific info
Definition at line 129 of file Contact.h.
Referenced by cl_info(), set_cl_info(), and ~Contact().