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_set_request (uint8_t *m) |
Handles an MLME-SET.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, 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::gts_queue, handle_gts_data_req(), 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, NULL, frame_info_tag::persistence_time, QUEUE_FULL, mcps_data_req_tag::SrcAddrMode, tal_pib, tal_tx_frame(), transmit_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 flush_queues(), mac_reset(), mac_sleep_trans(), mac_trx_wakeup(), send_reset_conf(), and mlme_reset_req_tag::SetDefaultPIB.
void mlme_set_request | ( | uint8_t * | m | ) |
Handles an MLME-SET.request primitive.
This function handles the MLME-SET.request. The MLME-SET.request primitive attempts to write the given value to the indicated PIB attribute.
m | Pointer to the request structure |
References mlme_set_conf_tag::cmdcode, mac_nhle_q, MAC_SUCCESS, mlme_set(), MLME_SET_CONFIRM, mlme_set_req_tag::PIBAttribute, mlme_set_conf_tag::PIBAttribute, mlme_set_req_tag::PIBAttributeValue, and mlme_set_conf_tag::status.
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. |