INET Framework for OMNeT++/OMNEST
inet::ospfv3::Ospfv3NeighborStateAttempt Class Reference

#include <Ospfv3NeighborStateAttempt.h>

Inheritance diagram for inet::ospfv3::Ospfv3NeighborStateAttempt:
inet::ospfv3::Ospfv3NeighborState

Public Member Functions

virtual void processEvent (Ospfv3Neighbor *neighbor, Ospfv3Neighbor::Ospfv3NeighborEventType event) override
 
virtual Ospfv3Neighbor::Ospfv3NeighborStateType getState () const override
 
virtual std::string getNeighborStateString () override
 
 ~Ospfv3NeighborStateAttempt ()
 
- Public Member Functions inherited from inet::ospfv3::Ospfv3NeighborState
virtual ~Ospfv3NeighborState ()
 

Additional Inherited Members

- Protected Member Functions inherited from inet::ospfv3::Ospfv3NeighborState
void changeState (Ospfv3Neighbor *neighbor, Ospfv3NeighborState *newState, Ospfv3NeighborState *currentState)
 

Constructor & Destructor Documentation

◆ ~Ospfv3NeighborStateAttempt()

inet::ospfv3::Ospfv3NeighborStateAttempt::~Ospfv3NeighborStateAttempt ( )
inline
21 {};

Member Function Documentation

◆ getNeighborStateString()

virtual std::string inet::ospfv3::Ospfv3NeighborStateAttempt::getNeighborStateString ( )
inlineoverridevirtual

Implements inet::ospfv3::Ospfv3NeighborState.

20 { return std::string("Ospfv3NeighborStateAttempt"); }

◆ getState()

virtual Ospfv3Neighbor::Ospfv3NeighborStateType inet::ospfv3::Ospfv3NeighborStateAttempt::getState ( ) const
inlineoverridevirtual

◆ processEvent()

void inet::ospfv3::Ospfv3NeighborStateAttempt::processEvent ( Ospfv3Neighbor neighbor,
Ospfv3Neighbor::Ospfv3NeighborEventType  event 
)
overridevirtual

Implements inet::ospfv3::Ospfv3NeighborState.

17 {
18  if ((event == Ospfv3Neighbor::KILL_NEIGHBOR) || (event == Ospfv3Neighbor::LINK_DOWN)) {
19  neighbor->reset();
20  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getInactivityTimer());
21  changeState(neighbor, new Ospfv3NeighborStateDown, this);
22  }
23  if (event == Ospfv3Neighbor::INACTIVITY_TIMER) {
24  neighbor->reset();
25  if (neighbor->getInterface()->getType() == Ospfv3Interface::NBMA_TYPE)
26  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getPollTimer(), neighbor->getInterface()->getPollInterval());
27 
28  changeState(neighbor, new Ospfv3NeighborStateDown, this);
29  }
30  if (event == Ospfv3Neighbor::HELLO_RECEIVED) {
31  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getInactivityTimer());
32  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getInactivityTimer(), neighbor->getNeighborDeadInterval());
33  changeState(neighbor, new Ospfv3NeighborStateInit, this);
34  }
35 }

The documentation for this class was generated from the following files:
inet::ospfv3::Ospfv3Interface::NBMA_TYPE
@ NBMA_TYPE
Definition: Ospfv3Interface.h:54
inet::ospfv3::Ospfv3Neighbor::ATTEMPT_STATE
@ ATTEMPT_STATE
Definition: Ospfv3Neighbor.h:44
inet::ospfv3::Ospfv3Neighbor::INACTIVITY_TIMER
@ INACTIVITY_TIMER
Definition: Ospfv3Neighbor.h:34
inet::ospfv3::Ospfv3NeighborState::changeState
void changeState(Ospfv3Neighbor *neighbor, Ospfv3NeighborState *newState, Ospfv3NeighborState *currentState)
Definition: Ospfv3NeighborState.cc:14
inet::ospfv3::Ospfv3Neighbor::HELLO_RECEIVED
@ HELLO_RECEIVED
Definition: Ospfv3Neighbor.h:23
inet::ospfv3::Ospfv3Neighbor::LINK_DOWN
@ LINK_DOWN
Definition: Ospfv3Neighbor.h:36
inet::ospfv3::Ospfv3Neighbor::KILL_NEIGHBOR
@ KILL_NEIGHBOR
Definition: Ospfv3Neighbor.h:33