Microchip® Advanced Software Framework

ieee_const.h File Reference

This header holds all IEEE 802.15.4-2006 constants and attribute identifiers.

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

Macros

#define aBaseSlotDuration   (60)
 The number of symbols forming a superframe slot when the superframe order is equal to 0. More...
 
#define aBaseSuperframeDuration
 The number of symbols forming a superframe when the superframe order is equal to 0. More...
 
#define ACK_PAYLOAD_LEN   (0x03)
 Length (in octets) of ACK payload. More...
 
#define aGTSDescPersistenceTime   (4)
 The number of superframes in which a GTS descriptor exists in the beacon frame of a PAN coordinator. More...
 
#define aMaxBeaconOverhead   (75)
 The maximum number of octets added by the MAC sublayer to the payload of its beacon frame. More...
 
#define aMaxBeaconPayloadLength   (aMaxPHYPacketSize - aMaxBeaconOverhead)
 The maximum size, in octets, of a beacon payload. More...
 
#define aMaxLostBeacons   (4)
 The number of consecutive lost beacons that will cause the MAC sublayer of a receiving device to declare a loss of synchronization. More...
 
#define aMaxMACPayloadSize   (aMaxPHYPacketSize - aMinMPDUOverhead)
 The maximum number of octets that can be transmitted in the MAC Payload field. More...
 
#define aMaxMACSafePayloadSize
 The maximum number of octets that can be transmitted in the MAC Payload field of an unsecured MAC frame that will be guaranteed not to exceed aMaxPHYPacketSize. More...
 
#define aMaxMPDUUnsecuredOverhead   (25)
 The maximum number of octets added by the MAC sublayer to the PSDU without security. More...
 
#define aMaxPHYPacketSize   (127)
 Maximum size of PHY packet. More...
 
#define aMaxSIFSFrameSize   (18)
 The maximum size of an MPDU, in octets, that can be followed by a SIFS period. More...
 
#define aMinCAPLength   (440)
 The minimum number of symbols forming the CAP. More...
 
#define aMinMPDUOverhead   (9)
 The minimum number of octets added by the MAC sublayer to the PSDU. More...
 
#define aNumSuperframeSlots   (16)
 The number of slots contained in any superframe. More...
 
#define ASSOC_PERMIT_BIT_POS   (15)
 Association permit bit position. More...
 
#define ASSOCIATION_RESERVED   (3)
 Association status code value (see wpan_mlme_associate_resp()). More...
 
#define ASSOCIATION_SUCCESSFUL   (0)
 Association status code value (see wpan_mlme_associate_resp()). More...
 
#define aTurnaroundTime   (12)
 Maximum turnaround Time of the radio to switch from Rx to Tx or Tx to Rx in symbols. More...
 
#define aUnitBackoffPeriod   (20)
 The number of symbols forming the basic time period used by the CSMA-CA algorithm. More...
 
#define BATT_LIFE_EXT_BIT_POS   (12)
 Battery life extention bit position. More...
 
#define BROADCAST   (0xFFFF)
 Generic 16 bit broadcast address. More...
 
#define CLEAR_ADDR_64   (0ULL)
 Unused EUI-64 address. More...
 
#define CONV_DBM_TO_phyTransmitPower(dbm_value)
 Converts a dBm value to a phyTransmitPower value. More...
 
#define CONV_phyTransmitPower_TO_DBM(phyTransmitPower_value)
 Converts a phyTransmitPower value to a dBm value. More...
 
#define ED_VAL_LEN   (1)
 Length of the ED value parameter number field. More...
 
#define EXT_ADDR_LEN   (8)
 Length (in octets) of extended address. More...
 
#define FCF1_FV_2003   (0)
 The mask for a IEEE 802.15.4-2003 compatible frame in the frame version subfield fcf1. More...
 
#define FCF1_FV_2006   (1)
 The mask for a IEEE 802.15.4-2006 compatible frame in the frame version subfield fcf1. More...
 
