lr-wpan: Update correct ext addr use in lr-wpan-data example
This commit is contained in:
@@ -27,6 +27,7 @@ This file is a best-effort approach to solving this issue; we will do our best b
|
||||
* (flow-monitor) Reformatted documentation and added a new concept figure.
|
||||
* (internet-apps) Added a parameter to the RADVD helper to announce a prefix without the autoconfiguration flag.
|
||||
* (lr-wpan) - Renamed example ``lr-wpan\examples\lr-wpan-mlme.cc`` to ``lr-wpan\examples\lr-wpan-beacon-mode.cc``.
|
||||
* (lr-wpan) - Update correct use of extended addresses in ``lr-wpan\examples\lr-wpan-data.cc``.
|
||||
* (wifi) Callbacks connected to the `WifiMac::IcfDropReason` trace source are now passed a `struct IcfDropInfo` object that has three fields indicating the reason for dropping the ICF, the ID of the link on which the ICF was dropped and the MAC address of the sender of the ICF.
|
||||
|
||||
### Changes to build system
|
||||
|
||||
@@ -46,7 +46,7 @@ DataIndication(McpsDataIndicationParams params, Ptr<Packet> p)
|
||||
static void
|
||||
DataConfirm(McpsDataConfirmParams params)
|
||||
{
|
||||
NS_LOG_UNCOND("LrWpanMcpsDataConfirmStatus = " << params.m_status);
|
||||
NS_LOG_UNCOND("LrWpanMcpsDataConfirmStatus = " << static_cast<uint16_t>(params.m_status));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -126,18 +126,23 @@ main(int argc, char* argv[])
|
||||
// Ptr<LrWpanNetDevice> dev0 = devices.Get(0)->GetObject<LrWpanNetDevice>();
|
||||
// Ptr<LrWpanNetDevice> dev1 = devices.Get(1)->GetObject<LrWpanNetDevice>();
|
||||
|
||||
// Set 16-bit short addresses if extended is false, otherwise use 64-bit extended addresses
|
||||
// Set 16-bit and 64-bit MAC addresses.
|
||||
// Note: Extended addresses must ALWAYS be present. If the devices are using the extended
|
||||
// address mode, short addresses should use the short address FF:FE. A short address of FF:FF
|
||||
// indicates that the devices is not associated to any device.
|
||||
if (!extended)
|
||||
{
|
||||
dev0->SetAddress(Mac16Address("00:01"));
|
||||
dev1->SetAddress(Mac16Address("00:02"));
|
||||
dev0->GetMac()->SetExtendedAddress(Mac64Address("00:00:00:00:00:00:00:01"));
|
||||
dev1->GetMac()->SetExtendedAddress(Mac64Address("00:00:00:00:00:00:00:02"));
|
||||
dev0->GetMac()->SetShortAddress(Mac16Address("00:01"));
|
||||
dev1->GetMac()->SetShortAddress(Mac16Address("00:02"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Ptr<LrWpanMac> mac0 = dev0->GetMac();
|
||||
Ptr<LrWpanMac> mac1 = dev1->GetMac();
|
||||
mac0->SetExtendedAddress(Mac64Address("00:00:00:00:00:00:00:01"));
|
||||
mac1->SetExtendedAddress(Mac64Address("00:00:00:00:00:00:00:02"));
|
||||
dev0->GetMac()->SetExtendedAddress(Mac64Address("00:00:00:00:00:00:00:01"));
|
||||
dev1->GetMac()->SetExtendedAddress(Mac64Address("00:00:00:00:00:00:00:02"));
|
||||
dev0->GetMac()->SetShortAddress(Mac16Address("FF:FE"));
|
||||
dev1->GetMac()->SetShortAddress(Mac16Address("FF:FE"));
|
||||
}
|
||||
|
||||
// Trace state changes in the phy
|
||||
|
||||
Reference in New Issue
Block a user