Gpsr¶
Package: inet.routing.gpsr
simple module Gpsr
Provides Greedy Perimeter Stateless Routing for Wireless Networks. The implementation supports both GG and RNG planarization algorithms.
For more information on the routing algorithm, see the GPSR paper http://www.eecs.harvard.edu/~~htk/publication/2000-mobi-karp-kung.pdf
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
A mobile node with the Greedy Perimeter Stateless Routing (GPSR) protocol. It extends AdhocHost by adding the GPSR routing protocol module. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
interfaceTableModule |
string |
The path to the InterfaceTable module |
|
routingTableModule |
string |
“^.ipv4.routingTable” |
|
networkProtocolModule |
string |
“^.ipv4.ip” |
|
planarizationMode |
string |
“GG” |
GPSR parameters |
interfaces |
string |
“*” |
|
beaconInterval |
double |
10s |
|
maxJitter |
double |
0.5 * beaconInterval |
|
neighborValidityInterval |
double |
4.5 * beaconInterval |
|
positionByteLength |
int |
2 * 4B |
|
displayBubbles |
bool |
false |
Display bubble messages about changes in routing state for packets |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
Gpsr |
|
display |
i=block/routing |
properties |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
ipIn |
input |
||
ipOut |
output |
Source code¶
//
// Provides Greedy Perimeter Stateless Routing for Wireless Networks.
// The implementation supports both GG and RNG planarization algorithms.
//
// For more information on the routing algorithm, see the GPSR paper
// http://www.eecs.harvard.edu/~~htk/publication/2000-mobi-karp-kung.pdf
//
simple Gpsr extends SimpleModule like IManetRouting
{
parameters:
@class(Gpsr);
// properties
@display("i=block/routing");
// context parameters
string interfaceTableModule; // The path to the InterfaceTable module
string routingTableModule = default("^.ipv4.routingTable");
string networkProtocolModule = default("^.ipv4.ip");
// GPSR parameters
string planarizationMode @enum("", "GG", "RNG") = default("GG");
string interfaces = default("*");
double beaconInterval @unit(s) = default(10s);
double maxJitter @unit(s) = default(0.5 * beaconInterval);
double neighborValidityInterval @unit(s) = default(4.5 * beaconInterval);
int positionByteLength @unit(B) = default(2 * 4B);
// visualization parameters
bool displayBubbles = default(false); // Display bubble messages about changes in routing state for packets
gates:
input ipIn;
output ipOut;
}