Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mac_mcps.h
00001 /* 00002 * Copyright (c) 2016-2017, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 /** \file mac_mcps.h 00019 * \brief MAC Common Part Sublayer API 00020 */ 00021 00022 #ifndef MAC_MCPS_H 00023 #define MAC_MCPS_H 00024 00025 #include <inttypes.h> 00026 #include "mac_common_defines.h" 00027 00028 /** 00029 * @brief struct mcps_data_req_t Data request structure 00030 * 00031 * See IEEE standard 802.15.4-2006 (table 41) for more details 00032 */ 00033 typedef struct mcps_data_req_s { 00034 unsigned SrcAddrMode:2; /**< Source address mode */ 00035 unsigned DstAddrMode:2; /**< Destination address mode */ 00036 uint16_t DstPANId; /**< Destination PAN ID */ 00037 uint8_t DstAddr[8]; /**< Destination address */ 00038 uint16_t msduLength; /**< Service data unit length */ 00039 uint8_t *msdu; /**< Service data unit */ 00040 uint8_t msduHandle; /**< Handle associated with MSDU */ 00041 bool TxAckReq: 1; /**< Specifies whether ACK is needed or not */ 00042 bool InDirectTx:1; /**< Specifies whether indirect or direct transmission is used */ 00043 bool PendingBit: 1; /**< Specifies whether more fragments are to be sent or not */ 00044 mlme_security_t Key; /**< Security key */ 00045 } mcps_data_req_t; 00046 00047 /** 00048 * @brief struct mcps_data_conf_t Data confirm structure 00049 * 00050 * See IEEE standard 802.15.4-2006 (table 42) for more details 00051 */ 00052 typedef struct mcps_data_conf_s { 00053 uint8_t msduHandle; /**< Handle associated with MSDU */ 00054 uint8_t status; /**< Status of the last MSDU transmission */ 00055 uint32_t timestamp; /**< Time, in symbols, at which the data were transmitted */ 00056 //Non-standard extension 00057 uint8_t cca_retries; /**< Number of CCA retries used during sending */ 00058 uint8_t tx_retries; /**< Number of retries done during sending, 0 means no retries */ 00059 } mcps_data_conf_t; 00060 00061 /** 00062 * @brief struct mcps_data_ind_t Data indication structure 00063 * 00064 * See IEEE standard 802.15.4-2006 (table 43) for more details 00065 */ 00066 typedef struct mcps_data_ind_s { 00067 unsigned SrcAddrMode:2; /**< 0x00 = no address 0x01 = reserved 0x02 = 16-bit short address 0x03 = 64-bit extended address */ 00068 uint16_t SrcPANId; /**< Source PAN ID */ 00069 uint8_t SrcAddr[8]; /**< Source address */ 00070 unsigned DstAddrMode:2; /**< Destination address mode */ 00071 uint16_t DstPANId; /**< Destination PAN ID */ 00072 uint8_t DstAddr[8]; /**< Destination address */ 00073 uint8_t mpduLinkQuality; /**< LQI value measured during reception of the MPDU */ 00074 int8_t signal_dbm; /**< This extension for normal IEEE 802.15.4 Data indication */ 00075 uint32_t timestamp; /**< The time, in symbols, at which the data were received */ 00076 uint8_t DSN; /**< Data sequence number */ 00077 mlme_security_t Key; /**< Security key */ 00078 uint16_t msduLength; /**< Data unit length */ 00079 uint8_t *msdu_ptr; /**< Data unit */ 00080 } mcps_data_ind_t; 00081 00082 /** 00083 * @brief struct mcps_purge_t Purge request structure 00084 * 00085 * See IEEE standard 802.15.4-2006 (table 44) for more details 00086 */ 00087 typedef struct mcps_purge_s { 00088 uint8_t msduHandle; /**< Handle associated with MSDU */ 00089 } mcps_purge_t; 00090 00091 /** 00092 * @brief struct mcps_purge_conf_t Purge confirm structure 00093 * 00094 * See IEEE standard 802.15.4-2006 (table 45) for more details 00095 */ 00096 typedef struct mcps_purge_conf_s { 00097 uint8_t msduHandle; /**< Handle associated with MSDU */ 00098 uint8_t status; /**< Status of the purge performed */ 00099 } mcps_purge_conf_t; 00100 00101 00102 #endif // MAC_MCPS_H
Generated on Tue Jul 12 2022 12:22:03 by
