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.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
mlme.h
00001 /* 00002 * Copyright (c) 2013-2018, 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 mlme.h 00019 * \brief MLME API 00020 */ 00021 00022 #ifndef MLME_H_ 00023 #define MLME_H_ 00024 00025 #include <stdbool.h> 00026 #include "mac_common_defines.h" 00027 #include "net_interface.h" 00028 00029 /** 00030 * @brief struct mlme_pan_descriptor_t PAN descriptor 00031 * 00032 * See IEEE standard 802.15.4-2006 (table 55) for more details 00033 */ 00034 typedef struct mlme_pan_descriptor_s { 00035 unsigned CoordAddrMode: 2; /**<Coordinator address mode MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */ 00036 uint16_t CoordPANId; /**<PAN-id */ 00037 uint8_t CoordAddress[8]; /**< Coordinator based CoordAddrMode */ 00038 uint8_t LogicalChannel; /**< Pan's Logical channel */ 00039 uint8_t ChannelPage; /**< Channel Page*/ 00040 uint8_t SuperframeSpec[2]; /**< Superframe specification */ 00041 bool GTSPermit: 1; /**< true = GTS enabled false = disabled */ 00042 uint8_t LinkQuality; /**< Link quality based on received packet to Coordinator 0-0xff */ 00043 uint32_t Timestamp; /**< Time stamp for received packet */ 00044 uint8_t SecurityFailure; /**< Indicates payload security failure */ 00045 mlme_security_t Key; /**< PAN beacon used security AUX header */ 00046 } mlme_pan_descriptor_t; 00047 00048 /** 00049 * @brief struct mlme_command_type_t Command type enumeration 00050 * 00051 * See IEEE standard 802.15.4-2006 (table 82) for more details 00052 */ 00053 typedef enum { 00054 ASSOCIATION_REQUEST = 1, /**<Assocation request (Not supported)*/ 00055 ASSOCIATION_RESPONSE = 2, /**<Assocation response (Not supported)*/ 00056 DISASSOCIATION_NOTIFICATION = 3, /**<Disasocation Notification (Not supported)*/ 00057 DATA_REQUEST = 4, /**<Data Request */ 00058 PAN_ID_CONFLICT_NOTIFICATION = 5, /**<Pan ID conflict notification (Not supported)*/ 00059 ORPHAN_NOTIFICATION = 6, /**<Orphan Notification (Not supported)*/ 00060 BEACON_REQUEST = 7, /**<Beacon request */ 00061 COORDINATOR_REALIGNMENT = 8, /**<Coordinator Realignment (Not supported)*/ 00062 GTS_REQUEST = 9 /**<GTS request (Not supported)*/ 00063 //Reserved 00064 } mlme_command_type_t; 00065 00066 /** 00067 * @brief enum mlme_loss_reason_t loss reason enumeration 00068 * 00069 * See IEEE standard 802.15.4-2006 (table 75) for more details 00070 */ 00071 typedef enum { 00072 PAN_ID_CONFLICT, /**<Pan id conflict (Not supported)*/ 00073 REALIGNMENT, /**<Cordinator Realignment(Not supported)*/ 00074 BEACON_LOST /**<FHSS indicate by this when it loose synch to coordinator*/ 00075 } mlme_loss_reason_t; 00076 00077 /** 00078 * @brief struct mlme_key_usage_descriptor_t Key usage descriptor 00079 * 00080 * See IEEE standard 802.15.4-2006 (table 90) for more details 00081 */ 00082 typedef struct mlme_key_usage_descriptor_s { 00083 unsigned FrameType: 3; /**<0 = Beacon Frame, 1 = Data Frame or 3 Command Frame */ 00084 unsigned CommandFrameIdentifier: 4; /**< Set this part only when FrameType is 3 */ 00085 } mlme_key_usage_descriptor_t; 00086 00087 /** 00088 * @brief struct mlme_key_device_descriptor_t Key usage descriptor 00089 * 00090 * See IEEE standard 802.15.4-2006 (table 91) for more details 00091 */ 00092 typedef struct mlme_key_device_descriptor_s { 00093 uint8_t DeviceDescriptorHandle; /**< User defined unique ID to key User */ 00094 bool UniqueDevice: 1; /**< true = Key description is for Key Pair Key usage only, False = group key */ 00095 bool Blacklisted: 1; /**< true = Description is black listed, False = valid to use */ 00096 } mlme_key_device_descriptor_t; 00097 00098 /** 00099 * @brief enum mlme_security_type_t Security type enumeration 00100 * 00101 * See IEEE standard 802.15.4-2006 (table 95) for more details 00102 */ 00103 typedef enum { 00104 SEC_NONE = 0, /**< No payload encode and authentication */ 00105 SEC_MIC32 = 1, /**< No payload encode with 32-bit MIC authentication */ 00106 SEC_MIC64 = 2, /**< No payload encode with 64-bit MIC authentication */ 00107 SEC_MIC128 = 3, /**< No payload encode with 128-bit MIC authentication */ 00108 SEC_ENC = 4, /**< Payload encode enabled and without authentication */ 00109 SEC_ENC_MIC32 = 5, /**< Payload encode enabled with 32-bit MIC authentication */ 00110 SEC_ENC_MIC64 = 6, /**< Payload encode enabled with 64-bit MIC authentication */ 00111 SEC_ENC_MIC128 = 7 /**< Payload encode enabled with 128-bit MIC authentication */ 00112 } mlme_security_type_t; 00113 00114 /** 00115 * @brief struct mlme_security_level_descriptor_t Security level descriptor 00116 * 00117 * See IEEE standard 802.15.4-2006 (table 92) for more details 00118 */ 00119 typedef struct mlme_security_level_descriptor_s { 00120 unsigned FrameType: 3; /**<0 = Beacon Frame, 1 = Data Frame or 3 Command Frame */ 00121 unsigned CommandFrameIdentifier: 4; /**< Set this part only when FrameType is 3 */ 00122 unsigned SecurityMinimum: 3; /**< Define Minimum acceptable security level for RX */ 00123 bool DeviceOverrideSecurityMinimum: 1; /**< Set false */ 00124 } mlme_security_level_descriptor_t; 00125 00126 /** 00127 * @brief struct mlme_device_descriptor_t Device descriptor 00128 * 00129 * See IEEE standard 802.15.4-2006 (table 93) for more details 00130 */ 00131 typedef struct mlme_device_descriptor_s { 00132 uint16_t PANId; /**< Pan-id */ 00133 uint16_t ShortAddress; /**< Device 16-bit short address 0xffff means not defined */ 00134 uint8_t ExtAddress[8]; /**< Device Extended 64-bit address */ 00135 uint32_t FrameCounter; /**< Security Frame counter */ 00136 bool Exempt: 1; /**< Set false */ 00137 } mlme_device_descriptor_t; 00138 00139 /** 00140 * @brief struct mlme_key_id_lookup_descriptor_t Key id lookup descriptor 00141 * 00142 * See IEEE standard 802.15.4-2006 (table 94) for more details 00143 */ 00144 typedef struct mlme_key_id_lookup_descriptor_s { 00145 uint8_t LookupData[9]; /**< Key Lookup data */ 00146 unsigned LookupDataSize: 1; /**< Key Lookup data size 0= 5 1 is 9 bytes */ 00147 } mlme_key_id_lookup_descriptor_t; 00148 00149 00150 /** 00151 * @brief struct mlme_key_descriptor_entry_t Key descriptor entry 00152 * 00153 * See IEEE standard 802.15.4-2006 (table 89) for more details 00154 */ 00155 typedef struct mlme_key_descriptor_entry_s { 00156 mlme_key_id_lookup_descriptor_t *KeyIdLookupList; /**< List of Key lookup data for this descriptor*/ 00157 uint8_t KeyIdLookupListEntries; /**< Number of entries in KeyIdLookupList*/ 00158 mlme_key_device_descriptor_t *KeyDeviceList; /**< List of descriptor user entries indicating which devices are valid or blacklisted */ 00159 uint8_t KeyDeviceListEntries; /**< Number of entries in KeyDeviceList*/ 00160 mlme_key_usage_descriptor_t *KeyUsageList; /**< List of descriptor entries indicating which frame types this key may be used with*/ 00161 uint8_t KeyUsageListEntries; /**< Number of entries in KeyUsageList*/ 00162 uint8_t Key[16]; /**< Actual value of Security key*/ 00163 } mlme_key_descriptor_entry_t; 00164 00165 /** 00166 * @brief MLME primitive error statuses 00167 * 00168 * See IEEE standard 802.15.4-2006 for more details 00169 */ 00170 #define MLME_SUCCESS 0x00 /**< The requested operation was completed successfully*/ 00171 #define MLME_BUSY_CHAN 0xe1 /**< CSMA-CA fail*/ 00172 #define MLME_BUSY_RX 0x01 /**< The radio is asked to change its state while receiving */ 00173 #define MLME_BUSY_TX 0x02 /**< The radio is asked to change its state while transmitting. */ 00174 #define MLME_FORCE_TRX_OFF 0x03 /**< The radio is to be switched off immediately */ 00175 #define MLME_IDLE 0x04 /**< The CCA attempt has detected an idle channel */ 00176 #define MLME_RX_ON 0x06 /**< The radio is in or is to be configured into the receiver enabled state. */ 00177 #define MLME_TRX_OFF 0x08 /**< The radio is in or is to be configured into the receiver enabled state. */ 00178 #define MLME_TX_ON 0x09 /**< The radio is in or is to be configured into the receiver enabled state. */ 00179 #define MLME_COUNTER_ERROR 0xdb /**< Originated messages security counter is not valid */ 00180 #define MLME_IMPROPER_KEY_TYPE 0xdc /**< Received Messages key used is agains't key usage policy */ 00181 #define MLME_IMPROPER_SECURITY_LEVEL 0xdd /**< Received Messages security level does not meet minimum security level */ 00182 #define MLME_UNSUPPORTED_LEGACY 0xde /**< The received frame was purportedly secured using security based on IEEE Std 802.15.4-2003, and such security is not supported by this standard. */ 00183 #define MLME_UNSUPPORTED_SECURITY 0xdf /**< The received frame security is not supported */ 00184 #define MLME_SECURITY_FAIL 0xe4 /**< Cryptographic processing of the received secured frame failed. */ 00185 #define MLME_FRAME_TOO_LONG 0xe5 /**< Either a frame resulting from processing has a length that is greater than aMaxPHYPacketSize */ 00186 #define MLME_INVALID_HANDLE 0xe7 /**< Status for Purge request when Mac not detect proper queued message*/ 00187 #define MLME_INVALID_PARAMETER 0xe8 /**< A parameter in the primitive is either not supported or is out of the valid range */ 00188 #define MLME_TX_NO_ACK 0xe9 /**< No ack was received after macMaxFrameRetries */ 00189 #define MLME_NO_BEACON 0xea /**< A scan operation failed to find any network beacons */ 00190 #define MLME_NO_DATA 0xeb /**< No response data were available following a request */ 00191 #define MLME_NO_SHORT_ADDRESS 0xec /**< Operation fail because 16-bit address is not allocated */ 00192 #define MLME_PAN_ID_CONFLICT 0xee /**< A PAN identifier conflict has been detected and communicated to the PAN coordinator. */ 00193 #define MLME_TRANSACTION_EXPIRED 0xf0 /**< The transaction has expired and its information was discarded */ 00194 #define MLME_TRANSACTION_OVERFLOW 0xf1 /**< MAC have no capacity to store the transaction */ 00195 #define MLME_UNAVAILABLE_KEY 0xf3 /**< Received message use unknown key, or the originating device is unknown or is blacklisted with that particular key */ 00196 #define MLME_UNSUPPORTED_ATTRIBUTE 0xf4 /**< A SET/GET request was issued with the unsupported identifier */ 00197 #define MLME_INVALID_ADDRESS 0xf5 /**< A request to send data was unsuccessful because neither the source address parameters nor the destination address parameters were present.*/ 00198 #define MLME_INVALID_INDEX 0xf9 /**< An attempt to write to a MAC PIB attribute that is in a table failed because the specified table index was out of range. */ 00199 #define MLME_LIMIT_REACHED 0xfa /**< A scan operation terminated prematurely because the number of PAN descriptors stored reached an implementation- specified maximum */ 00200 #define MLME_READ_ONLY 0xfb /**< A SET request was issued with the identifier of an attribute that is read only.*/ 00201 #define MLME_SCAN_IN_PROGRESS 0xfc /**< Request scan request fail when scan is already active */ 00202 //NOT-standard 00203 #define MLME_DATA_POLL_NOTIFICATION 0xff /**< Thread requirement feature COMM status status for indicate for successfully data poll event to refresh neighbour data */ 00204 00205 /** 00206 * @brief enum mac_scan_type_t MAC scan type 00207 * 00208 * See IEEE standard 802.15.4-2006 (table 67) for more details 00209 */ 00210 typedef enum { 00211 MAC_ED_SCAN_TYPE = 0, /**< Energy detection scan operation */ 00212 MAC_ACTIVE_SCAN = 1, /**< Active scan operation */ 00213 MAC_PASSIVE_SCAN = 2, /**< Passive scan operation */ 00214 MAC_ORPHAN_SCAN = 3 /**< Orphan scan operation (Not supported) */ 00215 } mac_scan_type_t; 00216 00217 /** 00218 * @brief enum mlme_attr_t MLME attributes used with GET and SET primitives 00219 * 00220 * See IEEE standard 802.15.4-2006 (table 86) for more details 00221 */ 00222 typedef enum { 00223 phyCurrentChannel = 0x00, /*<Current RF channel*/ 00224 macAckWaitDuration = 0x40, /*<Integer, n. of symbols*/ 00225 macAssociatedPANCoord = 0x56, /*<Boolean, associated to PAN coordinator*/ 00226 macAssociationPermit = 0x41, /*<Boolean, if association is allowed (in coordinator)*/ 00227 macAutoRequest = 0x42, /*<Boolean, if device automatically sends data request on beacon*/ 00228 macBattLifeExt = 0x43, /*<Boolean, if BLE is enabled*/ 00229 macBattLifeExtPeriods = 0x44, /*<Integer 6-41, BLE back off periods */ 00230 macBeaconPayload = 0x45, /*<Set of bytes, beacon payload*/ 00231 macBeaconPayloadLength = 0x46, /*<Integer 0-MaxPayLoadLen*/ 00232 macBeaconOrder = 0x47, /*<Integer 0–15, Beacon tx period, 15 = no periodic beacon*/ 00233 macBeaconTxTime = 0x48, /*<Integer 0x000000–0xffffff, symbols, when last beacon was transmitted*/ 00234 macBSN = 0x49, /*<Integer 0x00–0xff, Beacon sequence number*/ 00235 macCoordExtendedAddress = 0x4a, /*<64-bit IEEE of coordinator*/ 00236 macCoordShortAddress = 0x4b, /*<16-bit addr of coordinator*/ 00237 macDSN = 0x4c, /*<Integer 0x00–0xff, Data frame sequence number*/ 00238 macGTSPermit = 0x4d, /*<Boolean, GTS allowed?*/ 00239 macMaxBE = 0x57, /*<Integer 3–8, max value of back off exponent*/ 00240 macMaxCSMABackoffs = 0x4e, /*<Integer 0–5*/ 00241 macMaxFrameTotalWaitTime = 0x58,/*<Integer, max of CAP symbols while waiting for data requested by DREQ or PEND*/ 00242 macMaxFrameRetries = 0x59, /*<Integer 0–7*/ 00243 macMinBE = 0x4f, /*<Integer 0–macMaxBE*/ 00244 macPANId = 0x50, /*<PAN ID, 16 bits*/ 00245 macPromiscuousMode = 0x51, /*<Boolean*/ 00246 macResponseWaitTime = 0x5a, /*<Integer 2–64 The maximum time in SuperFrameDurations to wait for responses*/ 00247 macRxOnWhenIdle = 0x52, /*<Boolean*/ 00248 macSecurityEnabled = 0x5d, /*<Boolean*/ 00249 macShortAddress = 0x53, /*<Short address, 16 bits*/ 00250 macSuperframeOrder = 0x54, /*<Integer 0–15, The length of the active portion of the outgoing super frame, 15 = none*/ 00251 macSyncSymbolOffset = 0x5b, /*<Integer 0x000–0x100 (symbols) time stamp offset*/ 00252 macTimestampSupported = 0x5c, /*<Boolean*/ 00253 macTransactionPersistenceTime = 0x55, /*<Integer 0x0000–0xffff (unit periods)*/ 00254 macKeyTable = 0x71, /*<A table of KeyDescriptor entries, each containing keys and related information required for secured communications.*/ 00255 macKeyTableEntries = 0x72, /*<The number of entries in macKeyTable.*/ 00256 macDeviceTable = 0x73, /*<List of Descriptor entries, each indicating a remote device*/ 00257 macDeviceTableEntries = 0x74, /*<The number of entries in macDeviceTable.*/ 00258 macSecurityLevelTable = 0x75, /*<A table of SecurityLevelDescriptor entries*/ 00259 macSecurityLevelTableEntries = 0x76, /*<The number of entries in macSecurityLevelTable*/ 00260 macFrameCounter = 0x77, /*<The outgoing frame counter*/ 00261 macAutoRequestSecurityLevel = 0x78, /*<0x00–0x07 The security level used for automatic data requests.*/ 00262 macAutoRequestKeyIdMode = 0x79, /*< The key identifier mode used for automatic data requests.*/ 00263 macAutoRequestKeySource = 0x7a, /*<Key source for automatic data*/ 00264 macAutoRequestKeyIndex = 0x7b, /*<The index of the key used for automatic data*/ 00265 macDefaultKeySource = 0x7c, /*<Default key source*/ 00266 //NON standard extension 00267 macDeviceDescriptionPanIDUpdate = 0xf7, /*<Thread pending link update case this will update device descrioton list pan-id to new one*/ 00268 macTXPower = 0xf8, /*<TX output power*/ 00269 macCCAThreshold = 0xf9, /*<CCA threshold*/ 00270 macMultiCSMAParameters = 0xfa, /*<Multi CSMA parameters*/ 00271 macRfConfiguration = 0xfb, /*<RF channel configuration parameters*/ 00272 macAcceptByPassUnknowDevice = 0xfc, /*< Accept data trough MAC if packet is data can be authenticated by group key nad MIC. Security enforsment point must be handled carefully these packets */ 00273 macLoadBalancingBeaconTx = 0xfd, /*< Trig Beacon from load balance module periodic */ 00274 macLoadBalancingAcceptAnyBeacon = 0xfe, /*<Beacon accept state control from other network. Value size bool, data true=Enable, false=disable .*/ 00275 macThreadForceLongAddressForBeacon = 0xff /*<Thread standard force beacon source address for extended 64-bit*/ 00276 } mlme_attr_t; 00277 00278 /** 00279 * @brief struct mlme_beacon_pending_address_spec_t Pending address specification field 00280 * 00281 * See IEEE standard 802.15.4-2006 (figure 51) for more details 00282 */ 00283 typedef struct mlme_beacon_pending_address_spec_s { 00284 unsigned short_address_count: 3; /**< Number of short address count */ 00285 unsigned extended_address_count: 3; /**< Number of extended address count */ 00286 } mlme_beacon_pending_address_spec_t; 00287 00288 /** 00289 * @brief struct mlme_beacon_gts_spec_t Format of GTS specification field 00290 * 00291 * See IEEE standard 802.15.4-2006 (figure 48) for more details 00292 */ 00293 typedef struct mlme_beacon_gts_spec_s { 00294 unsigned description_count: 3; /**< Number of GTS description count */ 00295 unsigned gts_permit: 1; /**< 1= GTS request accepted 0= not accepted */ 00296 } mlme_beacon_gts_spec_t; 00297 00298 /** 00299 * @brief struct mlme_beacon_ind_t Beacon notify structure 00300 * 00301 * See IEEE standard 802.15.4-2006 (table 54) for more details 00302 */ 00303 typedef struct mlme_beacon_ind_s { 00304 uint8_t BSN; /**< Beacon sequence number */ 00305 mlme_pan_descriptor_t PANDescriptor; /**< Beacon parsed Pan description */ 00306 mlme_beacon_pending_address_spec_t PendAddrSpec; /**< Address pending field */ 00307 uint8_t *AddrList; /**< Address pending list */ 00308 uint16_t beacon_data_length; /**< Length of beacon payload */ 00309 uint8_t *beacon_data; /**< Pointer to beacon payload */ 00310 } mlme_beacon_ind_t; 00311 00312 /** 00313 * @brief struct mlme_scan_t Scan request structure 00314 * 00315 * See IEEE standard 802.15.4-2006 (table 67) for more details 00316 */ 00317 typedef struct mlme_scan_s { 00318 mac_scan_type_t ScanType; /**< ED=0, active=1, passive=2, orphan=3*/ 00319 channel_list_s ScanChannels; /**<bit field, low 27 bits used*/ 00320 uint8_t ScanDuration; /**<0-14, scan duration/channel*/ 00321 uint8_t ChannelPage; /**<0-31*/ 00322 mlme_security_t Key; /**< Security parameters for active scan process */ 00323 } mlme_scan_t; 00324 00325 /** 00326 * @brief struct mlme_set_t Set request structure 00327 * 00328 * See IEEE standard 802.15.4-2006 (table 70) for more details 00329 */ 00330 typedef struct mlme_set_s { 00331 mlme_attr_t attr; /**<PIB attribute for operation*/ 00332 uint8_t attr_index; /**< attribute index to to table (use only for PIB attributes which are tables)*/ 00333 const void *value_pointer; /**< Pointer to value*/ 00334 uint8_t value_size; /**< define data length in bytes behind pointer*/ 00335 } mlme_set_t; 00336 00337 /** 00338 * @brief struct mlme_get_t Get request structure 00339 * 00340 * See IEEE standard 802.15.4-2006 (table 56) for more details 00341 */ 00342 typedef struct mlme_get_s { 00343 mlme_attr_t attr; /**<PIB attribute for operation*/ 00344 uint8_t attr_index; /**< attribute index to to table (use only for PIB attributes which are tables)*/ 00345 } mlme_get_t; 00346 00347 /** 00348 * @brief struct mlme_get_conf_t Get confirm structure 00349 * 00350 * See IEEE standard 802.15.4-2006 (table 57) for more details 00351 */ 00352 typedef struct mlme_get_conf_s { 00353 uint8_t status; /**< status of operation*/ 00354 mlme_attr_t attr; /**<PIB attribute for operation*/ 00355 uint8_t attr_index; /**< attribute index to to table (valid only for PIB attributes which are tables)*/ 00356 void *value_pointer; /**< Pointer to data when status is MLME_SUCCESS */ 00357 uint8_t value_size; /**< define data length in bytes behind pointer*/ 00358 } mlme_get_conf_t; 00359 00360 /** 00361 * @brief struct mlme_set_conf_t Set confirm structure 00362 * 00363 * See IEEE standard 802.15.4-2006 (table 71) for more details 00364 */ 00365 typedef struct mlme_set_conf_s { 00366 uint8_t status; /**< status of operation*/ 00367 mlme_attr_t attr; /**<PIB attribute for operation*/ 00368 uint8_t attr_index; /**< attribute index to to table (valid only for PIB attributes which are tables)*/ 00369 } mlme_set_conf_t; 00370 00371 00372 #define MLME_MAC_RES_SIZE_MAX 16 /**< Mac scan response max supported list size */ 00373 00374 /** 00375 * @brief struct mlme_scan_conf_t Scan confirm structure 00376 * 00377 * See IEEE standard 802.15.4-2006 (table 68) for more details 00378 */ 00379 typedef struct mlme_scan_conf_s { 00380 uint8_t status; /**< status of operation*/ 00381 unsigned ScanType: 2; /**< Finished Scan type*/ 00382 uint8_t ChannelPage; /**< Operated Channel Page*/ 00383 channel_list_s UnscannedChannels; /**< Channel mask for unscanned channels*/ 00384 uint8_t ResultListSize; /**< Result list size*/ 00385 uint8_t *ED_values; /**< Energy scan result types Check only when scan type is 0*/ 00386 mlme_pan_descriptor_t *PAN_values[MLME_MAC_RES_SIZE_MAX]; /**< List of scanned Pan description's*/ 00387 } mlme_scan_conf_t; 00388 00389 /** 00390 * @brief struct mlme_reset_t Reset request structure 00391 * 00392 * See IEEE standard 802.15.4-2006 (table 63) for more details 00393 */ 00394 typedef struct mlme_reset_s { 00395 bool SetDefaultPIB; /**< true= Set standard default values, false= Mac sub layer will be reset but it retain configured MAC PIB values */ 00396 } mlme_reset_t; 00397 00398 /** 00399 * @brief struct mlme_reset_conf_t Reset confirm structure 00400 * 00401 * See IEEE standard 802.15.4-2006 (table 64) for more details 00402 */ 00403 typedef struct mlme_reset_conf_s { 00404 uint8_t status; /**< Status of reset operation */ 00405 } mlme_reset_conf_t; 00406 00407 /** 00408 * @brief struct mlme_rx_enable_t Rx enable request structure (Not supported) 00409 * 00410 * See IEEE standard 802.15.4-2006 (table 65) for more details 00411 */ 00412 typedef struct mlme_rx_enable_s { 00413 bool DeferPermit; /**< This will be ignored at nonbeacon-enabled PAN*/ 00414 uint32_t RxOnTime; /**< This will be ignored at nonbeacon-enabled PAN*/ 00415 uint32_t RxOnDuration; /**< Number of symbols which receiver is enabled, 0 receiver is not disabled*/ 00416 } mlme_rx_enable_t; 00417 00418 /** 00419 * @brief struct mlme_rx_enable_conf_t Rx enable confirm structure (Not supported) 00420 * 00421 * See IEEE standard 802.15.4-2006 (table 66) for more details 00422 */ 00423 typedef struct mlme_rx_enable_conf_s { 00424 uint8_t status; /**< Status of operation */ 00425 } mlme_rx_enable_conf_t; 00426 00427 /** 00428 * @brief struct mlme_comm_status_t Comm status indication structure 00429 * 00430 * See IEEE standard 802.15.4-2006 (table 69) for more details 00431 */ 00432 typedef struct mlme_comm_status_s { 00433 uint16_t PANId; /**< Messages Pan-id */ 00434 unsigned SrcAddrMode: 2; /**< source address mode: MAC_ADDR_MODE_NONE,MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */ 00435 uint8_t SrcAddr[8]; /**< source address when mode is: MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */ 00436 unsigned DstAddrMode: 2; /**< destination address mode: MAC_ADDR_MODE_NONE,MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */ 00437 uint8_t DstAddr[8]; /**< Destination address when mode is: MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */ 00438 uint8_t status; /**< Communication status */ 00439 mlme_security_t Key; /**< Messages Security parameters */ 00440 } mlme_comm_status_t; 00441 00442 /** 00443 * @brief struct mlme_start_t Start request structure 00444 * 00445 * See IEEE standard 802.15.4-2006 (table 72) for more details 00446 */ 00447 typedef struct mlme_start_s { 00448 uint16_t PANId; /**< Pan-id */ 00449 uint8_t LogicalChannel; /**< Operated Logical channel */ 00450 uint8_t ChannelPage; /**< Operated Logical channel page */ 00451 uint32_t StartTime; /**< Start time, set 0 */ 00452 unsigned BeaconOrder: 4; /**< Beacon order, set 15 */ 00453 unsigned SuperframeOrder: 4; /**< Super frame order, set 15 */ 00454 bool PANCoordinator: 1; /**< true= Enable beacon response for beacon request, false = disable beacon request responses */ 00455 bool BatteryLifeExtension: 1; /**< Set false */ 00456 bool CoordRealignment: 1; /**< Set false */ 00457 mlme_security_t CoordRealignKey; /**< Coordinator Realignment security parameter's (Valid only CoordRealignment = true)*/ 00458 mlme_security_t BeaconRealignKey; /**< Beacon realign security parameter's (Valid only CoordRealignment = true)*/ 00459 } mlme_start_t; 00460 00461 /** 00462 * @brief struct mlme_start_conf_t Start confirm structure (Currently not triggered yet) 00463 * 00464 * See IEEE standard 802.15.4-2006 (table 73) for more details 00465 */ 00466 typedef struct mlme_start_conf_s { 00467 uint8_t status; /**< Status for start confirmation */ 00468 } mlme_start_conf_t; 00469 00470 00471 /** 00472 * @brief struct mlme_sync_loss_s Synch loss indication 00473 * 00474 * Stack will trig this with FHSS enabled mac when synch to parent is lost 00475 * See IEEE standard 802.15.4-2006 (table 73) for more details 00476 */ 00477 typedef struct mlme_sync_loss_s { 00478 mlme_loss_reason_t LossReason; /**< Loss reason, BEACON_LOST with FHSS */ 00479 uint16_t PANId; /**< Pan-id */ 00480 uint8_t LogicalChannel; /**< Logical channel */ 00481 uint8_t ChannelPage; /**< Logical channel page */ 00482 mlme_security_t Key; /**< Security parameters */ 00483 } mlme_sync_loss_t; 00484 00485 /** 00486 * @brief struct mlme_poll_t Poll request structure 00487 * 00488 * See IEEE standard 802.15.4-2006 (table 76) for more details 00489 */ 00490 typedef struct mlme_poll_s { 00491 unsigned CoordAddrMode: 2; /**< coordinator address mode:MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */ 00492 uint16_t CoordPANId; /**< coordinator Pan-id to coordinator*/ 00493 uint8_t CoordAddress[8]; /**< coordinator address */ 00494 mlme_security_t Key; /**< Security parameters for Poll request */ 00495 } mlme_poll_t; 00496 00497 /** 00498 * @brief struct mlme_poll_conf_t Poll confirm structure 00499 * 00500 * See IEEE standard 802.15.4-2006 (table 77) for more details 00501 */ 00502 typedef struct mlme_poll_conf_s { 00503 uint8_t status; /**< Status of Poll operation */ 00504 } mlme_poll_conf_t; 00505 00506 /** 00507 * @brief struct mlme_multi_csma_ca_param_s Set multi CSMA-CA parameters 00508 * 00509 * Non standard extension to perform CCA multiple times before transmission 00510 */ 00511 typedef struct mlme_multi_csma_ca_s { 00512 uint8_t number_of_csma_ca_periods; /**< Number of CSMA-CA periods */ 00513 uint16_t multi_cca_interval; /**< Length of the additional CSMA-CA period(s) in microseconds */ 00514 } mlme_multi_csma_ca_param_t; 00515 00516 #endif /* MLME_H_ */
Generated on Tue Jul 12 2022 13:54:35 by
