ON Semiconductor / mbed-os

Dependents:   mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mac_mcps.h Source File

mac_mcps.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2016 ARM Limited. All rights reserved.
00003  *
00004  * SPDX-License-Identifier: LicenseRef-PBL
00005  *
00006  * Licensed under the Permissive Binary License, Version 1.0 (the "License"); you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  * https://www.mbed.com/licenses/PBL-1.0
00010  *
00011  * See the License for the specific language governing permissions and limitations under the License.
00012  *
00013  */
00014 
00015 /** \file mac_mcps.h
00016  * \brief MAC Common Part Sublayer API
00017  */
00018 
00019 #ifndef MAC_MCPS_H
00020 #define MAC_MCPS_H
00021 
00022 #include <inttypes.h>
00023 #include "mac_common_defines.h"
00024 
00025 /**
00026  * @brief struct mcps_data_req_t Data request structure
00027  *
00028  * See IEEE standard 802.15.4-2006 (table 41) for more details
00029  */
00030 typedef struct mcps_data_req_s {
00031     unsigned SrcAddrMode:2;
00032     unsigned DstAddrMode:2;
00033     uint16_t DstPANId;
00034     uint8_t DstAddr[8];
00035     uint16_t msduLength;
00036     uint8_t *msdu;
00037     uint8_t msduHandle;
00038     bool TxAckReq: 1;
00039     bool InDirectTx:1;
00040     bool PendingBit: 1;
00041     mlme_security_t Key;
00042 } mcps_data_req_t;
00043 
00044 /**
00045  * @brief struct mcps_data_conf_t Data confirm structure
00046  *
00047  * See IEEE standard 802.15.4-2006 (table 42) for more details
00048  */
00049 typedef struct mcps_data_conf_s {
00050     uint8_t msduHandle;
00051     uint8_t status;
00052     uint32_t timestamp;
00053     //Non-standard extension
00054     uint8_t cca_retries;
00055     uint8_t tx_retries; //0 means no retry
00056 } mcps_data_conf_t;
00057 
00058 /**
00059  * @brief struct mcps_data_ind_t Data indication structure
00060  *
00061  * See IEEE standard 802.15.4-2006 (table 43) for more details
00062  */
00063 typedef struct mcps_data_ind_s {
00064     unsigned SrcAddrMode:2; /*0x00 = no address 0x01 = reserved 0x02 = 16-bit short address 0x03 = 64-bit extended address */
00065     uint16_t SrcPANId;
00066     uint8_t SrcAddr[8];
00067     unsigned DstAddrMode:2;
00068     uint16_t DstPANId;
00069     uint8_t DstAddr[8];
00070     uint8_t mpduLinkQuality;
00071     int8_t signal_dbm; /* This extension for normal IEEE 802.15.4 Data indication */
00072     uint32_t timestamp;
00073     uint8_t DSN;
00074     mlme_security_t Key;
00075     uint16_t msduLength;
00076     uint8_t *msdu_ptr;
00077 } mcps_data_ind_t;
00078 
00079 /**
00080  * @brief struct mcps_purge_t Purge request structure
00081  *
00082  * See IEEE standard 802.15.4-2006 (table 44) for more details
00083  */
00084 typedef struct mcps_purge_s {
00085     uint8_t msduHandle;
00086 } mcps_purge_t;
00087 
00088 /**
00089  * @brief struct mcps_purge_conf_t Purge confirm structure
00090  *
00091  * See IEEE standard 802.15.4-2006 (table 45) for more details
00092  */
00093 typedef struct mcps_purge_conf_s {
00094     uint8_t msduHandle;
00095     uint8_t status;
00096 } mcps_purge_conf_t;
00097 
00098 
00099 #endif // MAC_MCPS_H