#define FCF1_FV_2012   (2)
 The mask for a IEEE 802.15.4e-2012 compatible frame in the frame version subfield fcf1. More...
 
#define FCF1_FV_MASK   (3 << FCF1_FV_SHIFT)
 The mask for the frame version subfield fcf1. More...
 
#define FCF1_FV_SHIFT   (4)
 Shift value for the frame version subfield fcf1. More...
 
#define FCF_2_DEST_ADDR_OFFSET   (2)
 Offset of Destination Addressing Mode of octet two of MHR. More...
 
#define FCF_2_SOURCE_ADDR_OFFSET   (6)
 Offset of Source Addressing Mode of octet two of MHR. More...
 
#define FCF_ACK_REQUEST   (1 << 5)
 The mask for the ACK request bit of the FCF. More...
 
#define FCF_DEST_ADDR_OFFSET   (10)
 Defines the offset of the destination address. More...
 
#define FCF_FRAME_PENDING   (1 << 4)
 The mask for the frame pending bit of the FCF. More...
 
#define FCF_FRAME_VERSION_2003   (0 << 12)
 The mask for a IEEE 802.15.4-2003 compatible frame in the frame version subfield. More...
 
#define FCF_FRAME_VERSION_2006   (1 << 12)
 The mask for a IEEE 802.15.4-2006 compatible frame in the frame version subfield. More...
 
#define FCF_FRAME_VERSION_2012   (2 << 12)
 The mask for a IEEE 802.15.4e-2012 compatible frame in the frame version subfield. More...
 
#define FCF_FRAMETYPE_ACK   (0x02)
 Define the ACK frame type. More...
 
#define FCF_FRAMETYPE_BEACON   (0x00)
 Defines the beacon frame type. More...
 
#define FCF_FRAMETYPE_DATA   (0x01)
 Define the data frame type. More...
 
#define FCF_FRAMETYPE_LLDN   (0x04)
 Define the LLDN frame type. More...
 
#define FCF_FRAMETYPE_MAC_CMD   (0x03)
 Define the command frame type. More...
 
#define FCF_FRAMETYPE_MASK   (0x07)
 Defines a mask for the frame type. More...
 
#define FCF_FRAMETYPE_MP   (0x05)
 Define the multipurpose frame type. More...
 
#define FCF_GET_FRAMETYPE(x)   ((x) & FCF_FRAMETYPE_MASK)
 Macro to get the frame type. More...
 
#define FCF_LEN   (2)
 Length (in octets) of FCF. More...
 
#define FCF_LONG_ADDR   (0x03)
 Address Mode: LONG. More...
 
#define FCF_NO_ADDR   (0x00)
 Address Mode: NO ADDRESS. More...
 
#define FCF_PAN_ID_COMPRESSION   (1 << 6)
 The mask for the PAN ID compression bit of the FCF. More...
 
#define FCF_RESERVED_ADDR   (0x01)
 Address Mode: RESERVED. More...
 
#define FCF_SECURITY_ENABLED   (1 << 3)
 The mask for the security enable bit of the FCF. More...
 
#define FCF_SET_DEST_ADDR_MODE(x)
 Macro to set the destination address mode. More...
 
#define FCF_SET_FRAMETYPE(x)   (x)
 A macro to set the frame type. More...
 
#define FCF_SET_SOURCE_ADDR_MODE(x)
 Macro to set the source address mode. More...
 
#define FCF_SHORT_ADDR   (0x02)
 Address Mode: SHORT. More...
 
#define FCF_SOURCE_ADDR_OFFSET   (14)
 Defines the offset of the source address. More...
 
#define FCS_LEN   (2)
 Length (in octets) of FCS. More...
 
#define GTS_ALLOCATE   (1)
 
#define GTS_DEALLOCATE   (0)
 
#define GTS_RX_SLOT   (1)
 
#define GTS_SLOT_LENGTH_1   (0x01)
 
#define GTS_SLOT_LENGTH_10   (0x0A)
 
