rename NodeList::PeekNode to NodeList::GetNode
parent
e322d7f1df
commit
f5451f5bce
|
@ -110,7 +110,7 @@ AsciiTrace::LogDevQueue (TraceContext const &context, Packet const &packet)
|
|||
m_os << Simulator::Now ().GetSeconds () << " ";
|
||||
NodeList::NodeIndex nodeIndex;
|
||||
context.Get (nodeIndex);
|
||||
m_os << "node=" << NodeList::PeekNode (nodeIndex)->GetId () << " ";
|
||||
m_os << "node=" << NodeList::GetNode (nodeIndex)->GetId () << " ";
|
||||
Ipv4::InterfaceIndex interfaceIndex;
|
||||
context.Get (interfaceIndex);
|
||||
m_os << "interface=" << interfaceIndex << " ";
|
||||
|
@ -124,7 +124,7 @@ AsciiTrace::LogDevRx (TraceContext const &context, Packet &p)
|
|||
m_os << "r " << Simulator::Now ().GetSeconds () << " ";
|
||||
NodeList::NodeIndex nodeIndex;
|
||||
context.Get (nodeIndex);
|
||||
m_os << "node=" << NodeList::PeekNode (nodeIndex)->GetId () << " ";
|
||||
m_os << "node=" << NodeList::GetNode (nodeIndex)->GetId () << " ";
|
||||
Ipv4::InterfaceIndex interfaceIndex;
|
||||
context.Get (interfaceIndex);
|
||||
m_os << "interface=" << interfaceIndex << " ";
|
||||
|
|
|
@ -84,7 +84,7 @@ PcapTrace::LogIp (TraceContext const &context, Packet const &p, uint32_t interfa
|
|||
{
|
||||
NodeList::NodeIndex nodeIndex;
|
||||
context.Get (nodeIndex);
|
||||
uint32_t nodeId = NodeList::PeekNode (nodeIndex)->GetId ();
|
||||
uint32_t nodeId = NodeList::GetNode (nodeIndex)->GetId ();
|
||||
PcapWriter *writer = GetStream (nodeId, interfaceIndex);
|
||||
writer->WritePacket (p);
|
||||
}
|
||||
|
|
|
@ -145,9 +145,10 @@ NodeList::CreateTraceResolver (TraceContext const &context)
|
|||
return SimulationSingleton<NodeListPriv>::Get ()->CreateTraceResolver (context);
|
||||
}
|
||||
Ptr<Node>
|
||||
NodeList::PeekNode (uint32_t n)
|
||||
NodeList::GetNode (uint32_t n)
|
||||
{
|
||||
return SimulationSingleton<NodeListPriv>::Get ()->PeekNode (n);
|
||||
Node *node = SimulationSingleton<NodeListPriv>::Get ()->PeekNode (n);
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
static Iterator End (void);
|
||||
static TraceResolver *CreateTraceResolver (TraceContext const &context);
|
||||
|
||||
static Ptr<Node> PeekNode (uint32_t n);
|
||||
static Ptr<Node> GetNode (uint32_t n);
|
||||
};
|
||||
|
||||
}//namespace ns3
|
||||
|
|
Loading…
Reference in New Issue