File: contrib/netwLayer/Flood.ned
C++ definition: click here
A simple flooding protocol
This implementation uses plain flooding, i.e. it "remembers" (stores) already broadcasted messages in a list and does not rebroadcast them again, if it gets another copy of that message.
The maximum number of entires for that list can be defined in the .ini file (@ref bcMaxEntries) as well as the time after which an entry is deleted (@ref bcDelTime).
If you prefere a memory-less version you can comment out the <verbatim> #define PLAINFLOODING </verbatim>
Author: Daniel Willkomm
The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.
If a module type shows up more than once, that means it has been defined in more than one NED file.
FloodHost |
Name | Type | Description |
---|---|---|
debug | bool | debug switch |
headerLength | numeric const | length of the network header |
plainFlooding | bool | flag whether to use plain flooding |
bcMaxEntries | numeric const | Max number of entries in the list of already broadcasted messages |
bcDelTime | numeric const | Time after which an entry for an already broadcasted msg can be deleted |
defaultTtl | numeric const | Default time-to-live (ttl) used for this module |
Name | Direction | Description |
---|---|---|
uppergateIn | input | from application layer |
uppergateOut | output | to application layer |
upperControlOut | output | for control messages to upper layer |
lowergateIn | input | from MAC layer |
lowerControlIn | input | for control messages from mac layer |
lowergateOut | output | to MAC layer |
simple Flood parameters: debug : bool, // debug switch headerLength : numeric const, // length of the network header plainFlooding: bool, // flag whether to use plain flooding // Max number of entries in the list of already broadcasted messages bcMaxEntries : numeric const, // Time after which an entry for an already broadcasted msg can be deleted bcDelTime : numeric const, defaultTtl : numeric const; // Default time-to-live (ttl) used for this module gates: in: uppergateIn; // from application layer out: uppergateOut; // to application layer out: upperControlOut; // for control messages to upper layer in: lowergateIn; // from MAC layer in: lowerControlIn; // for control messages from mac layer out: lowergateOut; // to MAC layer endsimple