#define GTS_SLOT_LENGTH_11   (0x0B)
 
#define GTS_SLOT_LENGTH_12   (0x0C)
 
#define GTS_SLOT_LENGTH_13   (0x0D)
 
#define GTS_SLOT_LENGTH_14   (0x0E)
 
#define GTS_SLOT_LENGTH_15   (0x0F)
 
#define GTS_SLOT_LENGTH_2   (0x02)
 
#define GTS_SLOT_LENGTH_3   (0x03)
 
#define GTS_SLOT_LENGTH_4   (0x04)
 
#define GTS_SLOT_LENGTH_5   (0x05)
 
#define GTS_SLOT_LENGTH_6   (0x06)
 
#define GTS_SLOT_LENGTH_7   (0x07)
 
#define GTS_SLOT_LENGTH_8   (0x08)
 
#define GTS_SLOT_LENGTH_9   (0x09)
 
#define GTS_TX_SLOT   (0)
 
#define INVALID_SHORT_ADDRESS   (0xFFFF)
 Invalid short address. More...
 
#define INVERSE_CHANNEL_MASK   (~VALID_CHANNEL_MASK)
 Inverse channel masks for scanning. More...
 
#define LENGTH_FIELD_LEN   (1)
 Size of the length parameter. More...
 
#define LQI_LEN   (1)
 Length of the LQI number field. More...
 
#define MAC_NO_SHORT_ADDR_VALUE   (0xFFFE)
 MAC is using long address (by now). More...
 
#define macAckWaitDuration   (0x40)
 The maximum number of symbols to wait for an acknowledgment frame to arrive following a transmitted data frame. More...
 
#define macAssociatedPANCoord   (0x56)
 Indication of whether the device is associated to the PAN through the PAN coordinator. More...
 
#define macAssociatedPANCoord_def   (false)
 Default value for PIB macAssociatedPANCoord. More...
 
#define macAssociationPermit   (0x41)
 Indication of whether a coordinator is currently allowing association. More...
 
#define macAssociationPermit_def   (false)
 Default value for PIB macAssociationPermit. More...
 
#define macAutoRequest   (0x42)
 Indication of whether a device automatically sends a data request command if its address is listed in the beacon frame. More...
 
#define macAutoRequest_def   (true)
 Default value for PIB macAutoRequest. More...
 
#define macBattLifeExt   (0x43)
 Indication of whether battery life extension, by reduction of coordinator receiver operation time during the CAP, is enabled. More...
 
#define macBattLifeExt_def   (false)
 Default value for PIB macBattLifeExt. More...
 
#define macBattLifeExtPeriods   (0x44)
 The number of backoff periods during which the receiver is enabled following a beacon in battery life extension mode. More...
 
#define macBattLifeExtPeriods_def   (6)
 Default value for PIB macBattLifeExtPeriods. More...
 
#define macBeaconOrder   (0x47)
 Specification of how often the coordinator transmits a beacon. More...
 
#define macBeaconOrder_def   (15)
 Default value for PIB macBeaconOrder. More...
 
#define macBeaconPayload   (0x45)
 The contents of the beacon payload. More...
 
#define macBeaconPayloadLength   (0x46)
 The length, in octets, of the beacon payload. More...
 
#define macBeaconPayloadLength_def   (0)
 Default value for PIB macBeaconPayloadLength. More...
 
#define macBeaconTxTime   (0x48)
 The time that the device transmitted its last beacon frame, in symbol periods. More...
 
#define macBeaconTxTime_def   (0x000000)
 Default value for PIB macBeaconTxTime. More...
 
#define macBSN   (0x49)
 The sequence number added to the transmitted beacon frame. More...
 
#define macCoordExtendedAddress   (0x4A)
 The 64 bit address of the coordinator with which the device is associated. More...
 
#define macCoordShortAddress   (0x4B)
 The 16 bit short address assigned to the coordinator with which the device is associated. More...
 
