Bug 1179 - Add LTE trace hooks for supporting visualizer
This commit is contained in:
@@ -153,12 +153,19 @@ PyViz::PyViz ()
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::PointToPointNetDevice/MacRx",
|
||||
MakeCallback (&PyViz::TraceNetDevRxPointToPoint, this));
|
||||
|
||||
// WiMax
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Tx",
|
||||
MakeCallback (&PyViz::TraceNetDevTxWimax, this));
|
||||
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Rx",
|
||||
MakeCallback (&PyViz::TraceNetDevRxWimax, this));
|
||||
|
||||
// LTE
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/Tx",
|
||||
MakeCallback (&PyViz::TraceNetDevTxLte, this));
|
||||
|
||||
Config::Connect ("/NodeList/*/DeviceList/*/$ns3::LteNetDevice/Rx",
|
||||
MakeCallback (&PyViz::TraceNetDevRxLte, this));
|
||||
}
|
||||
|
||||
void
|
||||
@@ -820,6 +827,19 @@ PyViz::TraceNetDevRxWimax (std::string context, Ptr<const Packet> packet, Mac48A
|
||||
TraceNetDevRxCommon (context, packet, source);
|
||||
}
|
||||
|
||||
void
|
||||
PyViz::TraceNetDevTxLte (std::string context, Ptr<const Packet> packet, Mac48Address const &destination)
|
||||
{
|
||||
NS_LOG_FUNCTION (context);
|
||||
TraceNetDevTxCommon (context, packet, destination);
|
||||
}
|
||||
|
||||
void
|
||||
PyViz::TraceNetDevRxLte (std::string context, Ptr<const Packet> packet, Mac48Address const &source)
|
||||
{
|
||||
NS_LOG_FUNCTION (context);
|
||||
TraceNetDevRxCommon (context, packet, source);
|
||||
}
|
||||
|
||||
// ---------------------
|
||||
|
||||
|
||||
@@ -212,6 +212,9 @@ private:
|
||||
void TraceNetDevTxWimax (std::string context, Ptr<const Packet> packet, Mac48Address const &destination);
|
||||
void TraceNetDevRxWimax (std::string context, Ptr<const Packet> packet, Mac48Address const &source);
|
||||
|
||||
void TraceNetDevTxLte (std::string context, Ptr<const Packet> packet, Mac48Address const &destination);
|
||||
void TraceNetDevRxLte (std::string context, Ptr<const Packet> packet, Mac48Address const &source);
|
||||
|
||||
inline NetDeviceStatistics & FindNetDeviceStatistics (int node, int interface);
|
||||
|
||||
void DoPause (std::string const &message);
|
||||
|
||||
@@ -6,6 +6,7 @@ import ns.internet
|
||||
import ns.mesh
|
||||
import ns.wimax
|
||||
import ns.wimax
|
||||
import ns.lte
|
||||
|
||||
import gobject
|
||||
import os.path
|
||||
@@ -42,6 +43,8 @@ netdevice_traits = {
|
||||
ns.mesh.MeshPointDevice: NetDeviceTraits(is_virtual=True),
|
||||
ns.wimax.SubscriberStationNetDevice: NetDeviceTraits(is_wireless=True),
|
||||
ns.wimax.BaseStationNetDevice: NetDeviceTraits(is_wireless=True),
|
||||
ns.lte.UeNetDevice: NetDeviceTraits(is_wireless=True),
|
||||
ns.lte.EnbNetDevice: NetDeviceTraits(is_wireless=True),
|
||||
}
|
||||
|
||||
def lookup_netdevice_traits(class_type):
|
||||
|
||||
Reference in New Issue
Block a user