INET Framework for OMNeT++/OMNEST
inet::PIMBase::Interface Struct Reference

#include <PIMBase.h>

Inheritance diagram for inet::PIMBase::Interface:
inet::PIMDM::DownstreamInterface inet::PIMDM::UpstreamInterface inet::PIMSM::PimsmInterface inet::PIMSM::DownstreamInterface inet::PIMSM::UpstreamInterface

Public Types

enum  AssertState { NO_ASSERT_INFO, I_LOST_ASSERT, I_WON_ASSERT }
 

Public Member Functions

 Interface (RouteEntry *owner, InterfaceEntry *ie)
 
virtual ~Interface ()
 
bool isFlagSet (int flag) const
 
void setFlags (int flags)
 
void clearFlag (int flag)
 
void setFlag (int flag, bool value)
 
void startAssertTimer (double assertTime)
 
void deleteAssertInfo ()
 

Public Attributes

RouteEntryowner
 
InterfaceEntryie
 
int flags
 
AssertState assertState
 
cMessage * assertTimer
 
AssertMetric winnerMetric
 

Member Enumeration Documentation

Enumerator
NO_ASSERT_INFO 
I_LOST_ASSERT 
I_WON_ASSERT 

Constructor & Destructor Documentation

inet::PIMBase::Interface::Interface ( RouteEntry owner,
InterfaceEntry ie 
)
inline
93  : owner(owner), ie(ie), flags(0),
95  { ASSERT(owner), ASSERT(ie); }
RouteEntry * owner
Definition: PIMBase.h:82
int flags
Definition: PIMBase.h:84
InterfaceEntry * ie
Definition: PIMBase.h:83
AssertState assertState
Definition: PIMBase.h:88
cMessage * assertTimer
Definition: PIMBase.h:89
virtual inet::PIMBase::Interface::~Interface ( )
inlinevirtual
96 { owner->owner->cancelAndDelete(assertTimer); }
RouteEntry * owner
Definition: PIMBase.h:82
PIMBase * owner
Definition: PIMBase.h:64
cMessage * assertTimer
Definition: PIMBase.h:89

Member Function Documentation

void inet::PIMBase::Interface::clearFlag ( int  flag)
inline
100 { flags &= (~flag); }
int flags
Definition: PIMBase.h:84
void inet::PIMBase::Interface::deleteAssertInfo ( )
inline

Referenced by inet::PIMDM::processAssert(), inet::PIMSM::processAssertG(), inet::PIMSM::processAssertSG(), inet::PIMDM::processAssertTimer(), and inet::PIMSM::processAssertTimer().

112  {
115  owner->owner->cancelAndDelete(assertTimer);
116  assertTimer = nullptr;
117  }
AssertMetric winnerMetric
Definition: PIMBase.h:90
RouteEntry * owner
Definition: PIMBase.h:82
static const AssertMetric PIM_INFINITE
Definition: PIMBase.h:48
PIMBase * owner
Definition: PIMBase.h:64
AssertState assertState
Definition: PIMBase.h:88
cMessage * assertTimer
Definition: PIMBase.h:89
bool inet::PIMBase::Interface::isFlagSet ( int  flag) const
inline
98 { return (flags & flag) != 0; }
int flags
Definition: PIMBase.h:84
void inet::PIMBase::Interface::setFlag ( int  flag,
bool  value 
)
inline
101 { if (value) setFlags(flag); else clearFlag(flag); }
void setFlags(int flags)
Definition: PIMBase.h:99
void clearFlag(int flag)
Definition: PIMBase.h:100
void inet::PIMBase::Interface::setFlags ( int  flags)
inline
99 { this->flags |= flags; }
int flags
Definition: PIMBase.h:84
void inet::PIMBase::Interface::startAssertTimer ( double  assertTime)
inline

Referenced by inet::PIMDM::multicastPacketArrivedOnNonRpfInterface(), inet::PIMSM::multicastPacketArrivedOnNonRpfInterface(), inet::PIMDM::processAssert(), inet::PIMSM::processAssertG(), and inet::PIMSM::processAssertSG().

104  {
105  ASSERT(assertTimer == nullptr);
106  assertTimer = new cMessage("PimAssertTimer", AssertTimer);
107  assertTimer->setContextPointer(this);
108  owner->owner->scheduleAt(simTime() + assertTime, assertTimer);
109  }
Definition: PIMBase.h:137
RouteEntry * owner
Definition: PIMBase.h:82
PIMBase * owner
Definition: PIMBase.h:64
cMessage * assertTimer
Definition: PIMBase.h:89

Member Data Documentation

int inet::PIMBase::Interface::flags
RouteEntry* inet::PIMBase::Interface::owner

The documentation for this struct was generated from the following file: