![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <service/Connection.hpp>


Public Member Functions | |
| Connection (wns::service::tl::ConnectionHandler *, wns::service::tl::FlowID, Bit) | |
| wns::service::tl::ConnectionHandler * | getConnectionHandler () |
| Returns the connection handler. | |
| wns::service::tl::FlowID | getFlowID () |
| Returns the FlowID of this connection. | |
| Connection * | getPeer () |
| 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::ConnectionHandler * | connectionhandler |
| Service from layer above informed about establishment of connection. | |
| wns::service::tl::DataHandler * | datahandler |
| Service from layer above that receives incoming PDUs. | |
| wns::events::scheduler::Interface * | eventscheduler |
| 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. | |
| Connection * | peer |
| The peer connection instance. | |
Definition at line 47 of file Connection.hpp.
| 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] |
| 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] |
| void Connection::sendData | ( | const wns::osi::PDUPtr & | _pdu | ) | [virtual] |
| 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.
double simpletl::Connection::channelcapacity [private] |
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.
Bit simpletl::Connection::headerSize [private] |
Definition at line 126 of file Connection.hpp.
Definition at line 142 of file Connection.hpp.
Connection* simpletl::Connection::peer [private] |
Definition at line 115 of file Connection.hpp.
1.5.5