This module describes all MCL Request API's.
Functions | |
void | mcps_data_request (uint8_t *msg) |
Builds the data frame for transmission. More... | |
void | mlme_reset_request (uint8_t *m) |
Resets the MAC layer. More... | |
void | mlme_rx_enable_request (uint8_t *m) |
Implement the MLME-RX-ENABLE.request primitive. More... | |
void | mlme_sync_request (uint8_t *m) |
Implements the MLME-SYNC request. More... | |
void mcps_data_request | ( | uint8_t * | msg | ) |
Builds the data frame for transmission.
This function builds the data frame for transmission. The NWK layer has supplied the parameters. The frame_info_t data type is constructed and filled in. Also the FCF is constructed based on the parameters passed.
msg | Pointer to the MCPS-DATA.request parameter |
References ADDR_COPY_DST_SRC_16, BMM_BUFFER_POINTER, BROADCAST, frame_info_tag::buffer_header, build_data_frame(), CSMA_SLOTTED, CSMA_UNSLOTTED, mcps_data_req_tag::DstAddr, mcps_data_req_tag::DstAddrMode, FAILURE, FCF_NO_ADDR, FCF_RESERVED_ADDR, FCF_SECURITY_ENABLED, FCF_SHORT_ADDR, frame_info_tag::indirect_in_transit, MAC_ASSOCIATED, MAC_CHANNEL_ACCESS_FAILURE, MAC_COORDINATOR, mac_pib_tag::mac_CoordShortAddress, mac_gen_mcps_data_conf(), MAC_INVALID_ADDRESS, MAC_INVALID_PARAMETER, MAC_PAN_COORD_STARTED, mac_pib, MAC_POLL_IDLE, mac_poll_state, MAC_SCAN_IDLE, mac_scan_state, mac_sleep_trans(), mac_state, MAC_SUCCESS, MAC_TRANSACTION_OVERFLOW, mac_trx_wakeup(), MAKE_MAC_BUSY, MCPS_MESSAGE, frame_info_tag::mpdu, mcps_data_req_tag::msduHandle, frame_info_tag::msduHandle, frame_info_tag::msg_type, NON_BEACON_NWK, frame_info_tag::persistence_time, qmm_queue_append(), QUEUE_FULL, mcps_data_req_tag::SrcAddrMode, tal_pib, tal_tx_frame(), mcps_data_req_tag::TxOptions, WPAN_TXOPT_ACK, WPAN_TXOPT_GTS, and WPAN_TXOPT_INDIRECT.
void mlme_reset_request | ( | uint8_t * | m | ) |
Resets the MAC layer.
The MLME-RESET.request primitive allows the next higher layer to request that the MLME performs a reset operation.
m | Pointer to the MLME_RESET.request given by the NHLE |
References BMM_BUFFER_POINTER, flush_queues(), mac_reset(), mac_sleep_trans(), mac_trx_wakeup(), send_reset_conf(), and mlme_reset_req_tag::SetDefaultPIB.
void mlme_rx_enable_request | ( | uint8_t * | m | ) |
Implement the MLME-RX-ENABLE.request primitive.
The MLME-RX-ENABLE.request primitive is generated by the next higher layer and issued to MAC to enable the receiver for a fixed duration, at a time relative to the start of the current or next superframe on a beacon-enabled PAN or immediately on a nonbeacon-enabled PAN. The receiver is enabled exactly once per primitive request.
m | Pointer to the MLME-RX-ENABLE.request message |
References BMM_BUFFER_POINTER, mlme_rx_enable_req_tag::DeferPermit, FUNC_PTR, gen_rx_enable_conf(), handle_rx_on(), MAC_INVALID_PARAMETER, MAC_PAST_TIME, MAC_POLL_IDLE, mac_poll_state, MAC_SCAN_IDLE, mac_scan_state, MAC_SUCCESS, mac_t_rx_off_cb(), MAC_TX_ACTIVE, MIN_TIMEOUT, NON_BEACON_NWK, pal_get_current_time(), pal_timer_start(), pal_timer_stop(), mlme_rx_enable_req_tag::RxOnDuration, mlme_rx_enable_req_tag::RxOnTime, T_Rx_Enable, tal_add_time_symbols(), TAL_CONVERT_SYMBOLS_TO_US, TAL_CONVERT_US_TO_SYMBOLS, TAL_GET_BEACON_INTERVAL_TIME, tal_pib, tal_sub_time_symbols(), and TIMEOUT_ABSOLUTE.
void mlme_sync_request | ( | uint8_t * | m | ) |
Implements the MLME-SYNC request.
The MLME-SYNC.request primitive requests to synchronize with the coordinator by acquiring and, if specified, tracking its beacons. The MLME-SYNC.request primitive is generated by the next higher layer of a device on a beacon-enabled PAN and issued to its MLME to synchronize with the coordinator.
Enable receiver and search for beacons for at most an interval of [aBaseSuperframeDuration * ((2 ^ (n))+ 1)] symbols where n is the value of macBeaconOrder. If a beacon frame containing the current PAN identifier of the device is not received, the MLME shall repeat this search. Once the number of missed beacons reaches aMaxLostBeacons, the MLME shall notify the next higher layer by issuing the MLME-SYNC-LOSS.indication primitive with a loss reason of BEACON_LOSS.
m | Pointer to the MLME sync request parameters. |