RLRP routing
v.0.1.0
|
Main class for sending data and processing the corresponding ACKs. More...
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... | |
Main class for sending data and processing the corresponding ACKs.
def ArqHandler.ArqHandler.__init__ | ( | self, | |
raw_transport, | |||
table | |||
) |
Constructor.
self | The object pointer. |
raw_transport | Reference to Transport.RawTransport object. |
table | Reference to RouteTable.Table object. |
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.
self | The object pointer. |
message | Message object from Messages module. |
payload | Payload of the transmitted frame. Default is "". |
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.
self | The object pointer. |
message | Message object from Messages module. |
dest_mac_list | List of MAC addresses the message should be sent to. |
payload | Payload of the transmitted frame. Default is "". |
def ArqHandler.ArqHandler.process_ack | ( | self, | |
ack_message | |||
) |
Process the ACK message, received from the transport or some another receiving thread.
self | The object pointer. |
ack_message | Messages.AckMessage object received from the network. |
def ArqHandler.ArqHandler.send_ack | ( | self, | |
message, | |||
dst_mac | |||
) |
Generate and send the ACK back on the given message to the dst_mac.
self | The object pointer. |
message | Message object from Messages module. |
dst_mac | Destination MAC address to send the ACK message to. |
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.