RLRP routing
v.0.1.0
|
Class for periodically broadcasting HELLO message from the node. More...
Public Member Functions | |
def | __init__ (self, raw_transport_obj, table_obj) |
Constructor. More... | |
def | run (self) |
Main thread routine. More... | |
def | update_ips_in_route_table (self, node_ips) |
Update node's own ips in the route table. More... | |
def | send_raw_hello (self) |
Broadcast the HELLO message frame to the network. More... | |
def | quit (self) |
Stop and quit the thread operation. More... | |
Public Attributes | |
running | |
Thread running state bool() flag. More... | |
current_node_ips | |
Store current IP addresses of this node. More... | |
message | |
Create and store the default Messages.HelloMessage object used for broadcasting. More... | |
broadcast_mac | |
Reference to Transport.RawTransport.broadcast_mac default value. More... | |
broadcast_interval | |
Default value of a broadcast time interval between the Hello messages. More... | |
raw_transport | |
Reference to Transport.RawTransport object. More... | |
table_obj | |
Reference to RouteTable.Table object. More... | |
node_mac | |
Reference to the node's own MAC address, stored in Transport.RawTransport.node_mac. More... | |
Class for periodically broadcasting HELLO message from the node.
A thread which periodically broadcasts Hello messages to the network, so that the neighboring nodes could detect the node's activity and register it as their neighbor. Also, this thread is used for periodically printing out the entries of the route table.
def NeighborDiscovery.AdvertiseNeighbor.__init__ | ( | self, | |
raw_transport_obj, | |||
table_obj | |||
) |
Constructor.
self | The object pointer. |
raw_transport_obj | Reference to Transport.RawTransport object. |
table_obj | Reference to RouteTable.Table object. |
def NeighborDiscovery.AdvertiseNeighbor.quit | ( | self | ) |
Stop and quit the thread operation.
self | The object pointer. |
def NeighborDiscovery.AdvertiseNeighbor.run | ( | self | ) |
Main thread routine.
self | The object pointer. |
def NeighborDiscovery.AdvertiseNeighbor.send_raw_hello | ( | self | ) |
Broadcast the HELLO message frame to the network.
self | The object pointer. |
def NeighborDiscovery.AdvertiseNeighbor.update_ips_in_route_table | ( | self, | |
node_ips | |||
) |
Update node's own ips in the route table.
self | The object pointer. |
node_ips | List of node's IP addresses. |
NeighborDiscovery.AdvertiseNeighbor.broadcast_interval |
Default value of a broadcast time interval between the Hello messages.
NeighborDiscovery.AdvertiseNeighbor.broadcast_mac |
Reference to Transport.RawTransport.broadcast_mac default value.
NeighborDiscovery.AdvertiseNeighbor.current_node_ips |
Store current IP addresses of this node.
list().
NeighborDiscovery.AdvertiseNeighbor.message |
Create and store the default Messages.HelloMessage object used for broadcasting.
NeighborDiscovery.AdvertiseNeighbor.node_mac |
Reference to the node's own MAC address, stored in Transport.RawTransport.node_mac.
NeighborDiscovery.AdvertiseNeighbor.raw_transport |
Reference to Transport.RawTransport object.
NeighborDiscovery.AdvertiseNeighbor.running |
Thread running state bool() flag.
NeighborDiscovery.AdvertiseNeighbor.table_obj |
Reference to RouteTable.Table object.