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