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
mac_mlme.h
00001 /* 00002 * Copyright (c) 2014-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 /* 00019 * \file mac_mlme.h 00020 * \brief Add short description about this file!!! 00021 * 00022 */ 00023 00024 #ifndef MAC_MLME_H_ 00025 #define MAC_MLME_H_ 00026 00027 //TODO: Check if these are in correct place 00028 #include "net_interface.h" 00029 00030 struct nwk_scan_params; 00031 struct nwk_filter_params; 00032 struct protocol_interface_rf_mac_setup; 00033 struct arm_event_s; 00034 struct arm_device_driver_list; 00035 struct mlme_poll_s; 00036 struct mlme_beacon_ind_s; 00037 struct mlme_reset_s; 00038 struct mlme_scan_s; 00039 struct mlme_start_s; 00040 struct mlme_get_conf_s; 00041 struct mlme_set_s; 00042 struct channel_list_s; 00043 00044 void mac_mlme_scan_confirmation_handle(struct protocol_interface_rf_mac_setup *rf_ptr); 00045 00046 /** 00047 * MLME Scan Request 00048 * 00049 */ 00050 void mac_mlme_scan_request(const struct mlme_scan_s *msg, struct protocol_interface_rf_mac_setup *rf_mac_setup); 00051 /** 00052 * MLME Start Request 00053 * 00054 */ 00055 int8_t mac_mlme_start_req(const struct mlme_start_s *s, struct protocol_interface_rf_mac_setup *rf_mac_setup); 00056 /** 00057 * MLME Reset Request 00058 * 00059 */ 00060 int8_t mac_mlme_reset(struct protocol_interface_rf_mac_setup *rf_mac_setup, const struct mlme_reset_s *reset); 00061 00062 int8_t mac_mlme_set_req(struct protocol_interface_rf_mac_setup *rf_mac_setup, const struct mlme_set_s *set_req); 00063 00064 int8_t mac_mlme_get_req(struct protocol_interface_rf_mac_setup *rf_mac_setup, struct mlme_get_conf_s *get_req); 00065 00066 void mac_extended_mac_set(struct protocol_interface_rf_mac_setup *rf_mac_setup, const uint8_t *mac64); 00067 00068 /** 00069 * MLME Poll Request 00070 * 00071 */ 00072 void mac_mlme_poll_req(struct protocol_interface_rf_mac_setup *cur, const struct mlme_poll_s *poll_req); 00073 00074 void mac_mlme_poll_process_confirm(struct protocol_interface_rf_mac_setup *rf_mac_setup, uint8_t status); 00075 00076 /** 00077 * Radio Disable and enable functions 00078 */ 00079 void mac_mlme_mac_radio_disabled(struct protocol_interface_rf_mac_setup *rf_mac_setup); 00080 void mac_mlme_mac_radio_enable(struct protocol_interface_rf_mac_setup *rf_mac_set); 00081 00082 /** 00083 * Initialize MAC channel selection sequence 00084 * 00085 * TODO: initialize channel select sequence 00086 * in coordinator mode 00087 * 00088 * \param new_channel channel to set 00089 * 00090 * \return 0 success 00091 * \return -1 HW error 00092 */ 00093 int8_t mac_mlme_rf_channel_change(struct protocol_interface_rf_mac_setup *rf_mac_setup, uint8_t new_channel); 00094 00095 void mac_mlme_active_scan_response_timer_start(void *interface); 00096 00097 /** 00098 * @brief mac_mlme_beacon_notify Function which is called every time a beacon is received 00099 * @param rf_mac_setup Current MAC setup 00100 * @param data Reference to beacon data 00101 * @return 00102 */ 00103 int mac_mlme_beacon_notify(struct protocol_interface_rf_mac_setup *rf_mac_setup, struct mlme_beacon_ind_s *data); 00104 00105 void mac_mlme_event_cb(void *mac_ptr); 00106 00107 void mac_mlme_set_active_state(struct protocol_interface_rf_mac_setup *entry, bool new_state); 00108 00109 struct protocol_interface_rf_mac_setup *mac_mlme_data_base_allocate(uint8_t *mac64, struct arm_device_driver_list *dev_driver, struct mac_description_storage_size_s *storage_sizes); 00110 void mac_mlme_data_base_deallocate(struct protocol_interface_rf_mac_setup *rf_mac); 00111 00112 uint8_t mac_mlme_set_new_sqn(struct protocol_interface_rf_mac_setup *rf_setup); 00113 uint8_t mac_mlme_set_new_beacon_sqn(struct protocol_interface_rf_mac_setup *rf_setup); 00114 00115 uint16_t mac_mlme_get_panid(struct protocol_interface_rf_mac_setup *rf_setup); 00116 00117 void mac_frame_src_address_set_from_interface(uint8_t SrcAddrMode, struct protocol_interface_rf_mac_setup *rf_ptr, uint8_t *addressPtr); 00118 00119 int8_t mac_mlme_beacon_tx(struct protocol_interface_rf_mac_setup *rf_ptr); 00120 uint8_t mac_mlme_beacon_req_tx(struct protocol_interface_rf_mac_setup *rf_ptr); 00121 int8_t mac_mlme_virtual_confirmation_handle(int8_t driver_id, const uint8_t *data_ptr, uint16_t length); 00122 00123 uint16_t mlme_scan_analyze_next_channel(struct channel_list_s *mac_channel_list, bool clear_channel); 00124 00125 #endif /* MAC_MLME_H_ */
Generated on Tue Jul 12 2022 13:54:31 by
1.7.2