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

#include <Ospfv3NeighborStateExStart.h>

Inheritance diagram for inet::ospfv3::Ospfv3NeighborStateExStart:
inet::ospfv3::Ospfv3NeighborState

Public Member Functions

 ~Ospfv3NeighborStateExStart ()
 
virtual void processEvent (Ospfv3Neighbor *neighbor, Ospfv3Neighbor::Ospfv3NeighborEventType event) override
 
virtual Ospfv3Neighbor::Ospfv3NeighborStateType getState () const override
 
virtual std::string getNeighborStateString () override
 
- 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

◆ ~Ospfv3NeighborStateExStart()

inet::ospfv3::Ospfv3NeighborStateExStart::~Ospfv3NeighborStateExStart ( )
inline
19 {}

Member Function Documentation

◆ getNeighborStateString()

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

Implements inet::ospfv3::Ospfv3NeighborState.

22 { return std::string("Ospfv3NeighborStateExStart"); }

◆ getState()

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

◆ processEvent()

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

Implements inet::ospfv3::Ospfv3NeighborState.

22 {
23  if ((event == Ospfv3Neighbor::KILL_NEIGHBOR) || (event == Ospfv3Neighbor::LINK_DOWN)) {
24  neighbor->reset();
25  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getInactivityTimer());
26  changeState(neighbor, new Ospfv3NeighborStateDown, this);
27  }
28  if (event == Ospfv3Neighbor::INACTIVITY_TIMER) {
29  neighbor->reset();
30  if (neighbor->getInterface()->getType() == Ospfv3Interface::NBMA_TYPE)
31  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getPollTimer(), neighbor->getInterface()->getPollInterval());
32 
33  changeState(neighbor, new Ospfv3NeighborStateDown, this);
34  }
35  if (event == Ospfv3Neighbor::ONEWAY_RECEIVED) {
36  neighbor->reset();
37  changeState(neighbor, new Ospfv3NeighborStateInit, this);
38  }
39  if (event == Ospfv3Neighbor::HELLO_RECEIVED) {
40  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getInactivityTimer());
41  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getInactivityTimer(), neighbor->getInterface()->getDeadInterval());
42  }
43  if (event == Ospfv3Neighbor::IS_ADJACENCY_OK) {
44  EV_DEBUG << "Ospfv3Neighbor::IS_ADJACENCY_OK caught in ExStartState for neighbor " << neighbor->getNeighborID() << "\n";
45  if (!neighbor->needAdjacency()) {
46  EV_DEBUG << "The adjacency is needed for neighbor " << neighbor->getNeighborID() << "\n";
47  neighbor->reset();
48  changeState(neighbor, new Ospfv3NeighborState2Way, this);
49  }
50  }
52  EV_DEBUG << "Ospfv3Neighbor::DD_RETRANSMISSION_TIMER caught in ExStartState\n";
53  neighbor->retransmitDatabaseDescriptionPacket();
54  neighbor->getInterface()->getArea()->getInstance()->getProcess()->setTimer(neighbor->getDDRetransmissionTimer(), neighbor->getInterface()->getRetransmissionInterval());
55  }
56  if (event == Ospfv3Neighbor::NEGOTIATION_DONE) {
57  EV_DEBUG << "Ospfv3Neighbor::NEGOTIATION_DONE caught in ExStartState\n";
58  neighbor->createDatabaseSummary();
59  EV_DEBUG << "SummaryListCount " << neighbor->getDatabaseSummaryListCount() << endl;
60  neighbor->sendDDPacket();
61  neighbor->getInterface()->getArea()->getInstance()->getProcess()->clearTimer(neighbor->getDDRetransmissionTimer());
62  changeState(neighbor, new Ospfv3NeighborStateExchange, this);
63  }
64 }

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::EXCHANGE_START_STATE
@ EXCHANGE_START_STATE
Definition: Ospfv3Neighbor.h:47
inet::ospfv3::Ospfv3Neighbor::ONEWAY_RECEIVED
@ ONEWAY_RECEIVED
Definition: Ospfv3Neighbor.h:32
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::NEGOTIATION_DONE
@ NEGOTIATION_DONE
Definition: Ospfv3Neighbor.h:26
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::IS_ADJACENCY_OK
@ IS_ADJACENCY_OK
Definition: Ospfv3Neighbor.h:30
inet::ospfv3::Ospfv3Neighbor::DD_RETRANSMISSION_TIMER
@ DD_RETRANSMISSION_TIMER
Definition: Ospfv3Neighbor.h:37
inet::ospfv3::Ospfv3Neighbor::KILL_NEIGHBOR
@ KILL_NEIGHBOR
Definition: Ospfv3Neighbor.h:33