RLRP routing  v.0.1.0
All Classes Namespaces Files Functions Variables Pages
RewardHandler.RewardWaitThread Class Reference

Thread for waiting for an incoming reward messages on the given dst_ip. More...

Inheritance diagram for RewardHandler.RewardWaitThread:
Inheritance graph
Collaboration diagram for RewardHandler.RewardWaitThread:
Collaboration graph

Public Member Functions

def __init__ (self, dst_ip, mac, table, reward_wait_list)
 Constructor. More...
 
def run (self)
 Main thread routine. More...
 
def process_reward (self, reward_value)
 Process an incoming reward value. More...
 

Public Attributes

 dst_ip
 Destination IP of the route for this packet. More...
 
 mac
 MAC address of the node where the packet had been sent for getting the reward. More...
 
 table
 Reference to RouteTable.Table object. More...
 
 reward_wait_list
 Reference to the shared RewardWaitHandler.reward_wait_list dictionary. More...
 
 reward_is_received
 Define flag whether the reward has been received or not. More...
 
 wait_timeout
 Wait timeout value after which a negative reward is initiated towards the dst_ip. More...
 

Detailed Description

Thread for waiting for an incoming reward messages on the given dst_ip.

Constructor & Destructor Documentation

def RewardHandler.RewardWaitThread.__init__ (   self,
  dst_ip,
  mac,
  table,
  reward_wait_list 
)

Constructor.

Parameters
selfThe object pointer.
dst_ipDestination IP of the route for this packet.
macMAC address of the node where the packet had been sent for getting the reward.
tableReference to RouteTable.Table object.
reward_wait_listReference to the shared RewardWaitHandler.reward_wait_list dictionary.
Returns
None

Member Function Documentation

def RewardHandler.RewardWaitThread.process_reward (   self,
  reward_value 
)

Process an incoming reward value.

Parameters
selfThe object pointer.
reward_valueReward value.
Returns
None
def RewardHandler.RewardWaitThread.run (   self)

Main thread routine.

Parameters
selfThe object pointer.
Returns
None

Member Data Documentation

RewardHandler.RewardWaitThread.dst_ip

Destination IP of the route for this packet.

Represented in a string format.

RewardHandler.RewardWaitThread.mac

MAC address of the node where the packet had been sent for getting the reward.

Represented in "xx:xx:xx:xx:xx:xx" string format.

RewardHandler.RewardWaitThread.reward_is_received

Define flag whether the reward has been received or not.

bool().

RewardHandler.RewardWaitThread.reward_wait_list

Reference to the shared RewardWaitHandler.reward_wait_list dictionary.

RewardHandler.RewardWaitThread.table

Reference to RouteTable.Table object.

RewardHandler.RewardWaitThread.wait_timeout

Wait timeout value after which a negative reward is initiated towards the dst_ip.


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