#define macCoordShortAddress_def   (0xFFFF)
 Default value for PIB macCoordShortAddress. More...
 
#define macDSN   (0x4C)
 The sequence number added to the transmitted data or MAC command frame. More...
 
#define macGTSPermit   (0x4D)
 macGTSPermit is true if the PAN coordinator is to accept GTS requests, false otherwise. More...
 
#define macGTSPermit_def   (true)
 Default value for PIB macGTSPermit. More...
 
#define macIeeeAddress   (0xF0)
 Private MAC PIB attribute to allow setting the MAC address in test mode. More...
 
#define macMaxBE   (0x57)
 The maximum value of the backoff exponent, BE, in the CSMA-CA algorithm. More...
 
#define macMaxCSMABackoffs   (0x4E)
 The maximum number of backoffs the CSMA-CA algorithm will attempt before declaring a channel access failure. More...
 
#define macMaxCSMABackoffs_def   (4)
 Default value for PIB macMaxCSMABackoffs. More...
 
#define macMaxFrameRetries   (0x59)
 The maximum number of retries allowed after a transmission failure. More...
 
#define macMaxFrameTotalWaitTime   (0x58)
 The maximum number of CAP symbols in a beaconenabled PAN, or symbols in a nonbeacon-enabled PAN, to wait either for a frame intended as a response to a data request frame or for a broadcast frame following a beacon with the Frame Pending subfield set to one. More...
 
#define macMaxNumRxFramesDuringBackoff   (0x7F)
 Private MAC PIB attribute to control the CSMA algorithm. More...
 
#define macMinBE   (0x4F)
 The minimum value of the backoff exponent in the CSMA-CA algorithm. More...
 
#define macMinLIFSPeriod   (0x5E)
 The minimum number of symbols forming a LIFS period. More...
 
#define macMinLIFSPeriod_def   (40)
 Default value for PIB macMinLIFSPeriod. More...
 
#define macMinSIFSPeriod   (0x5F)
 The minimum number of symbols forming a SIFS period. More...
 
#define macMinSIFSPeriod_def   (12)
 Default value for PIB macMinSIFSPeriod. More...
 
#define macPANCoordExtendedAddress   (0x7D)
 The 64-bit address of the PAN coordinator. More...
 
#define macPANCoordShortAddress   (0x7E)
 The 16-bit short address assinged to the PAN coordinator. More...
 
#define macPANId   (0x50)
 The 16 bit identifier of the PAN on which the device is operating. More...
 
#define macPANId_def   (0xFFFF)
 Default value for PIB macPANId. More...
 
#define macPromiscuousMode   (0x51)
 This indicates whether the MAC sublayer is in a promiscuous (receive all) mode. More...
 
#define macResponseWaitTime   (0x5A)
 The maximum time, in multiples of aBaseSuperframeDuration, a device shall wait for a response command frame to be available following a request command frame. More...
 
#define macResponseWaitTime_def   (32 * aBaseSuperframeDuration)
 Default value for PIB macResponseWaitTime. More...
 
#define macRxOnWhenIdle   (0x52)
 This indicates whether the MAC sublayer is to enable its receiver during idle periods. More...
 
#define macRxOnWhenIdle_def   (false)
 Default value for PIB macRxOnWhenIdle. More...
 
#define macSecurityEnabled   (0x5D)
 Indication of whether the MAC sublayer has security enabled. More...
 
#define macSecurityEnabled_def   (false)
 Default value for PIB macSecurityEnabled. More...
 
#define macShortAddress   (0x53)
 The 16 bit address that the device uses to communicate in the PAN. More...
 
#define macShortAddress_def   (0xFFFF)
 Default value for PIB macShortAddress. More...
 
#define macSuperframeOrder   (0x54)
 This specifies the length of the active portion of the superframe, including the beacon frame. More...
 
#define macSuperframeOrder_def   (15)
 Default value for PIB macSuperframeOrder. More...
 
