A Discrete-Event Network Simulator
API
lr-wpan-net-device.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 The Boeing Company
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author:
19  * Tom Henderson <thomas.r.henderson@boeing.com>
20  * Tommaso Pecorella <tommaso.pecorella@unifi.it>
21  * Margherita Filippetti <morag87@gmail.com>
22  */
23 #include "lr-wpan-net-device.h"
24 #include "lr-wpan-phy.h"
25 #include "lr-wpan-csmaca.h"
26 #include "lr-wpan-error-model.h"
27 #include <ns3/abort.h>
28 #include <ns3/node.h>
29 #include <ns3/log.h>
30 #include <ns3/spectrum-channel.h>
31 #include <ns3/pointer.h>
32 #include <ns3/boolean.h>
33 #include <ns3/mobility-model.h>
34 #include <ns3/packet.h>
35 
36 
37 namespace ns3 {
38 
39 NS_LOG_COMPONENT_DEFINE ("LrWpanNetDevice");
40 
41 NS_OBJECT_ENSURE_REGISTERED (LrWpanNetDevice);
42 
43 TypeId
45 {
46  static TypeId tid = TypeId ("ns3::LrWpanNetDevice")
47  .SetParent<NetDevice> ()
48  .SetGroupName ("LrWpan")
49  .AddConstructor<LrWpanNetDevice> ()
50  .AddAttribute ("Channel", "The channel attached to this device",
51  PointerValue (),
53  MakePointerChecker<SpectrumChannel> ())
54  .AddAttribute ("Phy", "The PHY layer attached to this device.",
55  PointerValue (),
58  MakePointerChecker<LrWpanPhy> ())
59  .AddAttribute ("Mac", "The MAC layer attached to this device.",
60  PointerValue (),
63  MakePointerChecker<LrWpanMac> ())
64  .AddAttribute ("UseAcks", "Request acknowledgments for data frames.",
65  BooleanValue (true),
68  ;
69  return tid;
70 }
71 
73  : m_configComplete (false)
74 {
75  NS_LOG_FUNCTION (this);
76  m_mac = CreateObject<LrWpanMac> ();
77  m_phy = CreateObject<LrWpanPhy> ();
78  m_csmaca = CreateObject<LrWpanCsmaCa> ();
79  CompleteConfig ();
80 }
81 
83 {
84  NS_LOG_FUNCTION (this);
85 }
86 
87 
88 void
90 {
91  NS_LOG_FUNCTION (this);
92  m_mac->Dispose ();
93  m_phy->Dispose ();
94  m_csmaca->Dispose ();
95  m_phy = 0;
96  m_mac = 0;
97  m_csmaca = 0;
98  m_node = 0;
99  // chain up.
101 
102 }
103 
104 void
106 {
107  NS_LOG_FUNCTION (this);
108  m_phy->Initialize ();
109  m_mac->Initialize ();
111 }
112 
113 
114 void
116 {
117  NS_LOG_FUNCTION (this);
118  if (m_mac == 0
119  || m_phy == 0
120  || m_csmaca == 0
121  || m_node == 0
122  || m_configComplete)
123  {
124  return;
125  }
126  m_mac->SetPhy (m_phy);
127  m_mac->SetCsmaCa (m_csmaca);
128  m_mac->SetMcpsDataIndicationCallback (MakeCallback (&LrWpanNetDevice::McpsDataIndication, this));
129  m_csmaca->SetMac (m_mac);
130 
132  if (!mobility)
133  {
134  NS_LOG_WARN ("LrWpanNetDevice: no Mobility found on the node, probably it's not a good idea.");
135  }
136  m_phy->SetMobility (mobility);
137  Ptr<LrWpanErrorModel> model = CreateObject<LrWpanErrorModel> ();
138  m_phy->SetErrorModel (model);
139  m_phy->SetDevice (this);
140 
141  m_phy->SetPdDataIndicationCallback (MakeCallback (&LrWpanMac::PdDataIndication, m_mac));
142  m_phy->SetPdDataConfirmCallback (MakeCallback (&LrWpanMac::PdDataConfirm, m_mac));
143  m_phy->SetPlmeEdConfirmCallback (MakeCallback (&LrWpanMac::PlmeEdConfirm, m_mac));
144  m_phy->SetPlmeGetAttributeConfirmCallback (MakeCallback (&LrWpanMac::PlmeGetAttributeConfirm, m_mac));
145  m_phy->SetPlmeSetTRXStateConfirmCallback (MakeCallback (&LrWpanMac::PlmeSetTRXStateConfirm, m_mac));
146  m_phy->SetPlmeSetAttributeConfirmCallback (MakeCallback (&LrWpanMac::PlmeSetAttributeConfirm, m_mac));
147 
148  m_csmaca->SetLrWpanMacStateCallback (MakeCallback (&LrWpanMac::SetLrWpanMacState, m_mac));
149  m_phy->SetPlmeCcaConfirmCallback (MakeCallback (&LrWpanCsmaCa::PlmeCcaConfirm, m_csmaca));
150  m_configComplete = true;
151 }
152 
153 void
155 {
156  NS_LOG_FUNCTION (this);
157  m_mac = mac;
158  CompleteConfig ();
159 }
160 
161 void
163 {
164  NS_LOG_FUNCTION (this);
165  m_phy = phy;
166  CompleteConfig ();
167 }
168 
169 void
171 {
172  NS_LOG_FUNCTION (this);
173  m_csmaca = csmaca;
174  CompleteConfig ();
175 }
176 
177 void
179 {
180  NS_LOG_FUNCTION (this << channel);
181  m_phy->SetChannel (channel);
182  channel->AddRx (m_phy);
183  CompleteConfig ();
184 }
185 
188 {
189  // NS_LOG_FUNCTION (this);
190  return m_mac;
191 }
192 
195 {
196  NS_LOG_FUNCTION (this);
197  return m_phy;
198 }
199 
202 {
203  NS_LOG_FUNCTION (this);
204  return m_csmaca;
205 }
206 void
207 LrWpanNetDevice::SetIfIndex (const uint32_t index)
208 {
209  NS_LOG_FUNCTION (this << index);
210  m_ifIndex = index;
211 }
212 
213 uint32_t
215 {
216  NS_LOG_FUNCTION (this);
217  return m_ifIndex;
218 }
219 
222 {
223  NS_LOG_FUNCTION (this);
224  return m_phy->GetChannel ();
225 }
226 
227 void
229 {
230  NS_LOG_FUNCTION (this);
231  m_linkUp = true;
232  m_linkChanges ();
233 }
234 
235 void
237 {
238  NS_LOG_FUNCTION (this);
239  m_linkUp = false;
240  m_linkChanges ();
241 }
242 
245 {
246  NS_LOG_FUNCTION (this);
247  return m_phy->GetChannel ();
248 }
249 
250 void
252 {
253  NS_LOG_FUNCTION (this);
255  {
256  m_mac->SetShortAddress (Mac16Address::ConvertFrom (address));
257  }
259  {
260  uint8_t buf[6];
262  addr.CopyTo (buf);
263  Mac16Address addr16;
264  addr16.CopyFrom (buf+4);
265  m_mac->SetShortAddress (addr16);
266  uint16_t panId;
267  panId = buf[0];
268  panId <<= 8;
269  panId |= buf[1];
270  m_mac->SetPanId (panId);
271  }
272  else
273  {
274  NS_ABORT_MSG ("LrWpanNetDevice::SetAddress - address is not of a compatible type");
275  }
276 }
277 
278 Address
280 {
281  NS_LOG_FUNCTION (this);
282 
283  if (m_mac->GetShortAddress () == Mac16Address ("00:00"))
284  {
285  return m_mac->GetExtendedAddress ();
286  }
287 
288  Mac48Address pseudoAddress = BuildPseudoMacAddress (m_mac->GetPanId (), m_mac->GetShortAddress ());
289 
290  return pseudoAddress;
291 }
292 
293 bool
294 LrWpanNetDevice::SetMtu (const uint16_t mtu)
295 {
296  NS_ABORT_MSG ("Unsupported");
297  return false;
298 }
299 
300 uint16_t
302 {
303  NS_LOG_FUNCTION (this);
304  // Maximum payload size is: max psdu - frame control - seqno - addressing - security - fcs
305  // = 127 - 2 - 1 - (2+2+2+2) - 0 - 2
306  // = 114
307  // assuming no security and addressing with only 16 bit addresses without pan id compression.
308  return 114;
309 }
310 
311 bool
313 {
314  NS_LOG_FUNCTION (this);
315  return m_phy != 0 && m_linkUp;
316 }
317 
318 void
320 {
321  NS_LOG_FUNCTION (this);
323 }
324 
325 bool
327 {
328  NS_LOG_FUNCTION (this);
329  return true;
330 }
331 
332 Address
334 {
335  NS_LOG_FUNCTION (this);
336 
337  Mac48Address pseudoAddress = BuildPseudoMacAddress (m_mac->GetPanId (), Mac16Address::GetBroadcast ());
338 
339  return pseudoAddress;
340 }
341 
342 bool
344 {
345  NS_LOG_FUNCTION (this);
346  return true;
347 }
348 
349 Address
351 {
352  NS_ABORT_MSG ("Unsupported");
353  return Address ();
354 }
355 
356 Address
358 {
359  NS_LOG_FUNCTION (this << addr);
360 
361  Mac48Address pseudoAddress = BuildPseudoMacAddress (m_mac->GetPanId (), Mac16Address::GetMulticast (addr));
362 
363  return pseudoAddress;
364 }
365 
366 bool
368 {
369  NS_LOG_FUNCTION (this);
370  return false;
371 }
372 
373 bool
375 {
376  NS_LOG_FUNCTION (this);
377  return false;
378 }
379 
380 bool
381 LrWpanNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber)
382 {
383  // This method basically assumes an 802.3-compliant device, but a raw
384  // 802.15.4 device does not have an ethertype, and requires specific
385  // McpsDataRequest parameters.
386  // For further study: how to support these methods somehow, such as
387  // inventing a fake ethertype and packet tag for McpsDataRequest
388  NS_LOG_FUNCTION (this << packet << dest << protocolNumber);
389 
390  if (packet->GetSize () > GetMtu ())
391  {
392  NS_LOG_ERROR ("Fragmentation is needed for this packet, drop the packet ");
393  return false;
394  }
395 
396  McpsDataRequestParams m_mcpsDataRequestParams;
397 
398  std::cout << "Trying to send a packet to " << dest << std::endl;
399  Mac16Address dst16;
400  if (Mac48Address::IsMatchingType (dest))
401  {
402  uint8_t buf[6];
403  dest.CopyTo (buf);
404  dst16.CopyFrom (buf+4);
405  }
406  else
407  {
408  dst16 = Mac16Address::ConvertFrom (dest);
409  }
410  m_mcpsDataRequestParams.m_dstAddr = dst16;
411  m_mcpsDataRequestParams.m_dstAddrMode = SHORT_ADDR;
412  m_mcpsDataRequestParams.m_dstPanId = m_mac->GetPanId ();
413  m_mcpsDataRequestParams.m_srcAddrMode = SHORT_ADDR;
414  // Using ACK requests for broadcast destinations is ok here. They are disabled
415  // by the MAC.
416  if (m_useAcks)
417  {
418  m_mcpsDataRequestParams.m_txOptions = TX_OPTION_ACK;
419  }
420  m_mcpsDataRequestParams.m_msduHandle = 0;
421  m_mac->McpsDataRequest (m_mcpsDataRequestParams, packet);
422  return true;
423 }
424 
425 bool
426 LrWpanNetDevice::SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber)
427 {
428  NS_ABORT_MSG ("Unsupported");
429  // TODO: To support SendFrom, the MACs McpsDataRequest has to use the provided source address, instead of to local one.
430  return false;
431 }
432 
433 Ptr<Node>
435 {
436  NS_LOG_FUNCTION (this);
437  return m_node;
438 }
439 
440 void
442 {
443  NS_LOG_FUNCTION (this);
444  m_node = node;
445  CompleteConfig ();
446 }
447 
448 bool
450 {
451  NS_LOG_FUNCTION (this);
452  return true;
453 }
454 
455 void
457 {
458  NS_LOG_FUNCTION (this);
459  m_receiveCallback = cb;
460 }
461 
462 void
464 {
465  // This method basically assumes an 802.3-compliant device, but a raw
466  // 802.15.4 device does not have an ethertype, and requires specific
467  // McpsDataIndication parameters.
468  // For further study: how to support these methods somehow, such as
469  // inventing a fake ethertype and packet tag for McpsDataRequest
470  NS_LOG_WARN ("Unsupported; use LrWpan MAC APIs instead");
471 }
472 
473 void
475 {
476  NS_LOG_FUNCTION (this);
477  // TODO: Use the PromiscReceiveCallback if the MAC is in promiscuous mode.
478  m_receiveCallback (this, pkt, 0, params.m_srcAddr);
479 }
480 
481 bool
483 {
485  return false;
486 }
487 
489 LrWpanNetDevice::BuildPseudoMacAddress (uint16_t panId, Mac16Address shortAddr) const
490 {
491  NS_LOG_FUNCTION (this);
492 
493  uint8_t buf[6];
494 
495  buf[0] = panId >> 8;
496  // Make sure the U/L bit is set
497  buf[0] |= 0x02;
498  buf[1] = panId & 0xff;
499  buf[2] = 0;
500  buf[3] = 0;
501  shortAddr.CopyTo (buf+4);
502 
503  Mac48Address pseudoAddress;
504  pseudoAddress.CopyFrom (buf);
505 
506  return pseudoAddress;
507 }
508 
509 int64_t
511 {
512  NS_LOG_FUNCTION (stream);
513  int64_t streamIndex = stream;
514  streamIndex += m_csmaca->AssignStreams (stream);
515  streamIndex += m_phy->AssignStreams (stream);
516  NS_LOG_DEBUG ("Number of assigned RV streams: " << (streamIndex - stream));
517  return (streamIndex - stream);
518 }
519 
520 } // namespace ns3
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
static bool IsMatchingType(const Address &address)
uint16_t m_dstPanId
Destination PAN identifier.
Definition: lr-wpan-mac.h:159
virtual uint16_t GetMtu(void) const
virtual void SetNode(Ptr< Node > node)
virtual void DoInitialize(void)
Initialize() implementation.
Definition: object.cc:353
virtual void AddLinkChangeCallback(Callback< void > callback)
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
AttributeValue implementation for Boolean.
Definition: boolean.h:36
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
void PlmeGetAttributeConfirm(LrWpanPhyEnumeration status, LrWpanPibAttributeIdentifier id, LrWpanPhyPibAttributes *attribute)
IEEE 802.15.4-2006 section 6.2.2.6 PLME-GET.confirm Get attributes per definition from Table 23 in se...
Definition: lr-wpan-mac.cc:935
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:852
bool m_useAcks
Configure the NetDevice to request MAC layer acknowledgments when sending packets using the Send() AP...
virtual Address GetBroadcast(void) const
Mac16Address m_dstAddr
Destination address.
Definition: lr-wpan-mac.h:160
static Mac16Address ConvertFrom(const Address &address)
ReceiveCallback m_receiveCallback
Upper layer callback used for notification of new data packet arrivals.
static TypeId GetTypeId(void)
Get the type ID.
TracedCallback m_linkChanges
Trace source for link up/down changes.
virtual uint32_t GetIfIndex(void) const
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: boolean.h:84
void PlmeCcaConfirm(LrWpanPhyEnumeration status)
IEEE 802.15.4-2006 section 6.2.2.2 PLME-CCA.confirm status.
virtual bool SupportsSendFrom(void) const
void CopyFrom(const uint8_t buffer[2])
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:204
virtual void SetReceiveCallback(NetDevice::ReceiveCallback cb)
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
virtual Address GetAddress(void) const
This method indirects to LrWpanMac::SetShortAddress ()
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
void CopyTo(uint8_t buffer[2]) const
virtual void DoDispose(void)
Destructor implementation.
Definition: object.cc:346
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
virtual void DoDispose(void)
Destructor implementation.
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
Network layer to device interface.
uint8_t m_msduHandle
MSDU handle.
Definition: lr-wpan-mac.h:162
a polymophic address class
Definition: address.h:90
Ptr< LrWpanPhy > GetPhy(void) const
Get the PHY used by this NetDevice.
channel
Definition: third.py:92
mobility
Definition: third.py:108
virtual void SetAddress(Address address)
This method indirects to LrWpanMac::SetShortAddress ()
phy
Definition: third.py:93
virtual Ptr< Channel > GetChannel(void) const
void SetPhy(Ptr< LrWpanPhy > phy)
Set the PHY to be used by the MAC and this NetDevice.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
void SetLrWpanMacState(LrWpanMacState macState)
CSMA-CA algorithm calls back the MAC after executing channel assessment.
Definition: lr-wpan-mac.cc:988
Keep track of the current position and velocity of an object.
Ptr< LrWpanMac > m_mac
The MAC for this NetDevice.
void PlmeEdConfirm(LrWpanPhyEnumeration status, uint8_t energyLevel)
IEEE 802.15.4-2006 section 6.2.2.4 PLME-ED.confirm status and energy level.
Definition: lr-wpan-mac.cc:928
TX_OPTION_ACK.
Definition: lr-wpan-mac.h:57
void CopyTo(uint8_t buffer[6]) const
virtual void SetIfIndex(const uint32_t index)
void SetChannel(Ptr< SpectrumChannel > channel)
Set the channel to which the NetDevice, and therefore the PHY, should be attached to...
Ptr< LrWpanCsmaCa > m_csmaca
The CSMA/CA implementation for this NetDevice.
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: pointer.h:220
virtual void DoInitialize(void)
Initialize() implementation.
virtual bool IsMulticast(void) const
mac
Definition: third.py:99
void LinkDown(void)
Mark NetDevice link as down.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:1489
void PdDataConfirm(LrWpanPhyEnumeration status)
IEEE 802.15.4-2006 section 6.2.1.2 Confirm the end of transmission of an MPDU to MAC.
Definition: lr-wpan-mac.cc:839
uint8_t m_txOptions
Tx Options (bitfield)
Definition: lr-wpan-mac.h:163
void SetMac(Ptr< LrWpanMac > mac)
Set the MAC to be used by this NetDevice.
static Mac48Address ConvertFrom(const Address &address)
void PdDataIndication(uint32_t psduLength, Ptr< Packet > p, uint8_t lqi)
IEEE 802.15.4-2006 section 6.2.1.3 PD-DATA.indication Indicates the transfer of an MPDU from PHY to M...
Definition: lr-wpan-mac.cc:491
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:459
LrWpanAddressMode m_srcAddrMode
Source address mode.
Definition: lr-wpan-mac.h:157
static Mac16Address GetBroadcast(void)
bool m_linkUp
Is the link/device currently up and running?
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Hold objects of type Ptr<T>.
Definition: pointer.h:36
Mac48Address BuildPseudoMacAddress(uint16_t panId, Mac16Address shortAddr) const
Builds a Mac48Address from the PanId and Short Address The form is PanId : 0x0 : 0x0 : ShortAddress...
address
Definition: first.py:37
LrWpanAddressMode m_dstAddrMode
Destination address mode.
Definition: lr-wpan-mac.h:158
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Definition: boolean.cc:121
Ptr< LrWpanPhy > m_phy
The PHY for this NetDevice.
void CompleteConfig(void)
Configure PHY, MAC and CSMA/CA.
Ptr< SpectrumChannel > DoGetChannel(void) const
Attribute accessor method for the "Channel" attribute.
an EUI-48 address
Definition: mac48-address.h:43
uint32_t m_ifIndex
The interface index of this NetDevice.
Mac16Address m_srcAddr
Source address.
Definition: lr-wpan-mac.h:186
This class can contain 16 bit addresses.
Definition: mac16-address.h:41
void CopyFrom(const uint8_t buffer[6])
void McpsDataIndication(McpsDataIndicationParams params, Ptr< Packet > pkt)
The callback used by the MAC to hand over incoming packets to the NetDevice.
virtual ~LrWpanNetDevice(void)
Describes an IPv6 address.
Definition: ipv6-address.h:49
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
virtual bool IsPointToPoint(void) const
Return true if the net device is on a point-to-point link.
void ConnectWithoutContext(const CallbackBase &callback)
Append a Callback to the chain (without a context).
Network layer to device interface.
Definition: net-device.h:95
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:264
void LinkUp(void)
Mark NetDevice link as up.
Ptr< LrWpanCsmaCa > GetCsmaCa(void) const
Get the CSMA/CA implementation used by this NetDevice.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:272
Ptr< Node > m_node
The node associated with this NetDevice.
virtual Ptr< Node > GetNode(void) const
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR.
Definition: log.h:256
void PlmeSetTRXStateConfirm(LrWpanPhyEnumeration status)
IEEE 802.15.4-2006 section 6.2.2.8 PLME-SET-TRX-STATE.confirm Set PHY state.
Definition: lr-wpan-mac.cc:943
MCPS-DATA.request params.
Definition: lr-wpan-mac.h:146
virtual bool IsLinkUp(void) const
virtual Address GetMulticast(Ipv4Address multicastGroup) const
Make and return a MAC multicast address using the provided multicast group.
static Mac16Address GetMulticast(Ipv6Address address)
Returns the multicast address associated with an IPv6 address according to RFC 4944 Section 9...
static bool IsMatchingType(const Address &address)
Ptr< LrWpanMac > GetMac(void) const
Get the MAC used by this NetDevice.
bool m_configComplete
True if MAC, PHY and CSMA/CA where successfully configured and the NetDevice is ready for being used...
void SetCsmaCa(Ptr< LrWpanCsmaCa > csmaca)
Set the CSMA/CA implementation to be used by the MAC and this NetDevice.
a unique identifier for an interface.
Definition: type-id.h:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:915
void PlmeSetAttributeConfirm(LrWpanPhyEnumeration status, LrWpanPibAttributeIdentifier id)
IEEE 802.15.4-2006 section 6.2.2.10 PLME-SET.confirm Set attributes per definition from Table 23 in s...
Definition: lr-wpan-mac.cc:981
virtual bool SetMtu(const uint16_t mtu)
virtual bool IsBroadcast(void) const
MCPS-DATA.indication params.
Definition: lr-wpan-mac.h:182
uint32_t CopyTo(uint8_t buffer[MAX_SIZE]) const
Copy the address bytes into a buffer.
Definition: address.cc:82
virtual bool NeedsArp(void) const