INET Framework for OMNeT++/OMNEST
|
Wiseroute is a simple loop-free routing algorithm that builds a routing tree from a central network point. More...
#include <WiseRoute.h>
Classes | |
struct | tRouteTableEntry |
Public Member Functions | |
WiseRoute () | |
virtual int | numInitStages () const override |
Initialization of the module and some variables. More... | |
virtual void | initialize (int) override |
virtual void | finish () override |
virtual | ~WiseRoute () |
Public Member Functions inherited from inet::OperationalBase | |
OperationalBase () | |
Public Member Functions inherited from inet::ILifecycle | |
virtual | ~ILifecycle () |
Public Member Functions inherited from inet::INetworkProtocol | |
virtual | ~INetworkProtocol () |
Protected Types | |
enum | messagesTypes { DATA, ROUTE_FLOOD, SEND_ROUTE_FLOOD_TIMER } |
enum | floodTypes { NOTAFLOOD, FORWARD, FORME, DUPLICATE } |
typedef enum inet::WiseRoute::floodTypes | floodTypes |
typedef struct inet::WiseRoute::tRouteTableEntry | tRouteTableEntry |
typedef std::map< L3Address, tRouteTableEntry > | tRouteTable |
typedef std::multimap< tRouteTable::key_type, unsigned long > | tFloodTable |
Protected Member Functions | |
Handle Messages | |
Functions to redefine by the programmer These are the functions provided to add own functionality to your modules. These functions are called whenever a self message or a data message from the upper or lower layer arrives respectively. | |
virtual void | handleUpperPacket (cPacket *msg) override |
Handle messages from upper layer. More... | |
virtual void | handleLowerPacket (cPacket *msg) override |
Handle messages from lower layer. More... | |
virtual void | handleSelfMessage (cMessage *msg) override |
Handle self messages. More... | |
virtual void | updateRouteTable (const tRouteTable::key_type &origin, const L3Address &lastHop, double rssi, double ber) |
Update routing table. More... | |
cMessage * | decapsMsg (WiseRouteDatagram *msg) |
Decapsulate a message. More... | |
floodTypes | updateFloodTable (bool isFlood, const tFloodTable::key_type &srcAddr, const tFloodTable::key_type &destAddr, unsigned long seqNum) |
update flood table. More... | |
tFloodTable::key_type | getRoute (const tFloodTable::key_type &destAddr, bool iAmOrigin=false) const |
find a route to destination address. More... | |
virtual cObject * | setDownControlInfo (cMessage *const pMsg, const MACAddress &pDestAddr) |
Attaches a "control info" (NetwToMac) structure (object) to the message pMsg. More... | |
Protected Member Functions inherited from inet::NetworkProtocolBase | |
NetworkProtocolBase () | |
virtual void | handleUpperCommand (cMessage *message) override |
virtual void | sendUp (cMessage *message, int transportProtocol) |
virtual void | sendDown (cMessage *message, int interfaceId=-1) |
virtual bool | isUpperMessage (cMessage *message) override |
virtual bool | isLowerMessage (cMessage *message) override |
virtual bool | isInitializeStage (int stage) override |
virtual bool | isNodeStartStage (int stage) override |
virtual bool | isNodeShutdownStage (int stage) override |
Protected Member Functions inherited from inet::LayeredProtocolBase | |
virtual void | handleMessageWhenUp (cMessage *message) override |
virtual void | handleLowerCommand (cMessage *message) |
Protected Member Functions inherited from inet::OperationalBase | |
virtual void | handleMessage (cMessage *msg) override |
virtual void | handleMessageWhenDown (cMessage *msg) |
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
Perform one stage of a lifecycle operation. More... | |
virtual bool | handleNodeStart (IDoneCallback *doneCallback) |
virtual bool | handleNodeShutdown (IDoneCallback *doneCallback) |
virtual void | handleNodeCrash () |
virtual void | setOperational (bool isOperational) |
Private Member Functions | |
WiseRoute (const WiseRoute &) | |
Copy constructor is not allowed. More... | |
WiseRoute & | operator= (const WiseRoute &) |
Assignment operator is not allowed. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from inet::LayeredProtocolBase | |
static simsignal_t | packetSentToUpperSignal = registerSignal("packetSentToUpper") |
static simsignal_t | packetReceivedFromUpperSignal = registerSignal("packetReceivedFromUpper") |
static simsignal_t | packetFromUpperDroppedSignal = registerSignal("packetFromUpperDropped") |
static simsignal_t | packetSentToLowerSignal = registerSignal("packetSentToLower") |
static simsignal_t | packetReceivedFromLowerSignal = registerSignal("packetReceivedFromLower") |
static simsignal_t | packetFromLowerDroppedSignal = registerSignal("packetFromLowerDropped") |
Wiseroute is a simple loop-free routing algorithm that builds a routing tree from a central network point.
It is especially useful for wireless sensor networks and convergecast traffic, hence its name (Wireless Sensors Routing). 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.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
Copy constructor is not allowed.
|
virtual |
|
protected |
|
overridevirtual |
|
protected |
find a route to destination address.
Referenced by handleLowerPacket(), and handleUpperPacket().
|
overrideprotectedvirtual |
Handle messages from lower layer.
Implements inet::LayeredProtocolBase.
|
overrideprotectedvirtual |
Handle self messages.
Reimplemented from inet::LayeredProtocolBase.
|
overrideprotectedvirtual |
Handle messages from upper layer.
Implements inet::LayeredProtocolBase.
|
overridevirtual |
Reimplemented from inet::NetworkProtocolBase.
|
inlineoverridevirtual |
Assignment operator is not allowed.
|
protectedvirtual |
Attaches a "control info" (NetwToMac) structure (object) to the message pMsg.
Attaches a "control info" structure (object) to the down message pMsg.
This is most useful when passing packets between protocol layers of a protocol stack, the control info will contain the destination MAC address.
The "control info" object will be deleted when the message is deleted. Only one "control info" structure can be attached (the second setL3ToL2ControlInfo() call throws an error).
pMsg | The message where the "control info" shall be attached. |
pDestAddr | The MAC address of the message receiver. |
Referenced by handleLowerPacket(), handleSelfMessage(), and handleUpperPacket().
|
protected |
update flood table.
returns detected flood type (general or unicast flood to forward, duplicate flood to delete, unicast flood to me
Referenced by handleLowerPacket().
|
protectedvirtual |
Update routing table.
The tuple provided in argument gives the next hop address to the origin. The table is updated only if the RSSI value is above the threshold.
Referenced by handleLowerPacket().
|
protected |
Referenced by handleLowerPacket(), and initialize().
|
protected |
Referenced by handleLowerPacket(), and initialize().
|
protected |
Referenced by handleLowerPacket(), handleUpperPacket(), and initialize().
|
protected |
Flood sequence number.
Referenced by handleSelfMessage(), handleUpperPacket(), and initialize().
|
protected |
Referenced by handleSelfMessage(), handleUpperPacket(), and updateFloodTable().
|
protected |
Length of the NetwPkt header Read from omnetpp.ini.
Referenced by handleSelfMessage(), handleUpperPacket(), and initialize().
|
protected |
Referenced by getRoute(), handleLowerPacket(), handleSelfMessage(), handleUpperPacket(), initialize(), and updateFloodTable().
|
protected |
Referenced by finish(), handleLowerPacket(), and initialize().
|
protected |
Referenced by finish(), handleLowerPacket(), and initialize().
|
protected |
Referenced by finish(), handleUpperPacket(), and initialize().
|
protected |
Referenced by finish(), handleLowerPacket(), and initialize().
|
protected |
Referenced by finish(), handleSelfMessage(), handleUpperPacket(), and initialize().
|
protected |
Referenced by finish(), handleLowerPacket(), handleUpperPacket(), and initialize().
|
protected |
Referenced by decapsMsg(), finish(), and initialize().
|
protected |
Referenced by finish(), handleLowerPacket(), and initialize().
|
protected |
Referenced by finish(), handleUpperPacket(), and initialize().
|
protected |
Referenced by finish(), handleLowerPacket(), and initialize().
|
protected |
Referenced by finish(), handleSelfMessage(), and initialize().
|
protected |
Referenced by finish(), initialize(), and updateRouteTable().
|
protected |
Referenced by finish(), handleLowerPacket(), and initialize().
|
protected |
Referenced by initialize().
|
protected |
Referenced by initialize(), and updateRouteTable().
|
protected |
Referenced by initialize(), and updateRouteTable().
|
protected |
Referenced by initialize(), and updateRouteTable().
|
protected |
Interval [seconds] between two route floods.
A route flood is a simple flood from which other nodes can extract routing (next hop) information.
Referenced by handleSelfMessage(), and initialize().
|
protected |
Referenced by handleSelfMessage(), initialize(), and ~WiseRoute().
|
protected |
Referenced by initialize(), and updateRouteTable().
|
protected |
Referenced by getRoute(), and updateRouteTable().
|
protected |
Minimal received RSSI necessary for adding source to routing table.
Referenced by initialize(), and updateRouteTable().
|
protected |
Referenced by initialize().
|
protected |