User Manual, Developers Guide and API Documentation

simpletl::Connection Class Reference

The connection between two communicating nodes identified by a FlowID. Each connection has a defined capacity (data rate). There is a connection instance at both communicating nodes.

#include <service/Connection.hpp>

Inheritance diagram for simpletl::Connection:

Inheritance graph
[legend]
Collaboration diagram for simpletl::Connection:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Connection (wns::service::tl::ConnectionHandler *, wns::service::tl::FlowID, Bit)
wns::service::tl::ConnectionHandlergetConnectionHandler ()
 Returns the connection handler.
wns::service::tl::FlowID getFlowID ()
 Returns the FlowID of this connection.
ConnectiongetPeer ()
 Returns the peer Connection instance.
void receiveData (const simpletl::PDUPtr &)
 Called when a PDU is received. The PDU is passed to the next higher layer. The layer above is informed about connection establishment when first PDU is received.
virtual void registerDataHandler (wns::service::tl::DataHandler *_dh)
 Called by next higher layer to register the class that will receive incomming PDUs. This is usually called after the connection has been established.
virtual void sendData (const wns::osi::PDUPtr &)
 Called by next higher layer to transmit a PDU. A PCI of headerSize is attached. The transmission duration is calculated using the channelcapacity variable.
void setPeer (Connection *)
 Sets the peer Connection instance.
wns::service::tl::FlowID swappedFlowID ()
 Returns the FlowID of this connection with swapped sender and receiver IP addresses and ports.
 ~Connection ()
 Destructor.

Private Attributes

double channelcapacity
 The data rate in bit per second of our connection.
wns::service::tl::ConnectionHandlerconnectionhandler
 Service from layer above informed about establishment of connection.
wns::service::tl::DataHandlerdatahandler
 Service from layer above that receives incoming PDUs.
wns::events::scheduler::Interfaceeventscheduler
 The global event scheduler used to schedule the PDU transmission end events.
wns::service::tl::FlowID flowID
 The FlowID consisting of source and target IP addresses and port numbers.
Bit headerSize
 Header overhead in bit added to the payload size.
wns::logger::Logger logger
 The logger for debug output.
Connectionpeer
 The peer connection instance.


Detailed Description

Definition at line 47 of file Connection.hpp.


Constructor & Destructor Documentation

Connection::Connection ( wns::service::tl::ConnectionHandler ch,
wns::service::tl::FlowID  _flowID,
Bit  _headerSize 
)

Definition at line 43 of file Connection.cpp.

Connection::~Connection (  )  [virtual]

Reimplemented from wns::service::tl::Connection.

Definition at line 58 of file Connection.cpp.


Member Function Documentation

wns::service::tl::ConnectionHandler * Connection::getConnectionHandler (  ) 

Definition at line 118 of file Connection.cpp.

wns::service::tl::FlowID Connection::getFlowID (  ) 

Definition at line 135 of file Connection.cpp.

Connection * Connection::getPeer (  ) 

Definition at line 129 of file Connection.cpp.

void Connection::receiveData ( const simpletl::PDUPtr _pdu  ) 

Definition at line 84 of file Connection.cpp.

void Connection::registerDataHandler ( wns::service::tl::DataHandler _dh  )  [virtual]

Implements wns::service::tl::Connection.

Definition at line 66 of file Connection.cpp.

void Connection::sendData ( const wns::osi::PDUPtr _pdu  )  [virtual]

Implements wns::service::tl::Connection.

Definition at line 71 of file Connection.cpp.

void Connection::setPeer ( Connection connection  ) 

Definition at line 124 of file Connection.cpp.

wns::service::tl::FlowID Connection::swappedFlowID (  ) 

Definition at line 140 of file Connection.cpp.


Member Data Documentation

Definition at line 137 of file Connection.hpp.

Definition at line 110 of file Connection.hpp.

Definition at line 104 of file Connection.hpp.

Definition at line 132 of file Connection.hpp.

Definition at line 121 of file Connection.hpp.

Definition at line 126 of file Connection.hpp.

Definition at line 142 of file Connection.hpp.

Definition at line 115 of file Connection.hpp.


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

Generated on Sat May 26 03:32:39 2012 for openWNS by  doxygen 1.5.5