A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
lr-wpan-mac-base.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Tokushima University, Japan.
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Alberto Gallegos Ramonet <alramonet@is.tokushima-u.ac.jp>
7 */
8
9#ifndef LR_WPAN_MAC_BASE_H
10#define LR_WPAN_MAC_BASE_H
11
12#include "ns3/callback.h"
13#include "ns3/mac16-address.h"
14#include "ns3/mac64-address.h"
15#include "ns3/nstime.h"
16#include "ns3/object.h"
17#include "ns3/packet.h"
18#include "ns3/ptr.h"
19
20#include <cstdint>
21
22namespace ns3
23{
24namespace lrwpan
25{
26
27/**
28 * @ingroup lr-wpan
29 *
30 * The status of a confirm or an indication primitive as a result of a previous request.
31 * Represent the value of status in IEEE 802.15.4-2011 primitives.
32 * (Tables 6, 12, 18, 20, 31, 33, 35, 37, 39, 47)
33 *
34 * Status codes values only appear in IEEE 802.15.4-2006, Table 78
35 * See also NXP JN5169 IEEE 802.15.4 Stack User Guide
36 * (Table 6: Status Enumerations and Section 6.1.23)
37 *
38 */
39enum class MacStatus : std::uint8_t
40{
41 SUCCESS = 0, //!< The operation was completed successfully.
42 FULL_CAPACITY = 0x01, //!< PAN at capacity. Association Status field (std. 2006, Table 83)
43 ACCESS_DENIED = 0x02, //!< PAN access denied. Association Status field (std. 2006, Table 83)
44 COUNTER_ERROR = 0xdb, //!< The frame counter of the received frame is invalid.
45 IMPROPER_KEY_TYPE = 0xdc, //!< The key is not allowed to be used with that frame type.
46 IMPROPER_SECURITY_LEVEL = 0xdd, //!< Insufficient security level expected by the recipient.
47 UNSUPPORTED_LEGACY = 0xde, //!< Deprecated security used in IEEE 802.15.4-2003
48 UNSUPPORTED_SECURITY = 0xdf, //!< The security applied is not supported.
49 BEACON_LOSS = 0xe0, //!< The beacon was lost following a synchronization request.
50 CHANNEL_ACCESS_FAILURE = 0xe1, //!< A Tx could not take place due to activity in the CH.
51 DENIED = 0xe2, //!< The GTS request has been denied by the PAN coordinator.
52 DISABLE_TRX_FAILURE = 0xe3, //!< The attempt to disable the transceier has failed.
53 SECURITY_ERROR = 0xe4, // Cryptographic process of the frame failed(FAILED_SECURITY_CHECK).
54 FRAME_TOO_LONG = 0xe5, //!< Frame more than aMaxPHYPacketSize or too large for CAP or GTS.
55 INVALID_GTS = 0xe6, //!< Missing GTS transmit or undefined direction.
56 INVALID_HANDLE = 0xe7, //!< When purging from TX queue handle was not found.
57 INVALID_PARAMETER = 0xe8, //!< Primitive parameter not supported or out of range.
58 NO_ACK = 0xe9, //!< No acknowledgment was received after macMaxFrameRetries.
59 NO_BEACON = 0xea, //!< A scan operation failed to find any network beacons.
60 NO_DATA = 0xeb, //!< No response data were available following a request.
61 NO_SHORT_ADDRESS = 0xec, //!< Failure due to unallocated 16-bit short address.
62 OUT_OF_CAP = 0xed, //!< (Deprecated) See IEEE 802.15.4-2003
63 PAN_ID_CONFLICT = 0xee, //!< PAN id conflict detected and informed to the coordinator.
64 REALIGMENT = 0xef, //!< A coordinator realigment command has been received.
65 TRANSACTION_EXPIRED = 0xf0, //!< The transaction expired and its information discarded.
66 TRANSACTION_OVERFLOW = 0xf1, //!< There is no capacity to store the transaction.
67 TX_ACTIVE = 0xf2, //!< The transceiver was already enabled.
68 UNAVAILABLE_KEY = 0xf3, //!< Unavailable key, unknown or blacklisted.
69 UNSUPPORTED_ATTRIBUTE = 0xf4, //!< SET/GET request issued with a non supported ID.
70 INVALID_ADDRESS = 0xf5, //!< Invalid source or destination address.
71 ON_TIME_TOO_LONG = 0xf6, //!< RX enable request fail due to syms. longer than Bcn. interval
72 PAST_TIME = 0xf7, //!< Rx enable request fail due to lack of time in superframe.
73 TRACKING_OFF = 0xf8, //!< This device is currently not tracking beacons.
74 INVALID_INDEX = 0xf9, //!< A MAC PIB write failed because specified index is out of range.
75 LIMIT_REACHED = 0xfa, //!< PAN descriptors stored reached max capacity.
76 READ_ONLY = 0xfb, //!< SET/GET request issued for a read only attribute.
77 SCAN_IN_PROGRESS = 0xfc, //!< Scan failed because already performing another scan.
78 SUPERFRAME_OVERLAP = 0xfd //!< Coordinator superframe and this device superframe tx overlap.
79};
80
81/**
82 * @ingroup lr-wpan
83 *
84 * table 80 of 802.15.4
85 */
93
94/**
95 * @ingroup lr-wpan
96 *
97 * Table 30 of IEEE 802.15.4-2011
98 */
106
107/**
108 * @ingroup lr-wpan
109 *
110 * MCPS-DATA.request params. See 7.1.1.1
111 */
113{
114 AddressMode m_srcAddrMode{SHORT_ADDR}; //!< Source address mode
115 AddressMode m_dstAddrMode{SHORT_ADDR}; //!< Destination address mode
116 uint16_t m_dstPanId{0}; //!< Destination PAN identifier
117 Mac16Address m_dstAddr; //!< Destination address
118 Mac64Address m_dstExtAddr; //!< Destination extended address
119 uint8_t m_msduHandle{0}; //!< MSDU handle
120 uint8_t m_txOptions{0}; //!< Tx Options (bitfield)
121};
122
123/**
124 * @ingroup lr-wpan
125 *
126 * MLME-START.request params. See 802.15.4-2011 Section 6.2.12.1
127 */
129{
130 uint16_t m_PanId{0}; //!< Pan Identifier used by the device.
131 uint8_t m_logCh{11}; //!< Logical channel on which to start using the
132 //!< new superframe configuration.
133 uint32_t m_logChPage{0}; //!< Logical channel page on which to start using the
134 //!< new superframe configuration.
135 uint32_t m_startTime{0}; //!< Time at which to begin transmitting beacons (Used by Coordinator
136 //!< not PAN Coordinators). The time is specified in symbols.
137 uint8_t m_bcnOrd{15}; //!< Beacon Order, Used to calculate the beacon interval, a value of 15
138 //!< indicates no periodic beacons will be transmitted.
139 uint8_t m_sfrmOrd{15}; //!< Superframe Order, indicates the length of the CAP in time slots.
140 bool m_panCoor{false}; //!< On true this device will become coordinator.
141 bool m_battLifeExt{false}; //!< Flag indicating whether or not the Battery life extension (BLE)
142 //!< features are used.
143 bool m_coorRealgn{false}; //!< True if a realignment request command is to be transmitted prior
144 //!< changing the superframe.
145};
146
147/**
148 * @ingroup lr-wpan
149 *
150 * MLME-SCAN.request params. See IEEE 802.15.4-2011 Section 6.2.10.1 Table 30
151 */
153{
154 MlmeScanType m_scanType{MLMESCAN_PASSIVE}; //!< Indicates the type of scan performed as
155 //!< described in IEEE 802.15.4-2011 (5.1.2.1).
156 uint32_t m_scanChannels{0x7FFF800}; //!< The channel numbers to be scanned.
157 //!< Default: (0x7FFF800 = Ch11-Ch26)
158 //!< 27 LSB (b0,b1,...,b26) = channels
159 uint8_t m_scanDuration{14}; //!< The factor (0-14) used to calculate the length of time
160 //!< to spend scanning.
161 //!< scanDurationSymbols =
162 //!< [aBaseSuperframeDuration * (2^m_scanDuration + 1)].
163 uint32_t m_chPage{0}; //!< The channel page on which to perform scan.
164};
165
166/**
167 * @ingroup lr-wpan
168 *
169 * MLME-ASSOCIATE.request params. See 802.15.4-2011 Section 6.2.2.1
170 */
172{
173 uint8_t m_chNum{11}; //!< The channel number on which to attempt association.
174 uint32_t m_chPage{0}; //!< The channel page on which to attempt association.
175 uint8_t m_coordAddrMode{SHORT_ADDR}; //!< The coordinator addressing mode for this
176 //!< primitive and subsequent MPDU.
177 uint16_t m_coordPanId{0}; //!< The identifier of the PAN with which to associate.
178 Mac16Address m_coordShortAddr; //!< The short address of the coordinator
179 //!< with which to associate.
180 Mac64Address m_coordExtAddr; //!< The extended address of the coordinator
181 //!< with which to associate.
182 uint8_t m_capabilityInfo{0}; //!< Specifies the operational capabilities
183 //!< of the associating device (bitmap).
184};
185
186/**
187 * @ingroup lr-wpan
188 *
189 * MLME-ASSOCIATE.response params. See 802.15.4-2011 6.2.2.3.
190 */
192{
193 Mac64Address m_extDevAddr; //!< The extended address of the device requesting association
194 Mac16Address m_assocShortAddr; //!< The short address allocated by the coordinator on successful
195 //!< assoc. FF:FF = Unsuccessful
197 MacStatus::ACCESS_DENIED}; //!< The status of the association
198 //!< attempt (As defined on Table 83 IEEE 802.15.4-2006)
199};
200
201/**
202 * @ingroup lr-wpan
203 *
204 * MLME-ORPHAN.response params. See 802.15.4-2011 Section 6.2.7.2
205 */
207{
208 Mac64Address m_orphanAddr; //!< The address of the orphaned device.
209 Mac16Address m_shortAddr; //!< The short address allocated.
210 bool m_assocMember{false}; //!< T = allocated with this coord | F = otherwise
211};
212
213/**
214 * @ingroup lr-wpan
215 *
216 * MLME-SYNC.request params. See 802.15.4-2011 Section 6.2.13.1
217 */
219{
220 uint8_t m_logCh{11}; //!< The channel number on which to attempt coordinator synchronization.
221 bool m_trackBcn{false}; //!< True if the mlme sync with the next beacon and attempts to track
222 //!< future beacons. False if mlme sync only the next beacon.
223};
224
225/**
226 * @ingroup lr-wpan
227 *
228 * MLME-POLL.request params. See 802.15.4-2011 Section 6.2.14.1
229 */
231{
232 AddressMode m_coorAddrMode{SHORT_ADDR}; //!< The addressing mode of the coordinator
233 //!< to which the pool is intended.
234 uint16_t m_coorPanId{0}; //!< The PAN id of the coordinator to which the poll is intended.
235 Mac16Address m_coorShortAddr; //!< Coordinator short address.
236 Mac64Address m_coorExtAddr; //!< Coordinator extended address.
237};
238
239/**
240 * @ingroup lr-wpan
241 *
242 * IEEE 802.15.4-2006 PHY and MAC PIB Attribute Identifiers Table 23 and Table 86.
243 * Note: Attribute identifiers use standardized values.
244 */
246{
247 pCurrentChannel = 0x00, //!< RF channel used for transmissions and receptions.
248 pCurrentPage = 0x04, //!< The current channel page.
249 macAckWaitDuration = 0x40, //!< Maximum number of symbols to wait for an acknowledgment.
250 macAssociationPermit = 0x41, //!< Indication of whether a coordinator is allowing association.
251 macAutoRequest = 0x42, //!< Indication of whether a device automatically sends a data request
252 //!< command if its address is listed in a beacon frame.
253 macBattLifeExt = 0x43, //!< Indication of whether BLE, through the reduction of coordinator
254 //!< receiver operation time during the CAP, is enabled.
255 macBattLifeExtPeriods = 0x44, //!< In BLE mode, the number of backoff periods during which the
256 //!< the receiver is enabled after the IFS following a beacon.
257 macBeaconPayload = 0x45, //!< The contents of the beacon payload.
258 macBeaconPayloadLength = 0x46, //!< The length in octets of the beacon payload.
259 macBeaconOrder = 0x47, //!< Specification of how often the coordinator transmits its beacon.
260 macBeaconTxTime = 0x48, //!< The time that the device transmitted its last beacome frame,
261 //!< in symbol periods.
262 macBsn = 0x49, //!< The sequence number added to the transmitted beacon frame.
263 macCoordExtendedAddress = 0x4a, //!< The 64-bit address of the coordinator through which
264 //!< the device is associated.
265 macCoordShortAddress = 0x4b, //!< The 16-bit short address assigned to the coordinator through
266 //!< which the device is associated. 0xFFFE = Ext address mode
267 //!< 0xFFFF = Unknown.
268 macDSN = 0x4c, //!< The sequence number added to the transmitted data or MAC command frame.
269 macGTSPermit = 0x4d, //!< True if the PAN coordinator is to accept GTS requests.
270 macMaxCSMABackoff = 0x4e, //!< The maximum number of backoffs the CSMA-CA algorithm
271 //!< will attempt before declaring a channel access failure.
272 macMinBE = 0x4f, //!< The minimum value of the backoff exponent (BE) in the CSMA-CA algorithm.
273 macExtendedAddress = 0x6f, //!< The extended address of the device (64 bit address). The id
274 //!< is not compliant for 2003 and 2006 versions, but this attribute
275 //!< is later on added to the Pib attributes in 2011 and subsequent
276 //!< editions of the standard.
277 macPanId = 0x50, //!< The 16-bit identifier of the Personal Area Network (PAN).
278 macPromiscuousMode = 0x51, //!< Indication of whether the MAC sublayer is in a promiscuous
279 //!< mode. True indicates that the MAC sublayer accepts all frames.
280 macRxOnWhenIdle = 0x52, //!< Indication of whether the MAC is enabled during idle periods.
281 macShortAddress = 0x53, //!< The short address of the device (16 bit address).
282 macSuperframeOrder = 0x54, //!< The length of the active portion of the outgoing superframe,
283 //!< including the beacon frame.
284 macTransactionPersistenceTime = 0x55, //!< The maximum time (in unit periods) that a
285 //!< transaction is stored by a coordinator and
286 //!< indicated in its beacon.
287 macMaxFrameRetries = 0x59, //!< The maximum number of retries allowed after a transmission
288 //!< failure.
289 macResponseWaitTime = 0x5a, //!< The maximum time in multiples of aBaseSuperframeDuration, a
290 //!< device shall wait for a response command frame to be
291 //!< available following a request command frame.
293 // TODO: complete other MAC pib attributes
294};
295
296/**
297 * @ingroup lr-wpan
298 *
299 * IEEE802.15.4-2011 PHY PIB Attributes Table 52 in section 6.4.2
300 */
301struct MacPibAttributes : public SimpleRefCount<MacPibAttributes>
302{
303 std::vector<uint8_t> macBeaconPayload{}; //!< The set with the contents of the beacon payload.
304 uint8_t macBeaconPayloadLength{0}; //!< The length in octets of the beacon payload.
305 Mac16Address macShortAddress; //!< The 16 bit mac short address
306 Mac64Address macExtendedAddress; //!< The EUI-64 bit address
307 uint16_t macPanId{0xffff}; //!< The identifier of the PAN
308 bool macAssociationPermit{true}; //!< Indication of whether the coordinator is allowing
309 //!< association.
310 bool macRxOnWhenIdle{true}; //!< Indication of whether the MAC is enabled during idle periods.
311 bool macPromiscuousMode{false}; //!< Indication of whether the mac is in promiscuous mode
312 //!< (Receive all mode).
313 uint8_t pCurrentChannel{11}; //!< The current logical channel in used in the PHY
314 uint8_t pCurrentPage{0}; //!< The current logical page in use in the PHY
315 // TODO: complete other MAC pib attributes
316};
317
318/**
319 * @ingroup lr-wpan
320 *
321 * MCPS-DATA.confirm params. See 7.1.1.2
322 */
324{
325 uint8_t m_msduHandle{0}; //!< MSDU handle
327 //!< of the last MSDU transmission
328};
329
330/**
331 * @ingroup lr-wpan
332 *
333 * MCPS-DATA.indication params.
334 * See IEEE 802.15.4-2011, Section 7.1.1.1
335 * See IEEE 802.15.4-2015, Section 8.3.3 (e.g., RSSI)
336 */
338{
339 uint8_t m_srcAddrMode{SHORT_ADDR}; //!< Source address mode
340 uint16_t m_srcPanId{0}; //!< Source PAN identifier
341 Mac16Address m_srcAddr; //!< Source address
342 Mac64Address m_srcExtAddr; //!< Source extended address
343 uint8_t m_dstAddrMode{SHORT_ADDR}; //!< Destination address mode
344 uint16_t m_dstPanId{0}; //!< Destination PAN identifier
345 Mac16Address m_dstAddr; //!< Destination address
346 Mac64Address m_dstExtAddr; //!< Destination extended address
347 uint8_t m_mpduLinkQuality{0}; //!< LQI value measured during reception of the MPDU
348 int8_t m_rssi{-128}; //!< RSSI value measured after the preamble
349 //!< during the reception of the packet SFD.
350 //!< (IEEE 802.15.4-2015 onwards)
351 uint8_t m_dsn{0}; //!< The DSN of the received data frame
352};
353
354/**
355 * @ingroup lr-wpan
356 *
357 * MLME-ASSOCIATE.indication params. See 802.15.4-2011 6.2.2.2.
358 */
360{
361 Mac64Address m_extDevAddr; //!< The extended address of the device requesting association
362 uint8_t capabilityInfo{0}; //!< The operational capabilities of
363 //!< the device requesting association.
364 uint8_t lqi{0}; //!< The link quality indicator of the received associate request command
365 //!< (Not officially supported in the standard but found in implementations)
366};
367
368/**
369 * @ingroup lr-wpan
370 *
371 * MLME-COMM-STATUS.indication params. See 802.15.4-2011 Section 6.2.4.2 Table 18
372 */
374{
375 uint16_t m_panId{0}; //!< The PAN identifier of the device from which the frame was received or
376 //!< to which the frame was being sent.
377 uint8_t m_srcAddrMode{SHORT_ADDR}; //!< The source addressing mode for this primitive
378 Mac16Address m_srcShortAddr; //!< The short address of the entity from which the frame causing
379 //!< the error originated.
380 Mac64Address m_srcExtAddr; //!< The extended address of the entity from which the frame causing
381 //!< the error originated.
382 uint8_t m_dstAddrMode{SHORT_ADDR}; //!< The destination addressing mode for this primitive.
383 Mac16Address m_dstShortAddr; //!< The short address of the device for
384 //!< which the frame was intended.
385 Mac64Address m_dstExtAddr; //!< The extended address of the device for
386 //!< which the frame was intended.
387 MacStatus m_status{MacStatus::INVALID_PARAMETER}; //!< The communication status
388};
389
390/**
391 * @ingroup lr-wpan
392 *
393 * MLME-ORPHAN.indication params. See 802.15.4-2011 Section 6.2.7.1
394 */
396{
397 Mac64Address m_orphanAddr; //!< The address of the orphaned device.
398};
399
400/**
401 * @ingroup lr-wpan
402 *
403 * MLME-START.confirm params. See 802.15.4-2011 Section 6.2.12.2
404 */
406{
408 //!< a MLME-start.request
409};
410
411/**
412 * @ingroup lr-wpan
413 *
414 * PAN Descriptor, Table 17 IEEE 802.15.4-2011
415 */
417{
418 AddressMode m_coorAddrMode{SHORT_ADDR}; //!< The coordinator addressing mode corresponding
419 //!< to the received beacon frame.
420 uint16_t m_coorPanId{0xffff}; //!< The PAN ID of the coordinator as specified in
421 //!< the received beacon frame.
422 Mac16Address m_coorShortAddr; //!< The coordinator short address as specified in the coordinator
423 //!< address mode.
424 Mac64Address m_coorExtAddr; //!< The coordinator extended address as specified in the
425 //!< coordinator address mode.
426 uint8_t m_logCh{11}; //!< The current channel number occupied by the network.
427 uint8_t m_logChPage{0}; //!< The current channel page occupied by the network.
428 uint16_t m_superframeSpec{0}; //!< The superframe specification as specified in the received
429 //!< beacon frame.
430 bool m_gtsPermit{false}; //!< TRUE if the beacon is from the PAN coordinator
431 //!< that is accepting GTS requests.
432 uint8_t m_linkQuality{0}; //!< The LQI at which the network beacon was received.
433 //!< Lower values represent lower LQI.
434 Time m_timeStamp; //!< Beacon frame reception time. Used as Time data type in ns-3 to avoid
435 //!< precision problems.
436};
437
438/**
439 * @ingroup lr-wpan
440 *
441 * MLME-SCAN.confirm params. See IEEE 802.15.4-2011 Section 6.2.10.2
442 */
444{
445 MacStatus m_status{MacStatus::INVALID_PARAMETER}; //!< The status of the scan request.
446 uint8_t m_scanType{MLMESCAN_PASSIVE}; //!< Indicates the type of scan
447 //!< performed (ED,ACTIVE,PASSIVE,ORPHAN).
448 uint32_t m_chPage{0}; //!< The channel page on which the scan was performed.
449 std::vector<uint8_t> m_unscannedCh; //!< A list of channels given in the request which
450 //!< were not scanned (Not valid for ED scans).
451 uint8_t m_resultListSize{0}; //!< The number of elements returned in the appropriate
452 //!< result list. (Not valid for Orphan scan).
453 std::vector<uint8_t> m_energyDetList; //!< A list of energy measurements, one for each
454 //!< channel searched during ED scan
455 //!< (Not valid for Active, Passive or Orphan Scans)
456 std::vector<PanDescriptor> m_panDescList; //!< A list of PAN descriptor, one for each beacon
457 //!< found (Not valid for ED and Orphan scans).
458};
459
460/**
461 * @ingroup lr-wpan
462 *
463 * MLME-ASSOCIATE.confirm params. See 802.15.4-2011 Section 6.2.2.4
464 */
466{
467 Mac16Address m_assocShortAddr; //!< The short address used in the association request
469 //!< a MLME-associate.request
470};
471
472/**
473 * @ingroup lr-wpan
474 *
475 * MLME-BEACON-NOTIFY.indication params. See 802.15.4-2011 Section 6.2.4.1, Table 16
476 */
478{
479 uint8_t m_bsn{0}; //!< The beacon sequence number.
480 PanDescriptor m_panDescriptor; //!< The PAN descriptor for the received beacon.
481 uint32_t m_sduLength{0}; //!< The number of octets contained in the beacon payload.
482 Ptr<Packet> m_sdu; //!< The set of octets comprising the beacon payload.
483};
484
485/**
486 * @ingroup lr-wpan
487 *
488 * MLME-SYNC-LOSS.indication params. See 802.15.4-2011 Section 6.2.13.2, Table 37
489 */
491{
492 MacStatus m_lossReason{MacStatus::PAN_ID_CONFLICT}; //!< The reason for the lost
493 //!< of synchronization.
494 uint16_t m_panId{0}; //!< The PAN identifier with which the device lost synchronization or to
495 //!< which it was realigned.
496 uint8_t m_logCh{11}; //!< The channel number on which the device lost synchronization or to
497 //!< which it was realigned.
498};
499
500/**
501 * @ingroup lr-wpan
502 *
503 * MLME-SET.confirm params. See 802.15.4-2011 Section 6.2.11.2
504 */
506{
508 //!< the request to write
509 //!< the PIB attribute.
512 //!< PIB attribute that was written.
513};
514
515/**
516 * @ingroup lr-wpan
517 *
518 * MLME-START.confirm params. See 802.15.4-2011 Section 6.2.14.2
519 */
521{
523 //!< status resulting from a
524 //!< MLME-poll.request.
525};
526
527/**
528 * @ingroup lr-wpan
529 *
530 * This callback is called after a McpsDataRequest has been called from
531 * the higher layer. It returns a status of the outcome of the
532 * transmission request
533 */
535
536/**
537 * @ingroup lr-wpan
538 *
539 * This callback is called after a Mcps has successfully received a
540 * frame and wants to deliver it to the higher layer.
541 *
542 * @todo for now, we do not deliver all of the parameters in section
543 * 802.15.4-2006 7.1.1.3.1 but just send up the packet.
544 */
546
547/**
548 * @ingroup lr-wpan
549 *
550 * This callback is called after a Mlme has successfully received a command
551 * frame and wants to deliver it to the higher layer.
552 *
553 * Security related parameters and not handle.
554 * See 802.15.4-2011 6.2.2.2.
555 */
557
558/**
559 * @ingroup lr-wpan
560 *
561 * This callback is called by the MLME and issued to its next higher layer following
562 * a transmission instigated through a response primitive.
563 *
564 * Security related parameters and not handle.
565 * See 802.15.4-2011 6.2.4.2
566 */
568
569/**
570 * @ingroup lr-wpan
571 *
572 * This callback is called by the MLME and issued to its next higher layer following
573 * the reception of a orphan notification.
574 *
575 * Security related parameters and not handle.
576 * See 802.15.4-2011 6.2.7.1
577 */
579
580/**
581 * @ingroup lr-wpan
582 *
583 * This callback is called after a MlmeStartRequest has been called from
584 * the higher layer. It returns a status of the outcome of the
585 * transmission request
586 */
588
589/**
590 * @ingroup lr-wpan
591 *
592 * This callback is called after a MlmeScanRequest has been called from
593 * the higher layer. It returns a status of the outcome of the scan.
594 */
596
597/**
598 * @ingroup lr-wpan
599 *
600 * This callback is called after a MlmeAssociateRequest has been called from
601 * the higher layer. It returns a status of the outcome of the
602 * association request
603 */
605
606/**
607 * @ingroup lr-wpan
608 *
609 * This callback is called after a Mlme has successfully received a
610 * beacon frame and wants to deliver it to the higher layer.
611 *
612 * @todo for now, we do not deliver all of the parameters in section
613 * 802.15.4-2006 6.2.4.1 but just send up the packet.
614 */
616
617/**
618 * @ingroup lr-wpan
619 *
620 * This callback is called to indicate the loss of synchronization with
621 * a coordinator.
622 *
623 * @todo for now, we do not deliver all of the parameters in section
624 * See IEEE 802.15.4-2011 6.2.13.2.
625 */
627
628/**
629 * @ingroup lr-wpan
630 *
631 * This callback is called after a MlmeSetRequest has been called from
632 * the higher layer to set a PIB. It returns a status of the outcome of the
633 * write attempt.
634 */
636
637/**
638 * @ingroup lr-wpan
639 *
640 * This callback is called after a MlmeGetRequest has been called from
641 * the higher layer to get a PIB. It returns a status of the outcome of the
642 * write attempt.
643 */
646
647/**
648 * @ingroup lr-wpan
649 *
650 * This callback is called after a Mlme-Poll.Request has been called from
651 * the higher layer. It returns a status of the outcome of the
652 * transmission request
653 */
655
656/**
657 * @ingroup netdevice
658 *
659 * @brief Lr-wpan MAC layer abstraction
660 *
661 * This class defines the interface functions (primitives) used by a IEEE 802.15.4-2011 compliant
662 * MAC layer. Any lr-wpan MAC should extend from this class and implement the
663 * behavior of the basic MAC interfaces (primitives).
664 *
665 */
666class LrWpanMacBase : public Object
667{
668 public:
669 /**
670 * @brief Get the type ID.
671 * @return the object TypeId
672 */
673 static TypeId GetTypeId();
674 ~LrWpanMacBase() override;
675
676 /**
677 * IEEE 802.15.4-2006, section 7.1.1.1
678 * MCPS-DATA.request
679 * Request to transfer a MSDU.
680 *
681 * @param params the request parameters
682 * @param p the packet to be transmitted
683 */
685
686 /**
687 * IEEE 802.15.4-2006, section 7.1.14.1
688 * MLME-START.request
689 * Request to allow a PAN coordinator to initiate
690 * a new PAN or beginning a new superframe configuration.
691 *
692 * @param params the request parameters
693 */
694 virtual void MlmeStartRequest(MlmeStartRequestParams params) = 0;
695
696 /**
697 * IEEE 802.15.4-2011, section 6.2.10.1
698 * MLME-SCAN.request
699 * Request primitive used to initiate a channel scan over a given list of channels.
700 *
701 * @param params the scan request parameters
702 */
703 virtual void MlmeScanRequest(MlmeScanRequestParams params) = 0;
704
705 /**
706 * IEEE 802.15.4-2011, section 6.2.2.1
707 * MLME-ASSOCIATE.request
708 * Request primitive used by a device to request an association with
709 * a coordinator.
710 *
711 * @param params the request parameters
712 */
714
715 /**
716 * IEEE 802.15.4-2011, section 6.2.2.3
717 * MLME-ASSOCIATE.response
718 * Primitive used to initiate a response to an MLME-ASSOCIATE.indication
719 * primitive.
720 *
721 * @param params the associate response parameters
722 */
724
725 /**
726 * IEEE 802.15.4-2011, section 6.2.13.1
727 * MLME-SYNC.request
728 * Request to synchronize with the coordinator by acquiring and,
729 * if specified, tracking beacons.
730 *
731 * @param params the request parameters
732 */
733 virtual void MlmeSyncRequest(MlmeSyncRequestParams params) = 0;
734
735 /**
736 * IEEE 802.15.4-2011, section 6.2.14.2
737 * MLME-POLL.request
738 * Prompts the device to request data from the coordinator.
739 *
740 * @param params the request parameters
741 */
742 virtual void MlmePollRequest(MlmePollRequestParams params) = 0;
743
744 /**
745 * IEEE 802.15.4-2011, section 6.2.7.2
746 * MLME-ORPHAN.response
747 * Primitive used to initiatte a response to an MLME-ORPHAN.indication
748 * primitive.
749 *
750 * @param params the orphan response parameters
751 */
753
754 /**
755 * IEEE 802.15.4-2011, section 6.2.11.1
756 * MLME-SET.request
757 * Attempts to write the given value to the indicated PIB attribute.
758 *
759 * @param id the attributed identifier
760 * @param attribute the attribute value
761 */
763
764 /**
765 * IEEE 802.15.4-2006, section 7.1.6.1
766 * MLME-GET.request
767 * Request information about a given PIB attribute.
768 * Note: The PibAttributeIndex parameter is not included because
769 * attributes that represent tables are not supported.
770 *
771 * @param id the attribute identifier
772 */
774
775 /**
776 * Set the callback for the confirmation of a data transmission request.
777 * The callback implements MCPS-DATA.confirm SAP of IEEE 802.15.4-2006,
778 * section 7.1.1.2.
779 *
780 * @param c the callback
781 */
783
784 /**
785 * Set the callback for the indication of an incoming data packet.
786 * The callback implements MCPS-DATA.indication SAP of IEEE 802.15.4-2006,
787 * section 7.1.1.3.
788 *
789 * @param c the callback
790 */
792
793 /**
794 * Set the callback for the indication of an incoming associate request command.
795 * The callback implements MLME-ASSOCIATE.indication SAP of IEEE 802.15.4-2011,
796 * section 6.2.2.2.
797 *
798 * @param c the callback
799 */
801
802 /**
803 * Set the callback for the indication to a response primitive.
804 * The callback implements MLME-COMM-STATUS.indication SAP of IEEE 802.15.4-2011,
805 * section 6.2.4.2.
806 *
807 * @param c the callback
808 */
810
811 /**
812 * Set the callback for the indication to the reception of an orphan notification.
813 * The callback implements MLME-ORPHAN.indication SAP of IEEE 802.15.4-2011,
814 * section 6.2.7.1.
815 *
816 * @param c the callback
817 */
819
820 /**
821 * Set the callback for the confirmation of a data transmission request.
822 * The callback implements MLME-START.confirm SAP of IEEE 802.15.4-2006,
823 * section 7.1.14.2.
824 *
825 * @param c the callback
826 */
828
829 /**
830 * Set the callback for the confirmation of a data transmission request.
831 * The callback implements MLME-SCAN.confirm SAP of IEEE 802.15.4-2011,
832 * section 6.2.10.2.
833 *
834 * @param c the callback
835 */
837
838 /**
839 * Set the callback for the confirmation of a data transmission request.
840 * The callback implements MLME-ASSOCIATE.confirm SAP of IEEE 802.15.4-2011,
841 * section 6.2.2.4.
842 *
843 * @param c the callback
844 */
846
847 /**
848 * Set the callback for the indication of an incoming beacon packet.
849 * The callback implements MLME-BEACON-NOTIFY.indication SAP of IEEE 802.15.4-2011,
850 * section 6.2.4.1.
851 *
852 * @param c the callback
853 */
855
856 /**
857 * Set the callback for the loss of synchronization with a coordinator.
858 * The callback implements MLME-SYNC-LOSS.indication SAP of IEEE 802.15.4-2011,
859 * section 6.2.13.2.
860 *
861 * @param c the callback
862 */
864
865 /**
866 * Set the callback for the confirmation of an attempt to write an attribute.
867 * The callback implements MLME-SET.confirm SAP of IEEE 802.15.4-2011,
868 * section 6.2.11.2
869 *
870 * @param c the callback
871 */
873
874 /**
875 * Set the callback for the confirmation of an attempt to read an attribute.
876 * The callback implements MLME-GET.confirm SAP of IEEE 802.15.4-2011,
877 * section 6.2.5.2
878 *
879 * @param c the callback
880 */
882
883 /**
884 * Set the callback for the confirmation of a data transmission request.
885 * The callback implements MLME-POLL.confirm SAP of IEEE 802.15.4-2011,
886 * section 6.2.14.2
887 *
888 * @param c the callback
889 */
891
892 protected:
893 /**
894 * This callback is used to report data transmission request status to the
895 * upper layers.
896 * See IEEE 802.15.4-2006, section 7.1.1.2.
897 */
899
900 /**
901 * This callback is used to notify incoming packets to the upper layers.
902 * See IEEE 802.15.4-2006, section 7.1.1.3.
903 */
905
906 /**
907 * This callback is used to indicate the reception of an association request command.
908 * See IEEE 802.15.4-2011, section 6.2.2.2
909 */
911
912 /**
913 * This callback is instigated through a response primitive.
914 * See IEEE 802.15.4-2011, section 6.2.4.2
915 */
917
918 /**
919 * This callback is used to indicate the reception of a orphan notification command.
920 * See IEEE 802.15.4-2011, section 6.2.7.1
921 */
923
924 /**
925 * This callback is used to report the start of a new PAN or
926 * the begin of a new superframe configuration.
927 * See IEEE 802.15.4-2006, section 7.1.14.2.
928 */
930
931 /**
932 * This callback is used to report the result of a scan on a group of channels for the
933 * selected channel page.
934 * See IEEE 802.15.4-2011, section 6.2.10.2.
935 */
937
938 /**
939 * This callback is used to report the status after a device request an association with
940 * a coordinator.
941 * See IEEE 802.15.4-2011, section 6.2.2.4.
942 */
944
945 /**
946 * This callback is used to notify incoming beacon packets to the upper layers.
947 * See IEEE 802.15.4-2011, section 6.2.4.1.
948 */
950
951 /**
952 * This callback is used to indicate the loss of synchronization with a coordinator.
953 * See IEEE 802.15.4-2011, section 6.2.13.2.
954 */
956
957 /**
958 * This callback is used to report the result of an attribute writing request
959 * to the upper layers.
960 * See IEEE 802.15.4-2011, section 6.2.11.2.
961 */
963
964 /**
965 * This callback is used to report the result of an attribute read request
966 * to the upper layers.
967 * See IEEE 802.15.4-2011, section 6.2.5.2
968 */
970
971 /**
972 * This callback is used to report the status after a device send data command request to
973 * the coordinator to transmit data.
974 * See IEEE 802.15.4-2011, section 6.2.14.2.
975 */
977};
978
979} // namespace lrwpan
980} // namespace ns3
981
982#endif /* LR_WPAN_MAC_BASE_H*/
Callback template class.
Definition callback.h:428
This class can contain 16 bit addresses.
an EUI-64 address
Object()
Caller graph was not generated because of its size.
Definition object.cc:93
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
Simulation virtual time values and global simulation resolution.
Definition nstime.h:95
a unique identifier for an interface.
Definition type-id.h:50
Lr-wpan MAC layer abstraction.
void SetMcpsDataConfirmCallback(McpsDataConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
virtual void MlmePollRequest(MlmePollRequestParams params)=0
IEEE 802.15.4-2011, section 6.2.14.2 MLME-POLL.request Prompts the device to request data from the co...
MlmeOrphanIndicationCallback m_mlmeOrphanIndicationCallback
This callback is used to indicate the reception of a orphan notification command.
MlmeGetConfirmCallback m_mlmeGetConfirmCallback
This callback is used to report the result of an attribute read request to the upper layers.
MlmeAssociateIndicationCallback m_mlmeAssociateIndicationCallback
This callback is used to indicate the reception of an association request command.
virtual void McpsDataRequest(McpsDataRequestParams params, Ptr< Packet > p)=0
IEEE 802.15.4-2006, section 7.1.1.1 MCPS-DATA.request Request to transfer a MSDU.
MlmeSetConfirmCallback m_mlmeSetConfirmCallback
This callback is used to report the result of an attribute writing request to the upper layers.
virtual void MlmeOrphanResponse(MlmeOrphanResponseParams params)=0
IEEE 802.15.4-2011, section 6.2.7.2 MLME-ORPHAN.response Primitive used to initiatte a response to an...
MlmePollConfirmCallback m_mlmePollConfirmCallback
This callback is used to report the status after a device send data command request to the coordinato...
MlmeCommStatusIndicationCallback m_mlmeCommStatusIndicationCallback
This callback is instigated through a response primitive.
virtual void MlmeSyncRequest(MlmeSyncRequestParams params)=0
IEEE 802.15.4-2011, section 6.2.13.1 MLME-SYNC.request Request to synchronize with the coordinator by...
virtual void MlmeGetRequest(MacPibAttributeIdentifier id)=0
IEEE 802.15.4-2006, section 7.1.6.1 MLME-GET.request Request information about a given PIB attribute.
void SetMlmeSyncLossIndicationCallback(MlmeSyncLossIndicationCallback c)
Set the callback for the loss of synchronization with a coordinator.
McpsDataConfirmCallback m_mcpsDataConfirmCallback
This callback is used to report data transmission request status to the upper layers.
virtual void MlmeScanRequest(MlmeScanRequestParams params)=0
IEEE 802.15.4-2011, section 6.2.10.1 MLME-SCAN.request Request primitive used to initiate a channel s...
virtual void MlmeAssociateResponse(MlmeAssociateResponseParams params)=0
IEEE 802.15.4-2011, section 6.2.2.3 MLME-ASSOCIATE.response Primitive used to initiate a response to ...
void SetMlmeOrphanIndicationCallback(MlmeOrphanIndicationCallback c)
Set the callback for the indication to the reception of an orphan notification.
McpsDataIndicationCallback m_mcpsDataIndicationCallback
This callback is used to notify incoming packets to the upper layers.
virtual void MlmeStartRequest(MlmeStartRequestParams params)=0
IEEE 802.15.4-2006, section 7.1.14.1 MLME-START.request Request to allow a PAN coordinator to initiat...
MlmeScanConfirmCallback m_mlmeScanConfirmCallback
This callback is used to report the result of a scan on a group of channels for the selected channel ...
void SetMlmeCommStatusIndicationCallback(MlmeCommStatusIndicationCallback c)
Set the callback for the indication to a response primitive.
void SetMlmeAssociateConfirmCallback(MlmeAssociateConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
virtual void MlmeAssociateRequest(MlmeAssociateRequestParams params)=0
IEEE 802.15.4-2011, section 6.2.2.1 MLME-ASSOCIATE.request Request primitive used by a device to requ...
MlmeAssociateConfirmCallback m_mlmeAssociateConfirmCallback
This callback is used to report the status after a device request an association with a coordinator.
void SetMlmeStartConfirmCallback(MlmeStartConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
void SetMlmePollConfirmCallback(MlmePollConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
static TypeId GetTypeId()
Get the type ID.
MlmeSyncLossIndicationCallback m_mlmeSyncLossIndicationCallback
This callback is used to indicate the loss of synchronization with a coordinator.
void SetMlmeScanConfirmCallback(MlmeScanConfirmCallback c)
Set the callback for the confirmation of a data transmission request.
void SetMlmeGetConfirmCallback(MlmeGetConfirmCallback c)
Set the callback for the confirmation of an attempt to read an attribute.
MlmeBeaconNotifyIndicationCallback m_mlmeBeaconNotifyIndicationCallback
This callback is used to notify incoming beacon packets to the upper layers.
void SetMcpsDataIndicationCallback(McpsDataIndicationCallback c)
Set the callback for the indication of an incoming data packet.
void SetMlmeBeaconNotifyIndicationCallback(MlmeBeaconNotifyIndicationCallback c)
Set the callback for the indication of an incoming beacon packet.
virtual void MlmeSetRequest(MacPibAttributeIdentifier id, Ptr< MacPibAttributes > attribute)=0
IEEE 802.15.4-2011, section 6.2.11.1 MLME-SET.request Attempts to write the given value to the indica...
void SetMlmeSetConfirmCallback(MlmeSetConfirmCallback c)
Set the callback for the confirmation of an attempt to write an attribute.
MlmeStartConfirmCallback m_mlmeStartConfirmCallback
This callback is used to report the start of a new PAN or the begin of a new superframe configuration...
void SetMlmeAssociateIndicationCallback(MlmeAssociateIndicationCallback c)
Set the callback for the indication of an incoming associate request command.
Callback< void, McpsDataIndicationParams, Ptr< Packet > > McpsDataIndicationCallback
This callback is called after a Mcps has successfully received a frame and wants to deliver it to the...
Callback< void, MlmeScanConfirmParams > MlmeScanConfirmCallback
This callback is called after a MlmeScanRequest has been called from the higher layer.
MacPibAttributeIdentifier
IEEE 802.15.4-2006 PHY and MAC PIB Attribute Identifiers Table 23 and Table 86.
Callback< void, MlmeOrphanIndicationParams > MlmeOrphanIndicationCallback
This callback is called by the MLME and issued to its next higher layer following the reception of a ...
Callback< void, MlmePollConfirmParams > MlmePollConfirmCallback
This callback is called after a Mlme-Poll.Request has been called from the higher layer.
Callback< void, MlmeStartConfirmParams > MlmeStartConfirmCallback
This callback is called after a MlmeStartRequest has been called from the higher layer.
AddressMode
table 80 of 802.15.4
Callback< void, MlmeSetConfirmParams > MlmeSetConfirmCallback
This callback is called after a MlmeSetRequest has been called from the higher layer to set a PIB.
Callback< void, MacStatus, MacPibAttributeIdentifier, Ptr< MacPibAttributes > > MlmeGetConfirmCallback
This callback is called after a MlmeGetRequest has been called from the higher layer to get a PIB.
Callback< void, MlmeAssociateIndicationParams > MlmeAssociateIndicationCallback
This callback is called after a Mlme has successfully received a command frame and wants to deliver i...
Callback< void, MlmeAssociateConfirmParams > MlmeAssociateConfirmCallback
This callback is called after a MlmeAssociateRequest has been called from the higher layer.
Callback< void, MlmeBeaconNotifyIndicationParams > MlmeBeaconNotifyIndicationCallback
This callback is called after a Mlme has successfully received a beacon frame and wants to deliver it...
MlmeScanType
Table 30 of IEEE 802.15.4-2011.
MacStatus
The status of a confirm or an indication primitive as a result of a previous request.
Callback< void, MlmeCommStatusIndicationParams > MlmeCommStatusIndicationCallback
This callback is called by the MLME and issued to its next higher layer following a transmission inst...
Callback< void, McpsDataConfirmParams > McpsDataConfirmCallback
This callback is called after a McpsDataRequest has been called from the higher layer.
Callback< void, MlmeSyncLossIndicationParams > MlmeSyncLossIndicationCallback
This callback is called to indicate the loss of synchronization with a coordinator.
@ macCoordShortAddress
The 16-bit short address assigned to the coordinator through which the device is associated.
@ macPanId
The 16-bit identifier of the Personal Area Network (PAN).
@ pCurrentChannel
RF channel used for transmissions and receptions.
@ macBsn
The sequence number added to the transmitted beacon frame.
@ macShortAddress
The short address of the device (16 bit address).
@ macSuperframeOrder
The length of the active portion of the outgoing superframe, including the beacon frame.
@ macAutoRequest
Indication of whether a device automatically sends a data request command if its address is listed in...
@ macBeaconOrder
Specification of how often the coordinator transmits its beacon.
@ macAckWaitDuration
Maximum number of symbols to wait for an acknowledgment.
@ macRxOnWhenIdle
Indication of whether the MAC is enabled during idle periods.
@ macBeaconPayloadLength
The length in octets of the beacon payload.
@ macPromiscuousMode
Indication of whether the MAC sublayer is in a promiscuous mode.
@ macBeaconTxTime
The time that the device transmitted its last beacome frame, in symbol periods.
@ macMaxCSMABackoff
The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access f...
@ pCurrentPage
The current channel page.
@ macMinBE
The minimum value of the backoff exponent (BE) in the CSMA-CA algorithm.
@ macExtendedAddress
The extended address of the device (64 bit address).
@ macBattLifeExtPeriods
In BLE mode, the number of backoff periods during which the the receiver is enabled after the IFS fol...
@ macGTSPermit
True if the PAN coordinator is to accept GTS requests.
@ macBattLifeExt
Indication of whether BLE, through the reduction of coordinator receiver operation time during the CA...
@ macResponseWaitTime
The maximum time in multiples of aBaseSuperframeDuration, a device shall wait for a response command ...
@ macMaxFrameRetries
The maximum number of retries allowed after a transmission failure.
@ macAssociationPermit
Indication of whether a coordinator is allowing association.
@ macDSN
The sequence number added to the transmitted data or MAC command frame.
@ macCoordExtendedAddress
The 64-bit address of the coordinator through which the device is associated.
@ macTransactionPersistenceTime
The maximum time (in unit periods) that a transaction is stored by a coordinator and indicated in its...
@ macBeaconPayload
The contents of the beacon payload.
@ CHANNEL_ACCESS_FAILURE
CHANNEL_ACCESS_FAILURE.
Definition lr-wpan-mac.h:70
@ TRANSACTION_OVERFLOW
There is no capacity to store the transaction.
@ NO_BEACON
A scan operation failed to find any network beacons.
@ TX_ACTIVE
The transceiver was already enabled.
@ INVALID_GTS
Missing GTS transmit or undefined direction.
@ UNSUPPORTED_ATTRIBUTE
SET/GET request issued with a non supported ID.
@ NO_SHORT_ADDRESS
Failure due to unallocated 16-bit short address.
@ PAST_TIME
Rx enable request fail due to lack of time in superframe.
@ ACCESS_DENIED
PAN access denied.
@ BEACON_LOSS
The beacon was lost following a synchronization request.
@ PAN_ID_CONFLICT
PAN id conflict detected and informed to the coordinator.
@ DISABLE_TRX_FAILURE
The attempt to disable the transceier has failed.
@ LIMIT_REACHED
PAN descriptors stored reached max capacity.
@ TRACKING_OFF
This device is currently not tracking beacons.
@ READ_ONLY
SET/GET request issued for a read only attribute.
@ ON_TIME_TOO_LONG
RX enable request fail due to syms.
@ TRANSACTION_EXPIRED
The transaction expired and its information discarded.
@ SCAN_IN_PROGRESS
Scan failed because already performing another scan.
@ FRAME_TOO_LONG
Frame more than aMaxPHYPacketSize or too large for CAP or GTS.
@ OUT_OF_CAP
(Deprecated) See IEEE 802.15.4-2003
@ IMPROPER_KEY_TYPE
The key is not allowed to be used with that frame type.
@ DENIED
The GTS request has been denied by the PAN coordinator.
@ IMPROPER_SECURITY_LEVEL
Insufficient security level expected by the recipient.
@ INVALID_ADDRESS
Invalid source or destination address.
@ INVALID_HANDLE
When purging from TX queue handle was not found.
@ REALIGMENT
A coordinator realigment command has been received.
@ FULL_CAPACITY
PAN at capacity.
@ COUNTER_ERROR
The frame counter of the received frame is invalid.
@ UNSUPPORTED_LEGACY
Deprecated security used in IEEE 802.15.4-2003.
@ NO_ACK
No acknowledgment was received after macMaxFrameRetries.
@ SUPERFRAME_OVERLAP
Coordinator superframe and this device superframe tx overlap.
@ UNAVAILABLE_KEY
Unavailable key, unknown or blacklisted.
@ UNSUPPORTED_SECURITY
The security applied is not supported.
@ NO_DATA
No response data were available following a request.
@ INVALID_INDEX
A MAC PIB write failed because specified index is out of range.
@ INVALID_PARAMETER
Primitive parameter not supported or out of range.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
@ SUCCESS
IEEE802.15.4-2011 PHY PIB Attributes Table 52 in section 6.4.2.
Mac16Address macShortAddress
The 16 bit mac short address.
uint16_t macPanId
The identifier of the PAN.
uint8_t macBeaconPayloadLength
The length in octets of the beacon payload.
uint8_t pCurrentChannel
The current logical channel in used in the PHY.
Mac64Address macExtendedAddress
The EUI-64 bit address.
bool macPromiscuousMode
Indication of whether the mac is in promiscuous mode (Receive all mode).
bool macAssociationPermit
Indication of whether the coordinator is allowing association.
bool macRxOnWhenIdle
Indication of whether the MAC is enabled during idle periods.
std::vector< uint8_t > macBeaconPayload
The set with the contents of the beacon payload.
uint8_t pCurrentPage
The current logical page in use in the PHY.
MacStatus m_status
The status of the last MSDU transmission.
int8_t m_rssi
RSSI value measured after the preamble during the reception of the packet SFD.
uint8_t m_mpduLinkQuality
LQI value measured during reception of the MPDU.
uint16_t m_dstPanId
Destination PAN identifier.
uint8_t m_dsn
The DSN of the received data frame.
Mac16Address m_srcAddr
Source address.
Mac64Address m_dstExtAddr
Destination extended address.
Mac64Address m_srcExtAddr
Source extended address.
Mac16Address m_dstAddr
Destination address.
uint8_t m_dstAddrMode
Destination address mode.
uint16_t m_srcPanId
Source PAN identifier.
uint8_t m_srcAddrMode
Source address mode.
AddressMode m_dstAddrMode
Destination address mode.
Mac16Address m_dstAddr
Destination address.
Mac64Address m_dstExtAddr
Destination extended address.
uint16_t m_dstPanId
Destination PAN identifier.
AddressMode m_srcAddrMode
Source address mode.
uint8_t m_txOptions
Tx Options (bitfield).
MLME-ASSOCIATE.confirm params.
Mac16Address m_assocShortAddr
The short address used in the association request.
MacStatus m_status
The status of a MLME-associate.request.
MLME-ASSOCIATE.indication params.
uint8_t lqi
The link quality indicator of the received associate request command (Not officially supported in the...
Mac64Address m_extDevAddr
The extended address of the device requesting association.
uint8_t capabilityInfo
The operational capabilities of the device requesting association.
MLME-ASSOCIATE.request params.
Mac64Address m_coordExtAddr
The extended address of the coordinator with which to associate.
uint8_t m_coordAddrMode
The coordinator addressing mode for this primitive and subsequent MPDU.
uint8_t m_capabilityInfo
Specifies the operational capabilities of the associating device (bitmap).
Mac16Address m_coordShortAddr
The short address of the coordinator with which to associate.
uint8_t m_chNum
The channel number on which to attempt association.
uint32_t m_chPage
The channel page on which to attempt association.
uint16_t m_coordPanId
The identifier of the PAN with which to associate.
MLME-ASSOCIATE.response params.
Mac16Address m_assocShortAddr
The short address allocated by the coordinator on successful assoc.
MacStatus m_status
The status of the association attempt (As defined on Table 83 IEEE 802.15.4-2006).
Mac64Address m_extDevAddr
The extended address of the device requesting association.
MLME-BEACON-NOTIFY.indication params.
PanDescriptor m_panDescriptor
The PAN descriptor for the received beacon.
uint32_t m_sduLength
The number of octets contained in the beacon payload.
uint8_t m_bsn
The beacon sequence number.
Ptr< Packet > m_sdu
The set of octets comprising the beacon payload.
MLME-COMM-STATUS.indication params.
uint8_t m_dstAddrMode
The destination addressing mode for this primitive.
uint16_t m_panId
The PAN identifier of the device from which the frame was received or to which the frame was being se...
Mac64Address m_srcExtAddr
The extended address of the entity from which the frame causing the error originated.
MacStatus m_status
The communication status.
Mac16Address m_srcShortAddr
The short address of the entity from which the frame causing the error originated.
Mac16Address m_dstShortAddr
The short address of the device for which the frame was intended.
uint8_t m_srcAddrMode
The source addressing mode for this primitive.
Mac64Address m_dstExtAddr
The extended address of the device for which the frame was intended.
MLME-ORPHAN.indication params.
Mac64Address m_orphanAddr
The address of the orphaned device.
bool m_assocMember
T = allocated with this coord | F = otherwise.
Mac64Address m_orphanAddr
The address of the orphaned device.
Mac16Address m_shortAddr
The short address allocated.
MacStatus m_status
The confirmation status resulting from a MLME-poll.request.
uint16_t m_coorPanId
The PAN id of the coordinator to which the poll is intended.
Mac16Address m_coorShortAddr
Coordinator short address.
AddressMode m_coorAddrMode
The addressing mode of the coordinator to which the pool is intended.
Mac64Address m_coorExtAddr
Coordinator extended address.
std::vector< uint8_t > m_unscannedCh
A list of channels given in the request which were not scanned (Not valid for ED scans).
uint32_t m_chPage
The channel page on which the scan was performed.
std::vector< uint8_t > m_energyDetList
A list of energy measurements, one for each channel searched during ED scan (Not valid for Active,...
MacStatus m_status
The status of the scan request.
std::vector< PanDescriptor > m_panDescList
A list of PAN descriptor, one for each beacon found (Not valid for ED and Orphan scans).
uint8_t m_resultListSize
The number of elements returned in the appropriate result list.
uint8_t m_scanType
Indicates the type of scan performed (ED,ACTIVE,PASSIVE,ORPHAN).
MlmeScanType m_scanType
Indicates the type of scan performed as described in IEEE 802.15.4-2011 (5.1.2.1).
uint32_t m_scanChannels
The channel numbers to be scanned.
uint8_t m_scanDuration
The factor (0-14) used to calculate the length of time to spend scanning.
uint32_t m_chPage
The channel page on which to perform scan.
MacStatus m_status
The result of the request to write the PIB attribute.
MacStatus m_status
The status of a MLME-start.request.
bool m_battLifeExt
Flag indicating whether or not the Battery life extension (BLE) features are used.
uint8_t m_logCh
Logical channel on which to start using the new superframe configuration.
uint32_t m_logChPage
Logical channel page on which to start using the new superframe configuration.
bool m_coorRealgn
True if a realignment request command is to be transmitted prior changing the superframe.
uint8_t m_bcnOrd
Beacon Order, Used to calculate the beacon interval, a value of 15 indicates no periodic beacons will...
bool m_panCoor
On true this device will become coordinator.
uint8_t m_sfrmOrd
Superframe Order, indicates the length of the CAP in time slots.
uint16_t m_PanId
Pan Identifier used by the device.
uint32_t m_startTime
Time at which to begin transmitting beacons (Used by Coordinator not PAN Coordinators).
MLME-SYNC-LOSS.indication params.
uint16_t m_panId
The PAN identifier with which the device lost synchronization or to which it was realigned.
uint8_t m_logCh
The channel number on which the device lost synchronization or to which it was realigned.
MacStatus m_lossReason
The reason for the lost of synchronization.
uint8_t m_logCh
The channel number on which to attempt coordinator synchronization.
bool m_trackBcn
True if the mlme sync with the next beacon and attempts to track future beacons.
PAN Descriptor, Table 17 IEEE 802.15.4-2011.
uint16_t m_coorPanId
The PAN ID of the coordinator as specified in the received beacon frame.
uint8_t m_logCh
The current channel number occupied by the network.
Time m_timeStamp
Beacon frame reception time.
bool m_gtsPermit
TRUE if the beacon is from the PAN coordinator that is accepting GTS requests.
Mac16Address m_coorShortAddr
The coordinator short address as specified in the coordinator address mode.
uint16_t m_superframeSpec
The superframe specification as specified in the received beacon frame.
AddressMode m_coorAddrMode
The coordinator addressing mode corresponding to the received beacon frame.
uint8_t m_linkQuality
The LQI at which the network beacon was received.
uint8_t m_logChPage
The current channel page occupied by the network.
Mac64Address m_coorExtAddr
The coordinator extended address as specified in the coordinator address mode.