11#include "ns3/assert.h"
52 os <<
"*** CandidateQueue Begin (<id, distance, LSA-type>) ***" << std::endl;
53 for (
auto iter = list.begin(); iter != list.end(); iter++)
55 os <<
"<" << (*iter)->GetVertexId() <<
", " << (*iter)->GetDistanceFromRoot() <<
", "
56 << (*iter)->GetVertexType() <<
">" << std::endl;
58 os <<
"*** CandidateQueue End ***";
A Candidate Queue used in routing calculations.
static bool CompareSPFVertex(const SPFVertex *v1, const SPFVertex *v2)
return true if v1 < v2
SPFVertex * Pop()
Pop the Shortest Path First Vertex pointer at the top of the queue.
SPFVertex * Top() const
Return the Shortest Path First Vertex pointer at the top of the queue.
uint32_t Size() const
Return the number of Shortest Path First Vertex pointers presently stored in the Candidate Queue.
void Push(SPFVertex *vNew)
Push a Shortest Path First Vertex pointer onto the queue according to the priority scheme.
void Reorder()
Reorders the Candidate Queue according to the priority scheme.
std::list< SPFVertex * > CandidateList_t
container of SPFVertex pointers
virtual ~CandidateQueue()
Destroy an SPF Candidate Queue and release any resources held by the contents.
CandidateList_t m_candidates
SPFVertex candidates.
void Clear()
Empty the Candidate Queue and release all of the resources associated with the Shortest Path First Ve...
SPFVertex * Find(const Ipv4Address addr) const
Searches the Candidate Queue for a Shortest Path First Vertex pointer that points to a vertex having ...
CandidateQueue()
Create an empty SPF Candidate Queue.
bool Empty() const
Test the Candidate Queue to determine if it is empty.
Ipv4 addresses are stored in host order in this class.
Vertex used in shortest path first (SPF) computations.
Ipv4Address GetVertexId() const
Get the Vertex ID field of a SPFVertex object.
VertexType
Enumeration of the possible types of SPFVertex objects.
@ VertexNetwork
Vertex representing a network in the topology.
@ VertexRouter
Vertex representing a router in the topology.
VertexType GetVertexType() const
Get the Vertex Type field of a SPFVertex object.
uint32_t GetDistanceFromRoot() const
Get the distance from the root vertex to "this" SPFVertex object.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)