RLRP routing
v.0.1.0
|
Class for handling all incoming user application data, received from the virtual network interface. More...
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... | |
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.
def DataHandler.AppHandler.__init__ | ( | self, | |
app_transport, | |||
raw_transport, | |||
table | |||
) |
Constructor.
self | The object pointer. |
app_transport | Reference to Transport.VirtualTransport object. |
raw_transport | Reference to Transport.RawTransport object. |
table | Reference to RouteTable.Table object. |
def DataHandler.AppHandler.process_packet | ( | self, | |
packet | |||
) |
Process an incoming data packet from the upper application layer.
self | The object pointer. |
packet | Received raw packet from the virtual network interface. |
def DataHandler.AppHandler.send_back | ( | self, | |
packet | |||
) |
Send the packet back to the virtual network interface.
self | The object pointer. |
packet | Received raw packet from the virtual network interface. |
def DataHandler.AppHandler.send_packet | ( | self, | |
packet, | |||
dst_ip, | |||
next_hop_mac | |||
) |
Send a packet to a next_hop_mac.
self | The object pointer. |
packet | Received raw packet from the virtual network interface. |
dst_ip | Destination IP of the packet. |
next_hop_mac | MAC address of a next hop node. |
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.
self | The object pointer. |
packet | Received raw packet from the virtual network interface. |
dst_ip | Destination IP of the packet. |
next_hop_mac | MAC address of a next hop node. |
def DataHandler.AppHandler.send_up | ( | self, | |
packet | |||
) |
Send the data packet up to the application.
self | The object pointer. |
packet | Received raw packet from the virtual network interface. |
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.