All Definitions used by the MAC Layer is described here.
Modules | |
MAC Data Structures | |
This module defines all the MAC Data Structures. | |
Macros | |
#define | BO_USED_FOR_MAC_PERS_TIME (0) |
#define | DEV_RX_SLOT_INDEX (GTS_RX_SLOT) |
#define | DEV_TX_SLOT_INDEX (GTS_TX_SLOT) |
#define | FINAL_CAP_SLOT_DEFAULT (0x0F) |
#define | GTS_EXPIRY_BO_0_TO_8 ((1 << ((8 - tal_pib.BeaconOrder) + 1)) + 1) |
#define | GTS_EXPIRY_BO_9_TO_14 (2 + 1) |
#define | GTS_REQ_PAYLOAD_LEN (2) |
#define | LAST_MESSAGE MLME_POLL_CONFIRM |
Bump this when extending the list! More... | |
#define | MAC (4) |
#define | MAC_NHLE_QUEUE_CAPACITY 255 |
Capacity of queue between MAC and Next Higher Layer. More... | |
#define | macAckWaitDuration_def (54) |
Default value for MIB macAckWaitDuration. More... | |
#define | macMaxFrameTotalWaitTime_def (1986) |
#define | MAX_GTS_ON_DEV (4) |
#define | MAX_GTS_ON_PANC (7) |
#define | MCPS_DATA_CON_LEN (7) |
The following defines describe the minimum length of a primitive message. More... | |
#define | MCPS_DATA_IND_LEN (31) |
#define | MCPS_PURGE_CONF_LEN (3) |
#define | MLME_ASSOCIATE_CONF_LEN (4) |
#define | MLME_ASSOCIATE_IND_LEN (10) |
#define | MLME_BEACON_NOTIFY_IND_LEN (2) |
#define | MLME_COMM_STATUS_IND_LEN (22) |
#define | MLME_DISASSOCIATE_CONF_LEN (13) |
#define | MLME_DISASSOCIATE_IND_LEN (10) |
#define | MLME_GET_CONF_LEN (4) |
#define | MLME_GTS_CONF_LEN (3) |
#define | MLME_GTS_IND_LEN (4) |
#define | MLME_ORPHAN_IND_LEN (9) |
#define | MLME_POLL_CONF_LEN (2) |
#define | MLME_RESET_CONF_LEN (2) |
#define | MLME_RX_ENABLE_CONF_LEN (2) |
#define | MLME_SCAN_CONF_LEN (10) |
#define | MLME_SET_CONF_LEN (3) |
#define | MLME_START_CONF_LEN (2) |
#define | MLME_SYNC_LOSS_IND_LEN (6) |
#define | NUMBER_OF_MAC_BEACON_SUPPORT_TIMERS (4) |
#define | NUMBER_OF_MAC_INDIRECT_DATA_SUPPORT_TIMERS (0) |
#define | NUMBER_OF_MAC_RX_ENABLE_SUPPORT_TIMERS (0) |
#define | NUMBER_OF_MAC_SCAN_SUPPORT_TIMERS (0) |
#define | NUMBER_OF_MAC_TIMERS |
#define | PAN_RX_SLOT_INDEX ((PANC_SLOT << 1) | GTS_RX_SLOT) |
#define | PAN_TX_SLOT_INDEX ((PANC_SLOT << 1) | GTS_TX_SLOT) |
#define | PANC_SLOT (1) |
#define | WPAN_ADDRMODE_LONG (0x03) |
Value for the address mode, where a 64 bit long address is given. More... | |
#define | WPAN_ADDRMODE_NONE (0x00) |
Value for the address mode, where no address is given. More... | |
#define | WPAN_ADDRMODE_SHORT (0x02) |
Value for the address mode, where a 16 bit short address is given. More... | |
#define | WPAN_CAP_ALLOCADDRESS (0x80) |
Flag value for capability information field (see wpan_mlme_associate_req()). More... | |
#define | WPAN_CAP_ALTPANCOORD (0x01) |
Flag value for capability information field (see wpan_mlme_associate_req()). More... | |
#define | WPAN_CAP_FFD (0x02) |
Flag value for capability information field (see wpan_mlme_associate_req()). More... | |
#define | WPAN_CAP_PWRSOURCE (0x04) |
Flag value for capability information field (see wpan_mlme_associate_req()). More... | |
#define | WPAN_CAP_RXONWHENIDLE (0x08) |
Flag value for capability information field (see wpan_mlme_associate_req()). More... | |
#define | WPAN_DESCRIPTOR_LEN (21) |
#define | WPAN_DISASSOC_BYCHILD (0x02) |
Symbolic constant for disassociate reason - initiated by child (see wpan_mlme_disassociate_req()) More... | |
#define | WPAN_DISASSOC_BYPARENT (0x01) |
Symbolic constant for disassociate reason - initiated by parent (see wpan_mlme_disassociate_req()) More... | |
#define | WPAN_NUM_EXTENDED_ADDR_PENDING(x) (((x) >> 4) & 0x7) |
Macro to extract size of extended address list in PAN descriptor. More... | |
#define | WPAN_NUM_SHORT_ADDR_PENDING(x) ((x) & 0x7) |
Marco to extract size of short address list in PAN descriptor. More... | |
Typedefs | |
typedef void(* | handler_t )(uint8_t *) |
typedef enum mac_poll_state_tag | mac_poll_state_t |
MAC poll states. More... | |
typedef enum mac_radio_sleep_state_tag | mac_radio_sleep_state_t |
MAC sleep state type. More... | |
typedef enum mac_scan_state_tag | mac_scan_state_t |
Device or coordinator scan states. More... | |
typedef __PACK__DATA__ enum mac_state_tag | mac_state_t |
MAC state type. More... | |
typedef enum mac_superframe_state_tag | mac_superframe_state_t |
MAC state type. More... | |
typedef enum mac_sync_state_tag | mac_sync_state_t |
Device or coordinator sync states. More... | |
Functions | |
retval_t | mac_timers_init (void) |
retval_t | mac_timers_stop (void) |
bool | wpan_mcps_data_req (uint8_t SrcAddrMode, wpan_addr_spec_t *DstAddrSpec, uint8_t msduLength, uint8_t *msdu, uint8_t msduHandle, uint8_t TxOptions) |
Initiate MCPS-DATA.request service and have it placed in the MCPS-SAP queue. More... | |
bool | wpan_mlme_gts_req (uint16_t DevShortAddr, gts_char_t GtsChar) |
Variables | |
enum msg_code | SHORTENUM |
uint8_t | T_Beacon_Tracking_Period |
uint8_t | T_CAP |
uint8_t | T_Missed_Beacon |
uint8_t | T_Superframe |
#define BO_USED_FOR_MAC_PERS_TIME (0) |
Referenced by process_data_ind_not_transient().
#define DEV_RX_SLOT_INDEX (GTS_RX_SLOT) |
#define DEV_TX_SLOT_INDEX (GTS_TX_SLOT) |
Referenced by handle_gts_data_req(), mac_parse_bcn_gts_info(), and mac_t_gts_cb().
#define FINAL_CAP_SLOT_DEFAULT (0x0F) |
Referenced by mac_gts_deallocate(), mac_t_gts_cb(), process_data_ind_not_transient(), and reset_globals().
#define GTS_EXPIRY_BO_0_TO_8 ((1 << ((8 - tal_pib.BeaconOrder) + 1)) + 1) |
Referenced by mac_gts_allocate(), and reset_gts_expiry().
#define GTS_EXPIRY_BO_9_TO_14 (2 + 1) |
Referenced by mac_gts_allocate(), and reset_gts_expiry().
#define GTS_REQ_PAYLOAD_LEN (2) |
Referenced by mlme_gts_request().
#define LAST_MESSAGE MLME_POLL_CONFIRM |
Bump this when extending the list!
Referenced by dispatch_event().
#define MAC (4) |
#define MAC_NHLE_QUEUE_CAPACITY 255 |
Capacity of queue between MAC and Next Higher Layer.
Referenced by wpan_init().
#define macAckWaitDuration_def (54) |
Default value for MIB macAckWaitDuration.
#define macMaxFrameTotalWaitTime_def (1986) |
Referenced by do_init_pib().
#define MAX_GTS_ON_DEV (4) |
Referenced by handle_gts_sync_loss(), and reset_gts_globals().
#define MAX_GTS_ON_PANC (7) |
Referenced by flush_gts_queues(), init_gts_queues(), mac_add_gts_info(), mac_gts_allocate(), mac_gts_deallocate(), and reset_gts_globals().
#define MCPS_DATA_CON_LEN (7) |
The following defines describe the minimum length of a primitive message.
Referenced by usr_mcps_data_conf().
#define MCPS_DATA_IND_LEN (31) |
Referenced by usr_mcps_data_ind().
#define MCPS_PURGE_CONF_LEN (3) |
#define MLME_ASSOCIATE_CONF_LEN (4) |
#define MLME_ASSOCIATE_IND_LEN (10) |
#define MLME_BEACON_NOTIFY_IND_LEN (2) |
#define MLME_COMM_STATUS_IND_LEN (22) |
#define MLME_DISASSOCIATE_CONF_LEN (13) |
#define MLME_DISASSOCIATE_IND_LEN (10) |
#define MLME_GET_CONF_LEN (4) |
#define MLME_GTS_CONF_LEN (3) |
#define MLME_GTS_IND_LEN (4) |
#define MLME_ORPHAN_IND_LEN (9) |
#define MLME_POLL_CONF_LEN (2) |
#define MLME_RESET_CONF_LEN (2) |
Referenced by usr_mlme_reset_conf().
#define MLME_RX_ENABLE_CONF_LEN (2) |
#define MLME_SCAN_CONF_LEN (10) |
#define MLME_SET_CONF_LEN (3) |
Referenced by usr_mlme_set_conf().
#define MLME_START_CONF_LEN (2) |
#define MLME_SYNC_LOSS_IND_LEN (6) |
Referenced by usr_mlme_sync_loss_ind().
#define NUMBER_OF_MAC_BEACON_SUPPORT_TIMERS (4) |
#define NUMBER_OF_MAC_INDIRECT_DATA_SUPPORT_TIMERS (0) |
#define NUMBER_OF_MAC_RX_ENABLE_SUPPORT_TIMERS (0) |
#define NUMBER_OF_MAC_SCAN_SUPPORT_TIMERS (0) |
#define NUMBER_OF_MAC_TIMERS |
#define PAN_RX_SLOT_INDEX ((PANC_SLOT << 1) | GTS_RX_SLOT) |
#define PAN_TX_SLOT_INDEX ((PANC_SLOT << 1) | GTS_TX_SLOT) |
#define PANC_SLOT (1) |
#define WPAN_ADDRMODE_LONG (0x03) |
Value for the address mode, where a 64 bit long address is given.
(see wpan_addr_spec_t::AddrMode)
Referenced by wpan_mcps_data_req().
#define WPAN_ADDRMODE_NONE (0x00) |
Value for the address mode, where no address is given.
#define WPAN_ADDRMODE_SHORT (0x02) |
Value for the address mode, where a 16 bit short address is given.
(see wpan_addr_spec_t::AddrMode)
Referenced by wpan_mcps_data_req().
#define WPAN_CAP_ALLOCADDRESS (0x80) |
Flag value for capability information field (see wpan_mlme_associate_req()).
The allocate address subfield shall be set if the device wishes the coordinator to allocate a short address as a result of the association procedure. If this subfield is set to 0, the special short address of 0xfffe shall be allocated to the device and returned through the association response command. In this case, the device shall communicate on the PAN using only its 64 bit extended address.
#define WPAN_CAP_ALTPANCOORD (0x01) |
Flag value for capability information field (see wpan_mlme_associate_req()).
The alternate PAN coordinator subfield shall be set if the device is capable of becoming a PAN coordinator. Otherwise, the alternate PAN coordinator subfield shall be set to 0.
#define WPAN_CAP_FFD (0x02) |
Flag value for capability information field (see wpan_mlme_associate_req()).
The device type subfield shall be set if the device is an FFD. Otherwise, the device type subfield shall be set to 0 to indicate an RFD.
#define WPAN_CAP_PWRSOURCE (0x04) |
Flag value for capability information field (see wpan_mlme_associate_req()).
The power source subfield shall be set if the device is receiving power from the alternating current mains. Otherwise, the power source subfield shall be set to 0.
#define WPAN_CAP_RXONWHENIDLE (0x08) |
Flag value for capability information field (see wpan_mlme_associate_req()).
The receiver on when idle subfield shall be set if the device does not disable its receiver to conserve power during idle periods. Otherwise, the receiver on when idle subfield shall be set to 0.
#define WPAN_DESCRIPTOR_LEN (21) |
#define WPAN_DISASSOC_BYCHILD (0x02) |
Symbolic constant for disassociate reason - initiated by child (see wpan_mlme_disassociate_req())
#define WPAN_DISASSOC_BYPARENT (0x01) |
Symbolic constant for disassociate reason - initiated by parent (see wpan_mlme_disassociate_req())
#define WPAN_NUM_EXTENDED_ADDR_PENDING | ( | x | ) | (((x) >> 4) & 0x7) |
Macro to extract size of extended address list in PAN descriptor.
#define WPAN_NUM_SHORT_ADDR_PENDING | ( | x | ) | ((x) & 0x7) |
Marco to extract size of short address list in PAN descriptor.
typedef void(* handler_t)(uint8_t *) |
typedef enum mac_poll_state_tag mac_poll_state_t |
MAC poll states.
These states describe the current status of the MAC for polling for devices or coordinators, not for PAN coordinator.
typedef enum mac_radio_sleep_state_tag mac_radio_sleep_state_t |
MAC sleep state type.
typedef enum mac_scan_state_tag mac_scan_state_t |
Device or coordinator scan states.
typedef __PACK__DATA__ enum mac_state_tag mac_state_t |
MAC state type.
typedef enum mac_superframe_state_tag mac_superframe_state_t |
MAC state type.
typedef enum mac_sync_state_tag mac_sync_state_t |
Device or coordinator sync states.
enum mac_poll_state_tag |
MAC poll states.
These states describe the current status of the MAC for polling for devices or coordinators, not for PAN coordinator.
enum mac_scan_state_tag |
enum mac_state_tag |
MAC state type.
enum mac_sync_state_tag |
Device or coordinator sync states.
enum msg_code |
This type contains the service primitives of the PHY-, MAC- and Network-layer as well the command-interface primitives.
retval_t mac_timers_init | ( | void | ) |
References FAILURE, MAC_SUCCESS, pal_timer_get_id(), T_Beacon_Tracking_Period, T_CAP, T_Missed_Beacon, and T_Superframe.
Referenced by mac_init().
retval_t mac_timers_stop | ( | void | ) |
References MAC_SUCCESS, pal_timer_stop(), T_Beacon_Tracking_Period, T_CAP, T_Missed_Beacon, and T_Superframe.
Referenced by mac_soft_reset().
bool wpan_mcps_data_req | ( | uint8_t | SrcAddrMode, |
wpan_addr_spec_t * | DstAddrSpec, | ||
uint8_t | msduLength, | ||
uint8_t * | msdu, | ||
uint8_t | msduHandle, | ||
uint8_t | TxOptions | ||
) |
Initiate MCPS-DATA.request service and have it placed in the MCPS-SAP queue.
SrcAddrMode | Address Mode of the source address. |
DstAddrSpec | Pointer to wpan_addr_spec_t structure for destination. |
msduHandle | Handle (identification) of the MSDU. |
TxOptions | Bitmap for transmission options. Valid values: |
msdu | Pointer to the data to be transmitted. |
msduLength | Length of the data to be transmitted. |
SecurityLevel | Used security level; this parameter is only available if MAC security is enabled via MAC_SECURITY_ZIP |
KeyIdMode | Used mode to identify the key; this parameter is only available if MAC security is enabled via MAC_SECURITY_ZIP |
KeyIndex | Used index of the key; this parameter is only available if MAC security is enabled via MAC_SECURITY_ZIP |
References wpan_addr_spec_tag::Addr, ADDR_COPY_DST_SRC_64, wpan_addr_spec_tag::AddrMode, aMaxMACPayloadSize, mcps_data_req_tag::cmdcode, CPU_ENDIAN_TO_LE16, mcps_data_req_tag::DstAddr, mcps_data_req_tag::DstAddrMode, mcps_data_req_tag::DstPANId, FCS_LEN, address_field_t::long_address, MAC_SUCCESS, MCPS_DATA_REQUEST, mcps_data_req_tag::msduHandle, mcps_data_req_tag::msduLength, nhle_mac_q, NULL, wpan_addr_spec_tag::PANId, mcps_data_req_tag::SrcAddrMode, mcps_data_req_tag::TxOptions, WPAN_ADDRMODE_LONG, and WPAN_ADDRMODE_SHORT.
Referenced by handle_incoming_msg().
bool wpan_mlme_gts_req | ( | uint16_t | DevShortAddr, |
gts_char_t | GtsChar | ||
) |
Referenced by handle_incoming_msg().
uint8_t T_Beacon_Tracking_Period |
Referenced by mac_ready_to_sleep(), mac_sleep_trans(), mac_timers_init(), mac_timers_stop(), and process_data_ind_not_transient().
uint8_t T_CAP |
Referenced by handle_gts_data_req(), mac_t_gts_cb(), mac_timers_init(), mac_timers_stop(), and process_data_ind_not_transient().
uint8_t T_Missed_Beacon |
Referenced by mac_timers_init(), and mac_timers_stop().
uint8_t T_Superframe |
Referenced by mac_timers_init(), mac_timers_stop(), and process_data_ind_not_transient().