lr-wpan: Adds namespace lrwpan
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
static void
|
||||
ScanConfirm(Ptr<LrWpanNetDevice> device, MlmeScanConfirmParams params)
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NodeContainer nodes;
|
||||
NodeContainer coordinators;
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
/**
|
||||
* Function called when a Data indication is invoked
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
static void
|
||||
ScanConfirm(MlmeScanConfirmParams params)
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#include <vector>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
uint32_t g_packetsReceived = 0; //!< number of packets received
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <vector>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanErrorModelPlot");
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
void
|
||||
BeaconIndication(MlmeBeaconNotifyIndicationParams params)
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
static void
|
||||
ScanConfirm(Ptr<LrWpanNetDevice> device, MlmeScanConfirmParams params)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
int
|
||||
main(int argc, char* argv[])
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <ns3/spectrum-module.h>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
uint32_t g_packetsReceived = 0; //!< number of packets received
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <ns3/test.h>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
/**
|
||||
* Function called when a the PHY state change is confirmed
|
||||
|
||||
@@ -116,35 +116,35 @@ LrWpanHelper::EnableLogComponents()
|
||||
}
|
||||
|
||||
std::string
|
||||
LrWpanHelper::LrWpanPhyEnumerationPrinter(LrWpanPhyEnumeration e)
|
||||
LrWpanHelper::LrWpanPhyEnumerationPrinter(lrwpan::LrWpanPhyEnumeration e)
|
||||
{
|
||||
switch (e)
|
||||
{
|
||||
case IEEE_802_15_4_PHY_BUSY:
|
||||
case lrwpan::IEEE_802_15_4_PHY_BUSY:
|
||||
return std::string("BUSY");
|
||||
case IEEE_802_15_4_PHY_BUSY_RX:
|
||||
case lrwpan::IEEE_802_15_4_PHY_BUSY_RX:
|
||||
return std::string("BUSY_RX");
|
||||
case IEEE_802_15_4_PHY_BUSY_TX:
|
||||
case lrwpan::IEEE_802_15_4_PHY_BUSY_TX:
|
||||
return std::string("BUSY_TX");
|
||||
case IEEE_802_15_4_PHY_FORCE_TRX_OFF:
|
||||
case lrwpan::IEEE_802_15_4_PHY_FORCE_TRX_OFF:
|
||||
return std::string("FORCE_TRX_OFF");
|
||||
case IEEE_802_15_4_PHY_IDLE:
|
||||
case lrwpan::IEEE_802_15_4_PHY_IDLE:
|
||||
return std::string("IDLE");
|
||||
case IEEE_802_15_4_PHY_INVALID_PARAMETER:
|
||||
case lrwpan::IEEE_802_15_4_PHY_INVALID_PARAMETER:
|
||||
return std::string("INVALID_PARAMETER");
|
||||
case IEEE_802_15_4_PHY_RX_ON:
|
||||
case lrwpan::IEEE_802_15_4_PHY_RX_ON:
|
||||
return std::string("RX_ON");
|
||||
case IEEE_802_15_4_PHY_SUCCESS:
|
||||
case lrwpan::IEEE_802_15_4_PHY_SUCCESS:
|
||||
return std::string("SUCCESS");
|
||||
case IEEE_802_15_4_PHY_TRX_OFF:
|
||||
case lrwpan::IEEE_802_15_4_PHY_TRX_OFF:
|
||||
return std::string("TRX_OFF");
|
||||
case IEEE_802_15_4_PHY_TX_ON:
|
||||
case lrwpan::IEEE_802_15_4_PHY_TX_ON:
|
||||
return std::string("TX_ON");
|
||||
case IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE:
|
||||
case lrwpan::IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE:
|
||||
return std::string("UNSUPPORTED_ATTRIBUTE");
|
||||
case IEEE_802_15_4_PHY_READ_ONLY:
|
||||
case lrwpan::IEEE_802_15_4_PHY_READ_ONLY:
|
||||
return std::string("READ_ONLY");
|
||||
case IEEE_802_15_4_PHY_UNSPECIFIED:
|
||||
case lrwpan::IEEE_802_15_4_PHY_UNSPECIFIED:
|
||||
return std::string("UNSPECIFIED");
|
||||
default:
|
||||
return std::string("INVALID");
|
||||
@@ -152,17 +152,17 @@ LrWpanHelper::LrWpanPhyEnumerationPrinter(LrWpanPhyEnumeration e)
|
||||
}
|
||||
|
||||
std::string
|
||||
LrWpanHelper::LrWpanMacStatePrinter(LrWpanMacState e)
|
||||
LrWpanHelper::LrWpanMacStatePrinter(lrwpan::LrWpanMacState e)
|
||||
{
|
||||
switch (e)
|
||||
{
|
||||
case MAC_IDLE:
|
||||
case lrwpan::MAC_IDLE:
|
||||
return std::string("MAC_IDLE");
|
||||
case CHANNEL_ACCESS_FAILURE:
|
||||
case lrwpan::CHANNEL_ACCESS_FAILURE:
|
||||
return std::string("CHANNEL_ACCESS_FAILURE");
|
||||
case CHANNEL_IDLE:
|
||||
case lrwpan::CHANNEL_IDLE:
|
||||
return std::string("CHANNEL_IDLE");
|
||||
case SET_PHY_TX_ON:
|
||||
case lrwpan::SET_PHY_TX_ON:
|
||||
return std::string("SET_PHY_TX_ON");
|
||||
default:
|
||||
return std::string("INVALID");
|
||||
@@ -170,7 +170,7 @@ LrWpanHelper::LrWpanMacStatePrinter(LrWpanMacState e)
|
||||
}
|
||||
|
||||
void
|
||||
LrWpanHelper::AddMobility(Ptr<LrWpanPhy> phy, Ptr<MobilityModel> m)
|
||||
LrWpanHelper::AddMobility(Ptr<lrwpan::LrWpanPhy> phy, Ptr<MobilityModel> m)
|
||||
{
|
||||
phy->SetMobility(m);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ LrWpanHelper::Install(NodeContainer c)
|
||||
{
|
||||
Ptr<Node> node = *i;
|
||||
|
||||
Ptr<LrWpanNetDevice> netDevice = CreateObject<LrWpanNetDevice>();
|
||||
Ptr<lrwpan::LrWpanNetDevice> netDevice = CreateObject<lrwpan::LrWpanNetDevice>();
|
||||
netDevice->SetChannel(m_channel);
|
||||
node->AddDevice(netDevice);
|
||||
netDevice->SetNode(node);
|
||||
@@ -221,7 +221,7 @@ LrWpanHelper::AssignStreams(NetDeviceContainer c, int64_t stream)
|
||||
for (auto i = c.Begin(); i != c.End(); ++i)
|
||||
{
|
||||
netDevice = (*i);
|
||||
Ptr<LrWpanNetDevice> lrwpan = DynamicCast<LrWpanNetDevice>(netDevice);
|
||||
Ptr<lrwpan::LrWpanNetDevice> lrwpan = DynamicCast<lrwpan::LrWpanNetDevice>(netDevice);
|
||||
if (lrwpan)
|
||||
{
|
||||
currentStream += lrwpan->AssignStreams(currentStream);
|
||||
@@ -249,7 +249,7 @@ LrWpanHelper::CreateAssociatedPan(NetDeviceContainer c, uint16_t panId)
|
||||
NS_ABORT_MSG("Only 65533 addresses supported. Range [00:01]-[FF:FD]");
|
||||
}
|
||||
|
||||
Ptr<LrWpanNetDevice> device = DynamicCast<LrWpanNetDevice>(*i);
|
||||
Ptr<lrwpan::LrWpanNetDevice> device = DynamicCast<lrwpan::LrWpanNetDevice>(*i);
|
||||
if (device)
|
||||
{
|
||||
idBuf[0] = (id >> 8) & 0xff;
|
||||
@@ -287,7 +287,7 @@ LrWpanHelper::SetExtendedAddresses(NetDeviceContainer c)
|
||||
|
||||
for (auto i = c.Begin(); i != c.End(); i++)
|
||||
{
|
||||
Ptr<LrWpanNetDevice> device = DynamicCast<LrWpanNetDevice>(*i);
|
||||
Ptr<lrwpan::LrWpanNetDevice> device = DynamicCast<lrwpan::LrWpanNetDevice>(*i);
|
||||
if (device)
|
||||
{
|
||||
idBuf[0] = (id >> 56) & 0xff;
|
||||
@@ -338,7 +338,7 @@ LrWpanHelper::EnablePcapInternal(std::string prefix,
|
||||
// have to switch on each type below and insert into the right
|
||||
// NetDevice type
|
||||
//
|
||||
Ptr<LrWpanNetDevice> device = nd->GetObject<LrWpanNetDevice>();
|
||||
Ptr<lrwpan::LrWpanNetDevice> device = nd->GetObject<lrwpan::LrWpanNetDevice>();
|
||||
if (!device)
|
||||
{
|
||||
NS_LOG_INFO("LrWpanHelper::EnablePcapInternal(): Device "
|
||||
@@ -383,7 +383,7 @@ LrWpanHelper::EnableAsciiInternal(Ptr<OutputStreamWrapper> stream,
|
||||
uint32_t deviceid = nd->GetIfIndex();
|
||||
std::ostringstream oss;
|
||||
|
||||
Ptr<LrWpanNetDevice> device = nd->GetObject<LrWpanNetDevice>();
|
||||
Ptr<lrwpan::LrWpanNetDevice> device = nd->GetObject<lrwpan::LrWpanNetDevice>();
|
||||
if (!device)
|
||||
{
|
||||
NS_LOG_INFO("LrWpanHelper::EnableAsciiInternal(): Device "
|
||||
@@ -428,23 +428,23 @@ LrWpanHelper::EnableAsciiInternal(Ptr<OutputStreamWrapper> stream,
|
||||
// The Mac and Phy objects have the trace sources for these
|
||||
//
|
||||
|
||||
asciiTraceHelper.HookDefaultReceiveSinkWithoutContext<LrWpanMac>(device->GetMac(),
|
||||
"MacRx",
|
||||
theStream);
|
||||
asciiTraceHelper.HookDefaultReceiveSinkWithoutContext<lrwpan::LrWpanMac>(device->GetMac(),
|
||||
"MacRx",
|
||||
theStream);
|
||||
|
||||
device->GetMac()->TraceConnectWithoutContext(
|
||||
"MacTx",
|
||||
MakeBoundCallback(&AsciiLrWpanMacTransmitSinkWithoutContext, theStream));
|
||||
|
||||
asciiTraceHelper.HookDefaultEnqueueSinkWithoutContext<LrWpanMac>(device->GetMac(),
|
||||
"MacTxEnqueue",
|
||||
theStream);
|
||||
asciiTraceHelper.HookDefaultDequeueSinkWithoutContext<LrWpanMac>(device->GetMac(),
|
||||
"MacTxDequeue",
|
||||
theStream);
|
||||
asciiTraceHelper.HookDefaultDropSinkWithoutContext<LrWpanMac>(device->GetMac(),
|
||||
"MacTxDrop",
|
||||
theStream);
|
||||
asciiTraceHelper.HookDefaultEnqueueSinkWithoutContext<lrwpan::LrWpanMac>(device->GetMac(),
|
||||
"MacTxEnqueue",
|
||||
theStream);
|
||||
asciiTraceHelper.HookDefaultDequeueSinkWithoutContext<lrwpan::LrWpanMac>(device->GetMac(),
|
||||
"MacTxDequeue",
|
||||
theStream);
|
||||
asciiTraceHelper.HookDefaultDropSinkWithoutContext<lrwpan::LrWpanMac>(device->GetMac(),
|
||||
"MacTxDrop",
|
||||
theStream);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ class LrWpanHelper : public PcapHelperForDevice, public AsciiTraceHelperForDevic
|
||||
* \param phy the physical device
|
||||
* \param m the mobility model
|
||||
*/
|
||||
void AddMobility(Ptr<LrWpanPhy> phy, Ptr<MobilityModel> m);
|
||||
void AddMobility(Ptr<lrwpan::LrWpanPhy> phy, Ptr<MobilityModel> m);
|
||||
|
||||
/**
|
||||
* \brief Install a LrWpanNetDevice and the associated structures (e.g., channel) in the nodes.
|
||||
@@ -137,14 +137,14 @@ class LrWpanHelper : public PcapHelperForDevice, public AsciiTraceHelperForDevic
|
||||
* \param e the LrWpanPhyEnumeration
|
||||
* \return a string
|
||||
*/
|
||||
static std::string LrWpanPhyEnumerationPrinter(LrWpanPhyEnumeration e);
|
||||
static std::string LrWpanPhyEnumerationPrinter(lrwpan::LrWpanPhyEnumeration e);
|
||||
|
||||
/**
|
||||
* \brief Transform the LrWpanMacState enumeration into a printable string.
|
||||
* \param e the LrWpanMacState
|
||||
* \return a string
|
||||
*/
|
||||
static std::string LrWpanMacStatePrinter(LrWpanMacState e);
|
||||
static std::string LrWpanMacStatePrinter(lrwpan::LrWpanMacState e);
|
||||
|
||||
/**
|
||||
* Assign a fixed random variable stream number to the random variables
|
||||
|
||||
@@ -37,9 +37,10 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanCsmaCa");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanCsmaCa);
|
||||
|
||||
TypeId
|
||||
@@ -571,4 +572,5 @@ LrWpanCsmaCa::GetBatteryLifeExtension() const
|
||||
return m_macBattLifeExt;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -33,6 +33,9 @@ namespace ns3
|
||||
|
||||
class UniformRandomVariable;
|
||||
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
*
|
||||
@@ -331,6 +334,7 @@ class LrWpanCsmaCa : public Object
|
||||
bool m_coorDest;
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
// namespace ns-3
|
||||
|
||||
@@ -24,9 +24,10 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanErrorModel");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanErrorModel);
|
||||
|
||||
TypeId
|
||||
@@ -76,5 +77,5 @@ LrWpanErrorModel::GetChunkSuccessRate(double snr, uint32_t nbits) const
|
||||
double retval = pow(1.0 - ber, nbits);
|
||||
return retval;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
@@ -58,7 +60,7 @@ class LrWpanErrorModel : public Object
|
||||
*/
|
||||
double m_binomialCoefficients[17];
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_ERROR_MODEL_H */
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
SuperframeField::SuperframeField()
|
||||
{
|
||||
@@ -587,4 +589,5 @@ operator<<(std::ostream& os, const CapabilityField& capabilityField)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
@@ -458,6 +460,7 @@ class CapabilityField
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const CapabilityField& capabilityField);
|
||||
|
||||
} // end namespace ns3
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_FIELDS_H */
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanInterferenceHelper");
|
||||
|
||||
@@ -106,4 +108,5 @@ LrWpanInterferenceHelper::GetSignalPsd() const
|
||||
return m_signal->Copy();
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace ns3
|
||||
class SpectrumValue;
|
||||
class SpectrumModel;
|
||||
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
*
|
||||
@@ -120,6 +123,7 @@ class LrWpanInterferenceHelper : public SimpleRefCount<LrWpanInterferenceHelper>
|
||||
mutable bool m_dirty;
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_INTERFERENCE_HELPER_H */
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanLqiTag);
|
||||
|
||||
@@ -93,4 +95,5 @@ LrWpanLqiTag::Get() const
|
||||
return m_lqi;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
@@ -83,5 +85,6 @@ class LrWpanLqiTag : public Tag
|
||||
uint8_t m_lqi;
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
#endif /* LR_WPAN_LQI_TAG_H */
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanMacBase");
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanMacBase);
|
||||
@@ -117,4 +119,5 @@ LrWpanMacBase::SetMlmePollConfirmCallback(MlmePollConfirmCallback c)
|
||||
m_mlmePollConfirmCallback = c;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
@@ -975,6 +977,7 @@ class LrWpanMacBase : public Object
|
||||
MlmePollConfirmCallback m_mlmePollConfirmCallback;
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_MAC_BASE_H*/
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanMacHeader);
|
||||
|
||||
@@ -746,4 +748,5 @@ LrWpanMacHeader::Deserialize(Buffer::Iterator start)
|
||||
return i.GetDistanceFrom(start);
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
@@ -449,6 +451,7 @@ class LrWpanMacHeader : public Header
|
||||
|
||||
}; // LrWpanMacHeader
|
||||
|
||||
}; // namespace ns3
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_MAC_HEADER_H */
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/***********************************************************
|
||||
* Beacon MAC Payload
|
||||
@@ -448,4 +450,5 @@ CommandPayloadHeader::GetPanId() const
|
||||
return m_panid;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
@@ -239,6 +241,7 @@ class CommandPayloadHeader : public Header
|
||||
uint8_t m_assocStatus; //!< Association Status (Association Response Command)
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_MAC_PL_HEADERS_H */
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanMacTrailer);
|
||||
|
||||
@@ -159,4 +161,5 @@ LrWpanMacTrailer::GenerateCrc16(uint8_t* data, int length)
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -30,6 +30,9 @@ namespace ns3
|
||||
|
||||
class Packet;
|
||||
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
*
|
||||
@@ -120,6 +123,7 @@ class LrWpanMacTrailer : public Trailer
|
||||
bool m_calcFcs;
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_MAC_TRAILER_H */
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanMac");
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanMac);
|
||||
@@ -3862,4 +3864,5 @@ LrWpanMac::isTxAckReq()
|
||||
return macHdr.IsAckReq();
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -39,8 +39,11 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
class Packet;
|
||||
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
class LrWpanCsmaCa;
|
||||
|
||||
/**
|
||||
@@ -1322,6 +1325,7 @@ class LrWpanMac : public LrWpanMacBase
|
||||
*/
|
||||
EventId m_scanEnergyEvent;
|
||||
};
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_MAC_H */
|
||||
|
||||
@@ -35,9 +35,10 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanNetDevice");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanNetDevice);
|
||||
|
||||
TypeId
|
||||
@@ -559,4 +560,5 @@ LrWpanNetDevice::AssignStreams(int64_t stream)
|
||||
return (streamIndex - stream);
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -30,11 +30,15 @@
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
class LrWpanPhy;
|
||||
class LrWpanCsmaCa;
|
||||
class SpectrumChannel;
|
||||
class Node;
|
||||
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
class LrWpanPhy;
|
||||
class LrWpanCsmaCa;
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
*
|
||||
@@ -316,6 +320,7 @@ class LrWpanNetDevice : public NetDevice
|
||||
PseudoMacAddressMode_e m_pseudoMacMode;
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_NET_DEVICE_H */
|
||||
|
||||
@@ -45,9 +45,10 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanPhy");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED(LrWpanPhy);
|
||||
|
||||
/**
|
||||
@@ -1910,4 +1911,5 @@ LrWpanPhy::SetPostReceptionErrorModel(const Ptr<ErrorModel> em)
|
||||
m_postReceptionErrorModel = em;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -35,8 +35,6 @@ namespace ns3
|
||||
|
||||
class Packet;
|
||||
class SpectrumValue;
|
||||
class LrWpanErrorModel;
|
||||
struct LrWpanSpectrumSignalParameters;
|
||||
class MobilityModel;
|
||||
class SpectrumChannel;
|
||||
class SpectrumModel;
|
||||
@@ -45,6 +43,12 @@ class NetDevice;
|
||||
class UniformRandomVariable;
|
||||
class ErrorModel;
|
||||
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
class LrWpanErrorModel;
|
||||
struct LrWpanSpectrumSignalParameters;
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
*
|
||||
@@ -962,6 +966,7 @@ class LrWpanPhy : public SpectrumPhy
|
||||
Ptr<ErrorModel> m_postReceptionErrorModel; //!< Error model for receive packet events
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_PHY_H */
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanSpectrumSignalParameters");
|
||||
|
||||
@@ -46,4 +48,5 @@ LrWpanSpectrumSignalParameters::Copy() const
|
||||
return Create<LrWpanSpectrumSignalParameters>(*this);
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -27,6 +27,9 @@ namespace ns3
|
||||
|
||||
class PacketBurst;
|
||||
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
*
|
||||
@@ -53,6 +56,7 @@ struct LrWpanSpectrumSignalParameters : public SpectrumSignalParameters
|
||||
Ptr<PacketBurst> packetBurst;
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_SPECTRUM_SIGNAL_PARAMETERS_H */
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("LrWpanSpectrumValueHelper");
|
||||
|
||||
@@ -152,4 +154,5 @@ LrWpanSpectrumValueHelper::TotalAvgPower(Ptr<const SpectrumValue> psd, uint32_t
|
||||
return totalAvgPower;
|
||||
}
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
@@ -26,6 +26,9 @@ namespace ns3
|
||||
|
||||
class SpectrumValue;
|
||||
|
||||
namespace lrwpan
|
||||
{
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
*
|
||||
@@ -76,6 +79,7 @@ class LrWpanSpectrumValueHelper
|
||||
double m_noiseFactor;
|
||||
};
|
||||
|
||||
} // namespace lrwpan
|
||||
} // namespace ns3
|
||||
|
||||
#endif /* LR_WPAN_SPECTRUM_VALUE_HELPER_H */
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <string>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-ack-test");
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-clear-channel-assessment-test");
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <ns3/test.h>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-collision-test");
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-energy-detection-test");
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <ns3/test.h>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-error-model-test");
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-ifs-test");
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <iostream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-mac-test");
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <vector>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-packet-test");
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <ns3/test.h>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <ns3/single-model-spectrum-channel.h>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE("lr-wpan-slotted-csma-test");
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <cmath>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
|
||||
@@ -1008,14 +1008,14 @@ AnimationInterface::LrWpanPhyTxBeginTrace(std::string context, Ptr<const Packet>
|
||||
|
||||
Ptr<NetDevice> ndev = GetNetDeviceFromContext(context);
|
||||
NS_ASSERT(ndev);
|
||||
Ptr<LrWpanNetDevice> netDevice = DynamicCast<LrWpanNetDevice>(ndev);
|
||||
Ptr<lrwpan::LrWpanNetDevice> netDevice = DynamicCast<lrwpan::LrWpanNetDevice>(ndev);
|
||||
|
||||
Ptr<Node> n = ndev->GetNode();
|
||||
NS_ASSERT(n);
|
||||
|
||||
UpdatePosition(n);
|
||||
|
||||
LrWpanMacHeader hdr;
|
||||
lrwpan::LrWpanMacHeader hdr;
|
||||
if (!p->PeekHeader(hdr))
|
||||
{
|
||||
NS_LOG_WARN("LrWpanMacHeader not present");
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <fstream>
|
||||
|
||||
using namespace ns3;
|
||||
using namespace ns3::lrwpan;
|
||||
|
||||
static void
|
||||
DataSentMacConfirm(Ptr<LrWpanNetDevice> device, McpsDataConfirmParams params)
|
||||
|
||||
@@ -171,9 +171,9 @@ TYPENAME(Ipv4L3Protocol::TxRxTracedCallback);
|
||||
TYPENAME(Ipv6L3Protocol::DropTracedCallback);
|
||||
TYPENAME(Ipv6L3Protocol::SentTracedCallback);
|
||||
TYPENAME(Ipv6L3Protocol::TxRxTracedCallback);
|
||||
TYPENAME(LrWpanMac::SentTracedCallback);
|
||||
TYPENAME(LrWpanMac::StateTracedCallback);
|
||||
TYPENAME(LrWpanPhy::StateTracedCallback);
|
||||
TYPENAME(lrwpan::LrWpanMac::SentTracedCallback);
|
||||
TYPENAME(lrwpan::LrWpanMac::StateTracedCallback);
|
||||
TYPENAME(lrwpan::LrWpanPhy::StateTracedCallback);
|
||||
TYPENAME(LteEnbMac::DlSchedulingTracedCallback);
|
||||
TYPENAME(LteEnbMac::UlSchedulingTracedCallback);
|
||||
TYPENAME(LteEnbPhy::ReportInterferenceTracedCallback);
|
||||
@@ -382,11 +382,14 @@ TracedCallbackTypedefTestCase::DoRun()
|
||||
|
||||
CHECK(Ipv6L3Protocol::TxRxTracedCallback, Ptr<const Packet>, Ptr<Ipv6>, uint32_t);
|
||||
|
||||
CHECK(LrWpanMac::SentTracedCallback, Ptr<const Packet>, uint8_t, uint8_t);
|
||||
CHECK(lrwpan::LrWpanMac::SentTracedCallback, Ptr<const Packet>, uint8_t, uint8_t);
|
||||
|
||||
CHECK(LrWpanMac::StateTracedCallback, LrWpanMacState, LrWpanMacState);
|
||||
CHECK(lrwpan::LrWpanMac::StateTracedCallback, lrwpan::LrWpanMacState, lrwpan::LrWpanMacState);
|
||||
|
||||
CHECK(LrWpanPhy::StateTracedCallback, Time, LrWpanPhyEnumeration, LrWpanPhyEnumeration);
|
||||
CHECK(lrwpan::LrWpanPhy::StateTracedCallback,
|
||||
Time,
|
||||
lrwpan::LrWpanPhyEnumeration,
|
||||
lrwpan::LrWpanPhyEnumeration);
|
||||
|
||||
CHECK(LteEnbMac::DlSchedulingTracedCallback,
|
||||
uint32_t,
|
||||
|
||||
Reference in New Issue
Block a user