RLRP routing  v.0.1.0
DataHandler.AppHandler Class Reference

Class for handling all incoming user application data, received from the virtual network interface. More...

Collaboration diagram for DataHandler.AppHandler:
Collaboration graph

Public Member Functions

def __init__ (self, app_transport, raw_transport, table)
 Constructor. More...
 
def process_packet (self, packet)
 Process an incoming data packet from the upper application layer. More...
 
def send_packet (self, packet, dst_ip, next_hop_mac)
 Send a packet to a next_hop_mac. More...
 
def send_packet_with_arq (self, packet, dst_ip, next_hop_mac)
 Send a packet to a next_hop_mac, if ARQ retransmission is enabled. More...
 
def send_back (self, packet)
 Send the packet back to the virtual network interface. More...
 
def send_up (self, packet)
 Send the data packet up to the application. More...
 

Public Attributes

 broadcast_list
 List of IDs of all previously processed broadcast messages. More...
 
 app_transport
 Reference to Transport.VirtualTransport object. More...
 
 raw_transport
 Reference to Transport.RawTransport object. More...
 
 table
 Reference to RouteTable.Table object. More...
 
 broadcast_mac
 Store the default MAC broadcast value, referenced from Transport.RawTransport.broadcast_mac. More...
 
 arq_handler
 Create and store an ArqHandler.ArqHandler instance. More...
 
 reward_wait_handler
 Create and store a RewardHandler.RewardWaitHandler object for waiting for an incoming reward of previously sent packets. More...
 
 path_discovery_handler
 Create and store a PathDiscovery.PathDiscoveryHandler object for dealing with the packets with no next hop node. More...
 
 send_unicast_packet
 Create a reference to the default self.send_unicast_packet method, depending on the ENABLE_ARQ value. More...
 

Detailed Description

Class for handling all incoming user application data, received from the virtual network interface.

A starting point of message transmission. It initialises all handler objects, which then will be used by IncomingTraffic thread upon receiving messages from the network.

Constructor & Destructor Documentation

def DataHandler.AppHandler.__init__ (   self,
  app_transport,
  raw_transport,
  table 
)

Constructor.

Parameters
selfThe object pointer.
app_transportReference to Transport.VirtualTransport object.
raw_transportReference to Transport.RawTransport object.
tableReference to RouteTable.Table object.
Returns
None

Member Function Documentation

def DataHandler.AppHandler.process_packet (   self,
  packet 
)

Process an incoming data packet from the upper application layer.

Parameters
selfThe object pointer.
packetReceived raw packet from the virtual network interface.
Returns
None

Here is the call graph for this function:

def DataHandler.AppHandler.send_back (   self,
  packet 
)

Send the packet back to the virtual network interface.

Parameters
selfThe object pointer.
packetReceived raw packet from the virtual network interface.
Returns
None

Here is the caller graph for this function:

def DataHandler.AppHandler.send_packet (   self,
  packet,
  dst_ip,
  next_hop_mac 
)

Send a packet to a next_hop_mac.

Parameters
selfThe object pointer.
packetReceived raw packet from the virtual network interface.
dst_ipDestination IP of the packet.
next_hop_macMAC address of a next hop node.
Returns
None

Here is the caller graph for this function:

def DataHandler.AppHandler.send_packet_with_arq (   self,
  packet,
  dst_ip,
  next_hop_mac 
)

Send a packet to a next_hop_mac, if ARQ retransmission is enabled.

Parameters
selfThe object pointer.
packetReceived raw packet from the virtual network interface.
dst_ipDestination IP of the packet.
next_hop_macMAC address of a next hop node.
Returns
None

Here is the call graph for this function:

def DataHandler.AppHandler.send_up (   self,
  packet 
)

Send the data packet up to the application.

Parameters
selfThe object pointer.
packetReceived raw packet from the virtual network interface.
Returns
None

Member Data Documentation

DataHandler.AppHandler.app_transport

Reference to Transport.VirtualTransport object.

DataHandler.AppHandler.arq_handler

Create and store an ArqHandler.ArqHandler instance.

DataHandler.AppHandler.broadcast_list

List of IDs of all previously processed broadcast messages.

Creating a deque list for keeping the received broadcast IDs.

DataHandler.AppHandler.broadcast_mac

Store the default MAC broadcast value, referenced from Transport.RawTransport.broadcast_mac.

DataHandler.AppHandler.path_discovery_handler

Create and store a PathDiscovery.PathDiscoveryHandler object for dealing with the packets with no next hop node.

DataHandler.AppHandler.raw_transport

Reference to Transport.RawTransport object.

DataHandler.AppHandler.reward_wait_handler

Create and store a RewardHandler.RewardWaitHandler object for waiting for an incoming reward of previously sent packets.

DataHandler.AppHandler.send_unicast_packet

Create a reference to the default self.send_unicast_packet method, depending on the ENABLE_ARQ value.

DataHandler.AppHandler.table

Reference to RouteTable.Table object.


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