Package: inet.networklayer.wiseroute
WiseRoute
simple moduleWiseroute is a simple loop-free routing algorithm that builds a routing tree from a central network point, designed for sensor networks and convergecast traffic.
The sink (the device at the center of the network) broadcasts a route building message. Each network node that receives it selects the sink as parent in the routing tree, and rebroadcasts the route building message. This procedure maximizes the probability that all network nodes can join the network, and avoids loops. Parameter sinkAddress gives the sink network address, rssiThreshold is a threshold to avoid using bad links (with too low RSSI values) for routing, and routeFloodsInterval should be set to zero for all nodes except the sink. Each routeFloodsInterval, the sink restarts the tree building procedure. Set it to a large value if you do not want the tree to be rebuilt.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Used in compound modules
Name | Type | Description |
---|---|---|
WiseRouteNetworkLayer | compound module |
This module provides a simple network layer. |
Extends
Name | Type | Description |
---|---|---|
NetworkProtocolBase | simple module |
Module base for different network protocols. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
interfaceTableModule | string | ||
headerLength | int | 96b |
length of the network packet header (in bits) |
debug | bool | false |
debug switch |
trace | bool | false | |
useSimTracer | bool | false | |
sinkAddress | string |
sink node address |
|
rssiThreshold | double | -50 dBm |
RSSI threshold for route selection |
routeFloodsInterval | double | 0 s |
If set to zero, this node does not initiates route tree building. If set to a value larger than zero, this nodes periodically initiates route tree building. |
arpModule | string |
The path to the ARP module |
Properties
Name | Value | Description |
---|---|---|
display | i=block/fork | |
class | WiseRoute |
Gates
Name | Direction | Size | Description |
---|---|---|---|
transportIn | input | ||
transportOut | output | ||
queueIn | input | ||
queueOut | output |
Signals
Name | Type | Unit |
---|---|---|
packetReceivedFromUpper | cPacket | |
packetReceivedFromLower | cPacket | |
packetDropped | cPacket | |
packetSentToLower | cPacket | |
packetSentToUpper | cPacket |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
MessageDispatcher | inet::MessageDispatcher::handleRegisterProtocol | handleRegisterProtocol |
MessageDispatcher | inet::MessageDispatcher::handleRegisterService | handleRegisterService |
InterfaceTable | inet::InterfaceTable::findFirstNonLoopbackInterface | findFirstNonLoopbackInterface |
Called methods (observed)
function | info | call from |
---|---|---|
inet::WiseRoute::handleRegisterProtocol | handleRegisterProtocol | MessageDispatcher |
inet::WiseRoute::handleRegisterService | handleRegisterService | MessageDispatcher |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
queueIn | Packet | 0 | EthernetEncapsulation | DispatchProtocolReq, InterfaceInd, MacAddressInd, PacketProtocolTag | |
transportIn | Packet | 0 | PingApp | DispatchProtocolReq, L3AddressReq, PacketProtocolTag, SocketReq | |
transportIn | Packet | 0 | EchoProtocol | DispatchProtocolReq, L3AddressReq, PacketProtocolTag | |
transportIn | Request | 1 | L3SocketBindCommand | PingApp | DispatchProtocolReq, SocketReq |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
queueOut | Packet | 0 | EthernetEncapsulation | DispatchProtocolInd, DispatchProtocolReq, InterfaceReq, MacAddressReq, PacketProtocolTag, L3AddressReq?, SocketReq? | |
transportOut | Packet | 0 | PingApp | DispatchProtocolReq, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, SocketInd | |
transportOut | Packet | 0 | EchoProtocol | DispatchProtocolReq, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag |
Packet operations (observed)
chunkType | packetAction |
---|---|
WiseRouteHeader | insertAtFront, peekAtFront, popAtFront, removeAtFront |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
clearTags | |
DispatchProtocolInd | addTagIfAbsent |
DispatchProtocolReq | addTagIfAbsent |
InterfaceReq | addTagIfAbsent |
L3AddressInd | addTagIfAbsent, getTag |
L3AddressReq | findTag |
MacAddressReq | addTagIfAbsent |
NetworkProtocolInd | addTagIfAbsent |
PacketProtocolTag | addTagIfAbsent, getTag |
SocketInd | addTagIfAbsent |
SocketReq | getTag |
Tagging operations (observed)
tagType | tagAction |
---|---|
inet::Ipv4InterfaceData | findTag |
inet::Ipv6InterfaceData | findTag |
inet::NextHopInterfaceData | findTag |
Source code
// // Wiseroute is a simple loop-free routing algorithm that // builds a routing tree from a central network point, designed // for sensor networks and convergecast traffic. // // The sink (the device at the center of the network) broadcasts // a route building message. Each network node that receives it // selects the sink as parent in the routing tree, and rebroadcasts // the route building message. This procedure maximizes the probability // that all network nodes can join the network, and avoids loops. // Parameter sinkAddress gives the sink network address, // rssiThreshold is a threshold to avoid using bad links (with too low // RSSI values) for routing, and routeFloodsInterval should be set to // zero for all nodes except the sink. Each routeFloodsInterval, the // sink restarts the tree building procedure. Set it to a large value // if you do not want the tree to be rebuilt. // simple WiseRoute extends NetworkProtocolBase like INetworkProtocol { parameters: int headerLength @unit(b) = default(96b); // length of the network packet header (in bits) // debug switch bool debug = default(false); bool trace = default(false); bool useSimTracer = default(false); // sink node address string sinkAddress; // the sink directs the tree building procedure with periodic floods. // iterationDelay is the period between two floods. // RSSI threshold for route selection double rssiThreshold @unit(dBm) = default(-50 dBm); // If set to zero, this node does not initiates route tree building. // If set to a value larger than zero, this nodes periodically initiates route tree building. double routeFloodsInterval @unit(s) = default(0 s); string arpModule; // The path to the ARP module @display("i=block/fork"); @class(WiseRoute); }File: src/inet/networklayer/wiseroute/WiseRoute.ned