INET Framework for OMNeT++/OMNEST
|
This class extends ProbabilisticBroadcast by adding an algorithm which adapts broadcasting parameters according to network conditions. More...
#include <AdaptiveProbabilisticBroadcast.h>
Public Member Functions | |
AdaptiveProbabilisticBroadcast () | |
virtual void | initialize (int) override |
Initialization of the module and some variables. More... | |
Public Member Functions inherited from inet::ProbabilisticBroadcast | |
ProbabilisticBroadcast () | |
virtual int | numInitStages () const override |
Initialization of the module and some variables. More... | |
virtual void | finish () override |
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 | |
typedef std::map< L3Address, cMessage * > | NeighborMap |
Protected Types inherited from inet::ProbabilisticBroadcast | |
enum | messagesTypes { UNKNOWN = 0, BROADCAST_TIMER, NEIGHBOR_TIMER, BETA_TIMER } |
typedef struct inet::ProbabilisticBroadcast::tMsgDesc | tMsgDesc |
Store messages in a structure so that we can keep some information needed by the protocol. More... | |
typedef std::set< unsigned int > | MsgIdSet |
typedef std::multimap< simtime_t, tMsgDesc * > | TimeMsgMap |
Protected Member Functions | |
virtual void | handleLowerPacket (cPacket *msg) override |
Handle messages from lower layer. More... | |
virtual void | handleSelfMessage (cMessage *msg) override |
Handle self messages. More... | |
void | updateNeighMap (ProbabilisticBroadcastDatagram *m) |
void | updateBeta () |
Protected Member Functions inherited from inet::ProbabilisticBroadcast | |
virtual void | handleUpperPacket (cPacket *msg) override |
Handle messages from upper layer. More... | |
virtual bool | messageKnown (unsigned int msgId) |
Checks whether a message is known (= kept in memory) or not. More... | |
virtual bool | debugMessageKnown (unsigned int msgId) |
Checks whether a message is known (= kept in memory) or not. More... | |
virtual void | insertMessage (simtime_t_cref bcastDelay, tMsgDesc *msgDesc) |
Insert a message in both known ID list and message queue. More... | |
virtual tMsgDesc * | popFirstMessageUpdateQueue (void) |
Returns the descriptor of the first message in the queue, then remove its pointer from the queue and its id from the known IDs list. More... | |
virtual cPacket * | encapsMsg (cPacket *msg) |
Returns a network layer packet which encapsulates the upper layer packet passed to the function. More... | |
virtual cPacket * | decapsMsg (ProbabilisticBroadcastDatagram *msg) |
extracts and returns the application layer packet which is encapsulated in the network layer packet given in argument. More... | |
virtual void | insertNewMessage (ProbabilisticBroadcastDatagram *pkt, bool iAmInitialSender=false) |
Insert a new message in both known ID list and message queue. 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) |
Protected Attributes | |
simtime_t | timeInNeighboursTable |
Default ttl for NeighborTable entries in seconds. More... | |
cOutVector | bvec |
NeighborMap | neighMap |
Protected Attributes inherited from inet::ProbabilisticBroadcast | |
simtime_t | broadcastPeriod |
Period (in sim time) between two broadcast attempts. More... | |
double | beta |
Probability of each broadcast attempt. More... | |
simtime_t | timeToLive |
int | maxNbBcast |
Maximal number of broadcast attempts for each packet. More... | |
int | maxFirstBcastBackoff |
Maximal back-off before first broadcast attempt [seconds]. More... | |
simtime_t | timeInQueueAfterDeath |
How long the message should be kept in queue after its died. More... | |
int | headerLength |
Length of the NetwPkt header Read from omnetpp.ini. More... | |
cMessage * | broadcastTimer |
MsgIdSet | knownMsgIds |
TimeMsgMap | msgQueue |
MsgIdSet | debugMsgIdSet |
long | nbDataPacketsReceived |
long | nbDataPacketsSent |
long | nbHops |
int | debugNbMessageKnown |
long | nbDataPacketsForwarded |
cOutVector | oneHopLatencies |
L3Address | myNetwAddr |
Protected Attributes inherited from inet::NetworkProtocolBase | |
ProtocolMapping | protocolMapping |
IInterfaceTable * | interfaceTable |
Protected Attributes inherited from inet::OperationalBase | |
bool | isOperational |
simtime_t | lastChange |
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") |
Static Protected Member Functions inherited from inet::ProbabilisticBroadcast | |
static long | getNextID () |
Static Protected Attributes inherited from inet::ProbabilisticBroadcast | |
static long | id_counter = 0 |
This class extends ProbabilisticBroadcast by adding an algorithm which adapts broadcasting parameters according to network conditions.
|
protected |
|
inline |
|
overrideprotectedvirtual |
Handle messages from lower layer.
Reimplemented from inet::ProbabilisticBroadcast.
|
overrideprotectedvirtual |
Handle self messages.
Reimplemented from inet::ProbabilisticBroadcast.
|
overridevirtual |
Initialization of the module and some variables.
Reimplemented from inet::ProbabilisticBroadcast.
|
protected |
Referenced by handleSelfMessage(), and updateNeighMap().
|
protected |
Referenced by handleLowerPacket().
|
protected |
Referenced by initialize(), and updateBeta().
|
protected |
Referenced by handleSelfMessage(), updateBeta(), and updateNeighMap().
|
protected |
Default ttl for NeighborTable entries in seconds.
Referenced by initialize(), and updateNeighMap().