rename NodeList::PeekNode to NodeList::GetNode

Mathieu Lacage 2007-05-10 08:19:19 +02:00
parent e322d7f1df
commit f5451f5bce
4 changed files with 7 additions and 6 deletions

View File

@ -110,7 +110,7 @@ AsciiTrace::LogDevQueue (TraceContext const &context, Packet const &packet)
m_os << Simulator::Now ().GetSeconds () << " "; m_os << Simulator::Now ().GetSeconds () << " ";
NodeList::NodeIndex nodeIndex; NodeList::NodeIndex nodeIndex;
context.Get (nodeIndex); context.Get (nodeIndex);
m_os << "node=" << NodeList::PeekNode (nodeIndex)->GetId () << " "; m_os << "node=" << NodeList::GetNode (nodeIndex)->GetId () << " ";
Ipv4::InterfaceIndex interfaceIndex; Ipv4::InterfaceIndex interfaceIndex;
context.Get (interfaceIndex); context.Get (interfaceIndex);
m_os << "interface=" << interfaceIndex << " "; m_os << "interface=" << interfaceIndex << " ";
@ -124,7 +124,7 @@ AsciiTrace::LogDevRx (TraceContext const &context, Packet &p)
m_os << "r " << Simulator::Now ().GetSeconds () << " "; m_os << "r " << Simulator::Now ().GetSeconds () << " ";
NodeList::NodeIndex nodeIndex; NodeList::NodeIndex nodeIndex;
context.Get (nodeIndex); context.Get (nodeIndex);
m_os << "node=" << NodeList::PeekNode (nodeIndex)->GetId () << " "; m_os << "node=" << NodeList::GetNode (nodeIndex)->GetId () << " ";
Ipv4::InterfaceIndex interfaceIndex; Ipv4::InterfaceIndex interfaceIndex;
context.Get (interfaceIndex); context.Get (interfaceIndex);
m_os << "interface=" << interfaceIndex << " "; m_os << "interface=" << interfaceIndex << " ";

View File

@ -84,7 +84,7 @@ PcapTrace::LogIp (TraceContext const &context, Packet const &p, uint32_t interfa
{ {
NodeList::NodeIndex nodeIndex; NodeList::NodeIndex nodeIndex;
context.Get (nodeIndex); context.Get (nodeIndex);
uint32_t nodeId = NodeList::PeekNode (nodeIndex)->GetId (); uint32_t nodeId = NodeList::GetNode (nodeIndex)->GetId ();
PcapWriter *writer = GetStream (nodeId, interfaceIndex); PcapWriter *writer = GetStream (nodeId, interfaceIndex);
writer->WritePacket (p); writer->WritePacket (p);
} }

View File

@ -145,9 +145,10 @@ NodeList::CreateTraceResolver (TraceContext const &context)
return SimulationSingleton<NodeListPriv>::Get ()->CreateTraceResolver (context); return SimulationSingleton<NodeListPriv>::Get ()->CreateTraceResolver (context);
} }
Ptr<Node> 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;
} }

View File

@ -43,7 +43,7 @@ public:
static Iterator End (void); static Iterator End (void);
static TraceResolver *CreateTraceResolver (TraceContext const &context); static TraceResolver *CreateTraceResolver (TraceContext const &context);
static Ptr<Node> PeekNode (uint32_t n); static Ptr<Node> GetNode (uint32_t n);
}; };
}//namespace ns3 }//namespace ns3