RLRP routing  v.0.1.0
ArqHandler.ArqHandler Class Reference

Main class for sending data and processing the corresponding ACKs. More...

Collaboration diagram for ArqHandler.ArqHandler:
Collaboration graph

Public Member Functions

def __init__ (self, raw_transport, table)
 Constructor. More...
 
def arq_send (self, message, dest_mac_list, payload="")
 Start the ARQ send for the given message and for each destination address in the dest_list. More...
 
def arq_broadcast_send (self, message, payload="")
 Start the ARQ broadcast send for the given message. More...
 
def process_ack (self, ack_message)
 Process the ACK message, received from the transport or some another receiving thread. More...
 
def send_ack (self, message, dst_mac)
 Generate and send the ACK back on the given message to the dst_mac. More...
 

Public Attributes

 msg_thread_map
 Dictionary with {hash(msg.id + dest_address) : ArqHandler.ArqRoutine object}. More...
 
 raw_transport
 Reference to Transport.RawTransport object. More...
 
 table
 Reference to RouteTable.Table object. More...
 

Detailed Description

Main class for sending data and processing the corresponding ACKs.

Constructor & Destructor Documentation

def ArqHandler.ArqHandler.__init__ (   self,
  raw_transport,
  table 
)

Constructor.

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

Member Function Documentation

def ArqHandler.ArqHandler.arq_broadcast_send (   self,
  message,
  payload = "" 
)

Start the ARQ broadcast send for the given message.

The message will be sent to ALL current neighbors of the node. For now, only the messages with unique ID field are supported.

Parameters
selfThe object pointer.
messageMessage object from Messages module.
payloadPayload of the transmitted frame. Default is "".
Returns
None
def ArqHandler.ArqHandler.arq_send (   self,
  message,
  dest_mac_list,
  payload = "" 
)

Start the ARQ send for the given message and for each destination address in the dest_list.

For now, only the messages with unique ID field are supported.

Parameters
selfThe object pointer.
messageMessage object from Messages module.
dest_mac_listList of MAC addresses the message should be sent to.
payloadPayload of the transmitted frame. Default is "".
Returns
None
def ArqHandler.ArqHandler.process_ack (   self,
  ack_message 
)

Process the ACK message, received from the transport or some another receiving thread.

Parameters
selfThe object pointer.
ack_messageMessages.AckMessage object received from the network.
Returns
None
def ArqHandler.ArqHandler.send_ack (   self,
  message,
  dst_mac 
)

Generate and send the ACK back on the given message to the dst_mac.

Parameters
selfThe object pointer.
messageMessage object from Messages module.
dst_macDestination MAC address to send the ACK message to.
Returns
None

Member Data Documentation

ArqHandler.ArqHandler.msg_thread_map

Dictionary with {hash(msg.id + dest_address) : ArqHandler.ArqRoutine object}.

ArqHandler.ArqHandler.raw_transport

Reference to Transport.RawTransport object.

ArqHandler.ArqHandler.table

Reference to RouteTable.Table object.


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