#define macSyncSymbolOffset   (0x5B)
 The offset, measured in symbols, between the symbol boundary at which the MLME captures the timestamp of each transmitted or received frame, and the onset of the first symbol past the SFD, namely, the first symbol of the Length field. More...
 
#define macTimestampSupported   (0x5C)
 Indication of whether the MAC sublayer supports the optional timestamping feature for incoming and outgoing data frames. More...
 
#define macTransactionPersistenceTime   (0x55)
 The maximum time (in superframe periods) that a transaction is stored by a coordinator and indicated in its beacon. More...
 
#define macTransactionPersistenceTime_def   (0x01F4)
 Default value for PIB macTransactionPersistenceTime. More...
 
#define MAX_KEY_ID_FIELD_LEN   (9)
 Maximum length of the key id field. More...
 
#define MAX_MGMT_FRAME_LENGTH   (30)
 Maximum size of the management frame(Association Response frame) More...
 
#define MIN_FRAME_LENGTH   (8)
 Minimum size of a valid frame other than an Ack frame. More...
 
#define MLME_SCAN_TYPE_ACTIVE   (0x01)
 Active scan (see wpan_mlme_scan_req()) More...
 
#define MLME_SCAN_TYPE_ED   (0x00)
 Energy scan (see wpan_mlme_scan_req()) More...
 
#define MLME_SCAN_TYPE_ORPHAN   (0x03)
 Orphan scan (see wpan_mlme_scan_req()) More...
 
#define MLME_SCAN_TYPE_PASSIVE   (0x02)
 Passive scan (see wpan_mlme_scan_req()) More...
 
#define NO_PIB_INDEX   (0)
 
#define NON_BEACON_NWK   (0x0F)
 BO value for nonbeacon-enabled network. More...
 
#define NUM_LONG_PEND_ADDR(x)   (((x) & 0x70) >> 4)
 Mask for the number of long addresses pending. More...
 
#define NUM_SHORT_PEND_ADDR(x)   ((x) & 0x07)
 Mask for the number of short addresses pending. More...
 
#define PAN_ACCESS_DENIED   (2)
 Association status code value (see wpan_mlme_associate_resp()). More...
 
#define PAN_AT_CAPACITY   (1)
 Association status code value (see wpan_mlme_associate_resp()). More...
 
#define PAN_COORD_BIT_POS   (14)
 PAN coordinator bit position. More...
 
#define PAN_ID_LEN   (2)
 Length (in octets) of PAN ID. More...
 
#define PL_POS_DST_ADDR_START   (6)
 Octet start position of Destination Address field within payload array of frame_info_t. More...
 
#define PL_POS_DST_PAN_ID_START   (4)
 Octet start position of Destination PAN-Id field within payload array of frame_info_t. More...
 
#define PL_POS_FCF_1   (1)
 Octet position of FCF octet one within payload array of frame_info_t. More...
 
#define PL_POS_FCF_2   (2)
 Octet position of FCF octet two within payload array of frame_info_t. More...
 
#define PL_POS_SEQ_NUM   (3)
 Octet position of Sequence Number octet within payload array of frame_info_t. More...
 
#define SEQ_NUM_LEN   (1)
 Length of the sequence number field. More...
 
#define SHORT_ADDR_LEN   (2)
 Length (in octets) of short address. More...
 
#define WPAN_TXOPT_ACK   (0x01)
 Value for TxOptions parameter in wpan_mcps_data_req(). More...
 
#define WPAN_TXOPT_GTS   (0x02)
 Value for TxOptions parameter in wpan_mcps_data_req(). More...
 
#define WPAN_TXOPT_GTS_ACK   (0x03)
 Value for TxOptions parameter in wpan_mcps_data_req(). More...
 
#define WPAN_TXOPT_INDIRECT   (0x04)
 Value for TxOptions parameter in wpan_mcps_data_req(). More...
 
#define WPAN_TXOPT_INDIRECT_ACK   (0x05)
 Value for TxOptions parameter in wpan_mcps_data_req(). More...
 
