RLRP routing  v.0.1.0
Messages.RewardMessage Class Reference

Reward service message. More...

Collaboration diagram for Messages.RewardMessage:
Collaboration graph

Public Member Functions

def __init__ (self, reward_value, msg_hash)
 Constructor. More...
 
def __str__ (self)
 Default print method. More...
 

Public Attributes

 id
 Unique message ID. More...
 
 reward_value
 Assigned reward value. More...
 
 msg_hash
 Hash value of the data packet this Reward message replies to. More...
 

Static Public Attributes

int type = 8
 Type ID of reward service message. More...
 

Detailed Description

Reward service message.

Constructor & Destructor Documentation

def Messages.RewardMessage.__init__ (   self,
  reward_value,
  msg_hash 
)

Constructor.

Parameters
selfThe object pointer.
reward_valueAssigned reward value.
msg_hashHash value of the packet.
Returns
None

Member Function Documentation

def Messages.RewardMessage.__str__ (   self)

Default print method.

Parameters
selfThe object pointer.
Returns
String with "TYPE: , ID: , REWARD_VALUE: , MSG_HASH: ".

Member Data Documentation

Messages.RewardMessage.id

Unique message ID.

Messages.RewardMessage.msg_hash

Hash value of the data packet this Reward message replies to.

This hash value is calculated from two attributes of the data/service packet: destination IP of the packet, and the MAC address of a receiving node.

Messages.RewardMessage.reward_value

Assigned reward value.

This reward value is calculated and sent back by a node after it has received the packet with a given (destination IP + MAC address) pair.

int Messages.RewardMessage.type = 8
static

Type ID of reward service message.


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