lr-wpan: Add namespace to TypeId name

This commit is contained in:
Alberto Gallegos Ramonet
2024-09-22 11:48:33 +09:00
parent 9ef59d74fa
commit 380dc8bdb9
11 changed files with 31 additions and 19 deletions

View File

@@ -346,7 +346,7 @@ LrWpanHelper::EnablePcapInternal(std::string prefix,
if (!device)
{
NS_LOG_INFO("LrWpanHelper::EnablePcapInternal(): Device "
<< device << " not of type ns3::LrWpanNetDevice");
<< device << " not of type ns3::lrwpan::LrWpanNetDevice");
return;
}
@@ -468,7 +468,7 @@ LrWpanHelper::EnableAsciiInternal(Ptr<OutputStreamWrapper> stream,
oss.str("");
oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
<< "/$ns3::LrWpanNetDevice/Mac/MacRx";
<< "/$ns3::lrwpan::LrWpanNetDevice/Mac/MacRx";
device->GetMac()->TraceConnect(
"MacRx",
oss.str(),
@@ -476,7 +476,7 @@ LrWpanHelper::EnableAsciiInternal(Ptr<OutputStreamWrapper> stream,
oss.str("");
oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
<< "/$ns3::LrWpanNetDevice/Mac/MacTx";
<< "/$ns3::lrwpan::LrWpanNetDevice/Mac/MacTx";
device->GetMac()->TraceConnect(
"MacTx",
oss.str(),
@@ -484,7 +484,7 @@ LrWpanHelper::EnableAsciiInternal(Ptr<OutputStreamWrapper> stream,
oss.str("");
oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
<< "/$ns3::LrWpanNetDevice/Mac/MacTxEnqueue";
<< "/$ns3::lrwpan::LrWpanNetDevice/Mac/MacTxEnqueue";
device->GetMac()->TraceConnect(
"MacTxEnqueue",
oss.str(),
@@ -492,7 +492,7 @@ LrWpanHelper::EnableAsciiInternal(Ptr<OutputStreamWrapper> stream,
oss.str("");
oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
<< "/$ns3::LrWpanNetDevice/Mac/MacTxDequeue";
<< "/$ns3::lrwpan::LrWpanNetDevice/Mac/MacTxDequeue";
device->GetMac()->TraceConnect(
"MacTxDequeue",
oss.str(),
@@ -500,7 +500,7 @@ LrWpanHelper::EnableAsciiInternal(Ptr<OutputStreamWrapper> stream,
oss.str("");
oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid
<< "/$ns3::LrWpanNetDevice/Mac/MacTxDrop";
<< "/$ns3::lrwpan::LrWpanNetDevice/Mac/MacTxDrop";
device->GetMac()->TraceConnect(
"MacTxDrop",
oss.str(),

View File

@@ -34,7 +34,8 @@ NS_OBJECT_ENSURE_REGISTERED(LrWpanCsmaCa);
TypeId
LrWpanCsmaCa::GetTypeId()
{
static TypeId tid = TypeId("ns3::LrWpanCsmaCa")
static TypeId tid = TypeId("ns3::lrwpan::LrWpanCsmaCa")
.AddDeprecatedName("ns3::LrWpanCsmaCa")
.SetParent<Object>()
.SetGroupName("LrWpan")
.AddConstructor<LrWpanCsmaCa>();

View File

@@ -22,7 +22,8 @@ NS_OBJECT_ENSURE_REGISTERED(LrWpanErrorModel);
TypeId
LrWpanErrorModel::GetTypeId()
{
static TypeId tid = TypeId("ns3::LrWpanErrorModel")
static TypeId tid = TypeId("ns3::lrwpan::LrWpanErrorModel")
.AddDeprecatedName("ns3::LrWpanErrorModel")
.SetParent<Object>()
.SetGroupName("LrWpan")
.AddConstructor<LrWpanErrorModel>();

View File

@@ -20,7 +20,8 @@ NS_OBJECT_ENSURE_REGISTERED(LrWpanLqiTag);
TypeId
LrWpanLqiTag::GetTypeId()
{
static TypeId tid = TypeId("ns3::LrWpanLqiTag")
static TypeId tid = TypeId("ns3::lrwpan::LrWpanLqiTag")
.AddDeprecatedName("ns3::LrWpanLqiTag")
.SetParent<Tag>()
.SetGroupName("LrWpan")
.AddConstructor<LrWpanLqiTag>()

View File

@@ -22,7 +22,10 @@ NS_OBJECT_ENSURE_REGISTERED(LrWpanMacBase);
TypeId
LrWpanMacBase::GetTypeId()
{
static TypeId tid = TypeId("ns3::LrWpanMacBase").SetParent<Object>().SetGroupName("LrWpan");
static TypeId tid = TypeId("ns3::lrwpan::LrWpanMacBase")
.AddDeprecatedName("ns3::LrWpanMacBase")
.SetParent<Object>()
.SetGroupName("LrWpan");
return tid;
}

View File

@@ -433,7 +433,8 @@ LrWpanMacHeader::SetKeyId(uint64_t keySrc, uint8_t keyIndex)
TypeId
LrWpanMacHeader::GetTypeId()
{
static TypeId tid = TypeId("ns3::LrWpanMacHeader")
static TypeId tid = TypeId("ns3::lrwpan::LrWpanMacHeader")
.AddDeprecatedName("ns3::LrWpanMacHeader")
.SetParent<Header>()
.SetGroupName("LrWpan")
.AddConstructor<LrWpanMacHeader>();

View File

@@ -29,7 +29,8 @@ NS_OBJECT_ENSURE_REGISTERED(BeaconPayloadHeader);
TypeId
BeaconPayloadHeader::GetTypeId()
{
static TypeId tid = TypeId("ns3::BeaconPayloadHeader")
static TypeId tid = TypeId("ns3::lrwpan::BeaconPayloadHeader")
.AddDeprecatedName("ns3::BeaconPayloadHeader")
.SetParent<Header>()
.SetGroupName("LrWpan")
.AddConstructor<BeaconPayloadHeader>();

View File

@@ -31,7 +31,8 @@ LrWpanMacTrailer::LrWpanMacTrailer()
TypeId
LrWpanMacTrailer::GetTypeId()
{
static TypeId tid = TypeId("ns3::LrWpanMacTrailer")
static TypeId tid = TypeId("ns3::lrwpan::LrWpanMacTrailer")
.AddDeprecatedName("ns3::LrWpanMacTrailer")
.SetParent<Trailer>()
.SetGroupName("LrWpan")
.AddConstructor<LrWpanMacTrailer>();

View File

@@ -82,7 +82,8 @@ TypeId
LrWpanMac::GetTypeId()
{
static TypeId tid =
TypeId("ns3::LrWpanMac")
TypeId("ns3::lrwpan::LrWpanMac")
.AddDeprecatedName("ns3::LrWpanMac")
.SetParent<LrWpanMacBase>()
.SetGroupName("LrWpan")
.AddConstructor<LrWpanMac>()
@@ -176,12 +177,12 @@ LrWpanMac::GetTypeId()
.AddTraceSource("MacState",
"The state of LrWpan Mac",
MakeTraceSourceAccessor(&LrWpanMac::m_macStateLogger),
"ns3::LrWpanMac::StateTracedCallback")
"ns3::lrwpan::LrWpanMac::StateTracedCallback")
.AddTraceSource("MacSentPkt",
"Trace source reporting some information about "
"the sent packet",
MakeTraceSourceAccessor(&LrWpanMac::m_sentPktTrace),
"ns3::LrWpanMac::SentTracedCallback")
"ns3::lrwpan::LrWpanMac::SentTracedCallback")
.AddTraceSource("IfsEnd",
"Trace source reporting the end of an "
"Interframe space (IFS)",

View File

@@ -34,7 +34,8 @@ TypeId
LrWpanNetDevice::GetTypeId()
{
static TypeId tid =
TypeId("ns3::LrWpanNetDevice")
TypeId("ns3::lrwpan::LrWpanNetDevice")
.AddDeprecatedName("ns3::LrWpanNetDevice")
.SetParent<NetDevice>()
.SetGroupName("LrWpan")
.AddConstructor<LrWpanNetDevice>()

View File

@@ -136,7 +136,8 @@ TypeId
LrWpanPhy::GetTypeId()
{
static TypeId tid =
TypeId("ns3::LrWpanPhy")
TypeId("ns3::lrwpan::LrWpanPhy")
.AddDeprecatedName("ns3::LrWpanPhy")
.SetParent<SpectrumPhy>()
.SetGroupName("LrWpan")
.AddConstructor<LrWpanPhy>()
@@ -155,7 +156,7 @@ LrWpanPhy::GetTypeId()
.AddTraceSource("TrxState",
"The state of the transceiver",
MakeTraceSourceAccessor(&LrWpanPhy::m_trxStateLogger),
"ns3::LrWpanPhy::StateTracedCallback")
"ns3::lrwpan::LrWpanPhy::StateTracedCallback")
.AddTraceSource("PhyTxBegin",
"Trace source indicating a packet has "
"begun transmitting over the channel medium",