#define WPAN_TXOPT_OFF   (0x00)
 Value for TxOptions parameter in wpan_mcps_data_req(). More...
 
#define phyCurrentChannel   (0x00)
 The RF channel to use for all following transmissions and receptions. More...
 
#define phyChannelsSupported   (0x01)
 The 5 most significant bits (MSBs) (b27, ..., b31) of phyChannelsSupported shall be reserved and set to 0, and the 27 LSBs (b0, b1, ..., b26) shall indicate the status (1 = available, 0 = unavailable) for each of the 27 valid channels (bk shall indicate the status of channel k). More...
 
#define phyTransmitPower   (0x02)
 The 2 MSBs represent the tolerance on the transmit power: 00 = 1 dB 01 = 3 dB 10 = 6 dB The 6 LSBs represent a signed integer in twos-complement format, corresponding to the nominal transmit power of the device in decibels relative to 1 mW. More...
 
#define phyCCAMode   (0x03)
 The CCA mode. More...
 
#define phyCurrentPage   (0x04)
 This is the current PHY channel page. More...
 
#define phyMaxFrameDuration   (0x05)
 The maximum number of symbols in a frame: = phySHRDuration + ceiling([aMaxPHYPacketSize + 1] x phySymbolsPerOctet) More...
 
#define phySHRDuration   (0x06)
 The duration of the synchronization header (SHR) in symbols for the current PHY. More...
 
#define phySymbolsPerOctet   (0x07)
 The number of symbols per octet for the current PHY. More...
 
#define PHY_OVERHEAD   (5)
 Number of octets added by the PHY: 4 sync octets + SFD octet. More...
 

Typedefs

typedef enum cca_mode_tag cca_mode_t
 CCA mode enumeration. More...
 
typedef enum ch_pg_tag ch_pg_t
 
typedef enum trx_cca_mode_tag trx_cca_mode_t
 CCA Modes of the transceiver. More...
 

Enumerations

enum  cca_mode_tag {
  CCA_MODE_0_CS_OR_ED = 0,
  CCA_MODE_1_ED = 1,
  CCA_MODE_2_CS,
  CCA_MODE_3_CS_ED,
  CCA_MODE_4_ALOHA
}
 CCA mode enumeration. More...
 
enum  ch_pg_tag {
  CH_PG_2003 = 0,
  CH_PG_2006 = 2,
  CH_PG_CHINA = 5,
  CH_PG_JAPAN = 6,
  CH_PG_MSK = 7,
  CH_PG_LRP_UWB = 8,
  CH_PG_SUN = 9,
  CH_PG_GENERIC_PHY = 10,
  CH_PG_16 = 16,
  CH_PG_18 = 18,
  CH_PG_INVALID = 0xFF
}
 
enum  trx_cca_mode_tag {
  TRX_CCA_MODE0 = 0,
  TRX_CCA_MODE1 = 1,
  TRX_CCA_MODE2 = 2,
  TRX_CCA_MODE3 = 3
}
 
#define PHY_SUCCESS_DATA_PENDING   (0x10)
 PHY_SUCCESS in phyAutoCSMACA when received ACK frame had the pending bit set. More...
 
#define ED_SAMPLE_DURATION_SYM   (8)
 ED scan/sampling duration. More...
 
enum  phy_enum_tag {
  PHY_BUSY = (0x00),
  PHY_BUSY_RX = (0x01),
  PHY_BUSY_TX = (0x02),
  PHY_FORCE_TRX_OFF = (0x03),
  PHY_IDLE = (0x04),
  PHY_INVALID_PARAMETER = (0x05),
  PHY_RX_ON = (0x06),
  PHY_SUCCESS = (0x07),
  PHY_TRX_OFF = (0x08),
  PHY_TX_ON = (0x09),
  PHY_UNSUPPORTED_ATTRIBUTE = (0x0A),
  PHY_READ_ONLY = (0x0B)
}
 
typedef enum phy_enum_tag phy_enum_t