BA / Mbed OS BaBoRo1
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mlme.h Source File

mlme.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2013-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 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     macLoadBalancingBeaconTx = 0xfd,  /*< Trig Beacon from load balance module periodic */
00268     macLoadBalancingAcceptAnyBeacon = 0xfe, /*<Beacon accept state control from other network. Value size bool, data true=Enable, false=disable .*/
00269     macThreadForceLongAddressForBeacon = 0xff /*<Thread standard force beacon source address for extended 64-bit*/
00270 } mlme_attr_t;
00271 
00272 /**
00273  * @brief struct mlme_beacon_pending_address_spec_t Pending address specification field
00274  *
00275  * See IEEE standard 802.15.4-2006 (figure 51) for more details
00276  */
00277 typedef struct mlme_beacon_pending_address_spec_s{
00278     unsigned short_address_count:3;                 /**< Number of short address count */
00279     unsigned extended_address_count:3;              /**< Number of extended address count */
00280 }mlme_beacon_pending_address_spec_t;
00281 
00282 /**
00283  * @brief struct mlme_beacon_gts_spec_t Format of GTS specification field
00284  *
00285  * See IEEE standard 802.15.4-2006 (figure 48) for more details
00286  */
00287 typedef struct mlme_beacon_gts_spec_s{
00288     unsigned description_count:3;       /**< Number of GTS description count */
00289     unsigned gts_permit:1;              /**< 1= GTS request accepted 0= not accepted */
00290 }mlme_beacon_gts_spec_t;
00291 
00292 /**
00293  * @brief struct mlme_beacon_ind_t Beacon notify structure
00294  *
00295  * See IEEE standard 802.15.4-2006 (table 54) for more details
00296  */
00297 typedef struct mlme_beacon_ind_s {
00298     uint8_t BSN;                                        /**< Beacon sequence number */
00299     mlme_pan_descriptor_t PANDescriptor;                /**< Beacon parsed Pan description */
00300     mlme_beacon_pending_address_spec_t PendAddrSpec;    /**< Address pending field */
00301     uint8_t *AddrList;                                  /**< Address pending list */
00302     uint16_t beacon_data_length;                        /**< Length of beacon payload */
00303     uint8_t *beacon_data;                               /**< Pointer to beacon payload */
00304 } mlme_beacon_ind_t;
00305 
00306 /**
00307  * @brief struct mlme_scan_t Scan request structure
00308  *
00309  * See IEEE standard 802.15.4-2006 (table 67) for more details
00310  */
00311 typedef struct mlme_scan_s {
00312     mac_scan_type_t     ScanType;   /**< ED=0, active=1, passive=2, orphan=3*/
00313     channel_list_s  ScanChannels;   /**<bit field, low 27 bits used*/
00314     uint8_t     ScanDuration;       /**<0-14, scan duration/channel*/
00315     uint8_t     ChannelPage;        /**<0-31*/
00316     mlme_security_t Key;            /**< Security parameters for active scan process */
00317 } mlme_scan_t;
00318 
00319 /**
00320  * @brief struct mlme_set_t Set request structure
00321  *
00322  * See IEEE standard 802.15.4-2006 (table 70) for more details
00323  */
00324 typedef struct mlme_set_s {
00325     mlme_attr_t attr;           /**<PIB attribute for operation*/
00326     uint8_t attr_index;         /**< attribute index to to table (use only for PIB attributes which are tables)*/
00327     const void *value_pointer;  /**< Pointer to value*/
00328     uint8_t value_size;         /**< define data length in bytes behind pointer*/
00329 } mlme_set_t;
00330 
00331 /**
00332  * @brief struct mlme_get_t Get request structure
00333  *
00334  * See IEEE standard 802.15.4-2006 (table 56) for more details
00335  */
00336 typedef struct mlme_get_s {
00337     mlme_attr_t attr;       /**<PIB attribute for operation*/
00338     uint8_t attr_index;     /**< attribute index to to table (use only for PIB attributes which are tables)*/
00339 } mlme_get_t;
00340 
00341 /**
00342  * @brief struct mlme_get_conf_t Get confirm structure
00343  *
00344  * See IEEE standard 802.15.4-2006 (table 57) for more details
00345  */
00346 typedef struct mlme_get_conf_s {
00347     uint8_t status;             /**< status of operation*/
00348     mlme_attr_t attr;           /**<PIB attribute for operation*/
00349     uint8_t attr_index;         /**< attribute index to to table (valid only for PIB attributes which are tables)*/
00350     void *value_pointer;        /**< Pointer to data when status is MLME_SUCCESS */
00351     uint8_t value_size;         /**< define data length in bytes behind pointer*/
00352 } mlme_get_conf_t;
00353 
00354 /**
00355  * @brief struct mlme_set_conf_t Set confirm structure
00356  *
00357  * See IEEE standard 802.15.4-2006 (table 71) for more details
00358  */
00359 typedef struct mlme_set_conf_s {
00360     uint8_t status;         /**< status of operation*/
00361     mlme_attr_t attr;       /**<PIB attribute for operation*/
00362     uint8_t attr_index;     /**< attribute index to to table (valid only for PIB attributes which are tables)*/
00363 } mlme_set_conf_t;
00364 
00365 
00366 #define MLME_MAC_RES_SIZE_MAX 16 /**< Mac scan response max supported list size */
00367 
00368 /**
00369  * @brief struct mlme_scan_conf_t Scan confirm structure
00370  *
00371  * See IEEE standard 802.15.4-2006 (table 68) for more details
00372  */
00373 typedef struct mlme_scan_conf_s {
00374     uint8_t status;                                             /**< status of operation*/
00375     unsigned ScanType:2;                                        /**< Finished Scan type*/
00376     uint8_t ChannelPage;                                        /**< Operated Channel Page*/
00377     channel_list_s UnscannedChannels;                           /**< Channel mask for unscanned channels*/
00378     uint8_t ResultListSize;                                     /**< Result list size*/
00379     uint8_t *ED_values;                                         /**< Energy scan result types Check only when scan type is 0*/
00380     mlme_pan_descriptor_t *PAN_values[MLME_MAC_RES_SIZE_MAX];   /**< List of scanned Pan description's*/
00381 } mlme_scan_conf_t;
00382 
00383 /**
00384  * @brief struct mlme_reset_t Reset request structure
00385  *
00386  * See IEEE standard 802.15.4-2006 (table 63) for more details
00387  */
00388 typedef struct mlme_reset_s {
00389     bool SetDefaultPIB; /**< true= Set standard default values, false= Mac sub layer will be reset but it retain configured MAC PIB values */
00390 } mlme_reset_t;
00391 
00392 /**
00393  * @brief struct mlme_reset_conf_t Reset confirm structure
00394  *
00395  * See IEEE standard 802.15.4-2006 (table 64) for more details
00396  */
00397 typedef struct mlme_reset_conf_s {
00398     uint8_t status; /**< Status of reset operation */
00399 } mlme_reset_conf_t;
00400 
00401 /**
00402  * @brief struct mlme_rx_enable_t Rx enable request structure (Not supported)
00403  *
00404  * See IEEE standard 802.15.4-2006 (table 65) for more details
00405  */
00406 typedef struct mlme_rx_enable_s {
00407     bool DeferPermit;               /**< This will be ignored at nonbeacon-enabled PAN*/
00408     uint32_t RxOnTime;              /**< This will be ignored at nonbeacon-enabled PAN*/
00409     uint32_t RxOnDuration;          /**< Number of symbols which receiver is enabled, 0 receiver is not disabled*/
00410 } mlme_rx_enable_t;
00411 
00412 /**
00413  * @brief struct mlme_rx_enable_conf_t Rx enable confirm structure (Not supported)
00414  *
00415  * See IEEE standard 802.15.4-2006 (table 66) for more details
00416  */
00417 typedef struct mlme_rx_enable_conf_s {
00418     uint8_t status;                     /**< Status of operation */
00419 } mlme_rx_enable_conf_t;
00420 
00421 /**
00422  * @brief struct mlme_comm_status_t Comm status indication structure
00423  *
00424  * See IEEE standard 802.15.4-2006 (table 69) for more details
00425  */
00426 typedef struct mlme_comm_status_s {
00427     uint16_t PANId;                 /**< Messages Pan-id */
00428     unsigned SrcAddrMode:2;         /**< source address mode: MAC_ADDR_MODE_NONE,MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */
00429     uint8_t SrcAddr[8];             /**< source address when mode is: MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */
00430     unsigned DstAddrMode:2;         /**< destination address mode: MAC_ADDR_MODE_NONE,MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */
00431     uint8_t DstAddr[8];             /**< Destination address when mode is: MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */
00432     uint8_t status;                 /**< Communication status */
00433     mlme_security_t Key;            /**< Messages Security parameters */
00434 } mlme_comm_status_t;
00435 
00436 /**
00437  * @brief struct mlme_start_t Start request structure
00438  *
00439  * See IEEE standard 802.15.4-2006 (table 72) for more details
00440  */
00441 typedef struct mlme_start_s {
00442     uint16_t PANId;                     /**< Pan-id */
00443     uint8_t LogicalChannel;             /**< Operated Logical channel */
00444     uint8_t ChannelPage;                /**< Operated Logical channel page */
00445     uint32_t StartTime;                 /**< Start time,  set 0 */
00446     unsigned BeaconOrder:4;             /**< Beacon order,  set 15 */
00447     unsigned SuperframeOrder:4;         /**< Super frame order,  set 15 */
00448     bool PANCoordinator:1;              /**< true= Enable beacon response for beacon request, false = disable beacon request responses */
00449     bool BatteryLifeExtension:1;        /**< Set false */
00450     bool CoordRealignment:1;            /**< Set false */
00451     mlme_security_t CoordRealignKey;    /**< Coordinator Realignment security parameter's  (Valid only CoordRealignment = true)*/
00452     mlme_security_t BeaconRealignKey;   /**< Beacon realign security parameter's (Valid only CoordRealignment = true)*/
00453 } mlme_start_t;
00454 
00455 /**
00456  * @brief struct mlme_start_conf_t Start confirm structure (Currently not triggered yet)
00457  *
00458  * See IEEE standard 802.15.4-2006 (table 73) for more details
00459  */
00460 typedef struct mlme_start_conf_s {
00461     uint8_t status;                 /**< Status for start confirmation */
00462 } mlme_start_conf_t;
00463 
00464 
00465 /**
00466  * @brief struct mlme_sync_loss_s Synch loss indication
00467  *
00468  * Stack will trig this with FHSS enabled mac when synch to parent is lost
00469  * See IEEE standard 802.15.4-2006 (table 73) for more details
00470  */
00471 typedef struct mlme_sync_loss_s {
00472     mlme_loss_reason_t LossReason; /**< Loss reason, BEACON_LOST with FHSS */
00473     uint16_t PANId;                 /**< Pan-id */
00474     uint8_t LogicalChannel;         /**< Logical channel */
00475     uint8_t ChannelPage;            /**< Logical channel page */
00476     mlme_security_t Key;            /**< Security parameters */
00477 } mlme_sync_loss_t;
00478 
00479 /**
00480  * @brief struct mlme_poll_t Poll request structure
00481  *
00482  * See IEEE standard 802.15.4-2006 (table 76) for more details
00483  */
00484 typedef struct mlme_poll_s {
00485     unsigned CoordAddrMode:2;   /**< coordinator address mode:MAC_ADDR_MODE_16_BIT or MAC_ADDR_MODE_64_BIT */
00486     uint16_t CoordPANId;        /**< coordinator Pan-id to coordinator*/
00487     uint8_t CoordAddress[8];    /**< coordinator address */
00488     mlme_security_t Key;        /**< Security parameters for Poll request */
00489 } mlme_poll_t;
00490 
00491 /**
00492  * @brief struct mlme_poll_conf_t Poll confirm structure
00493  *
00494  * See IEEE standard 802.15.4-2006 (table 77) for more details
00495  */
00496 typedef struct mlme_poll_conf_s {
00497     uint8_t status;             /**< Status of Poll operation */
00498 } mlme_poll_conf_t;
00499 
00500 #endif /* MLME_H_ */