• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: wifi_linked_info.h 的头文件
15  */
16 
17 
18 /**
19 * @defgroup middleware_service_wifi_linked_info WiFi Linked Info
20 * @ingroup middleware_service_wifi
21 * @{
22 */
23 
24 #ifndef SERVICE_WIFI_LINKED_INFO_H
25 #define SERVICE_WIFI_LINKED_INFO_H
26 #include "wifi_device_config.h"
27 
28 #ifdef __cplusplus
29 #if __cplusplus
30 extern "C" {
31 #endif
32 #endif
33 
34 /**
35  * @if Eng
36  * @brief  WiFi connection states.
37  * @else
38  * @brief  WiFi的连接状态。
39  * @endif
40  */
41 typedef enum {
42     WIFI_DISCONNECTED,  /*!< @if Eng Disconnected.
43                              @else   断连。  @endif */
44     WIFI_CONNECTED,     /*!< @if Eng Connected.
45                              @else   已连接。  @endif */
46     WIFI_CONNECTING,    /*!< @if Eng Connecting.
47                              @else   连接中。  @endif */
48     WIFI_CONN_STATUS_BUTT,
49 } wifi_conn_state_enum;
50 
51 /**
52  * @if Eng
53  * @brief  The information about the AP connected to this station.
54  * @else
55  * @brief  有关连接到此STA的AP信息。
56  * @endif
57  */
58 typedef struct {
59     int8_t ssid[WIFI_MAX_SSID_LEN];     /*!< @if Eng Service set ID (SSID).
60                                              @else   SSID。  @endif */
61     uint8_t bssid[WIFI_MAC_LEN];        /*!< @if Eng Basic service set ID (BSSID).
62                                              @else   BSSID。  @endif */
63     int8_t wpa_state;                   /*!< @if Eng Wpa state when disconnected.
64                                              @else   断连时wpa状态  @endif */
65     int32_t rssi;                       /*!< @if Eng Received signal strength indicator (RSSI).
66                                              @else   RSSI。  @endif */
67     int32_t channel_num;                /*!< @if Eng WiFi channel_num information of AP.
68                                              @else   AP的WiFi信道信息。  @endif */
69     int32_t snr;                        /*!< @if Eng WiFi snr information of AP.
70                                              @else   AP的WiFi信噪比信息。  @endif */
71     wifi_conn_state_enum conn_state;    /*!< @if Eng WiFi connection state.
72                                              @else   WiFi的连接状态。  @endif */
73 } wifi_linked_info_stru;
74 
75 #ifdef __cplusplus
76 #if __cplusplus
77 }
78 #endif
79 #endif
80 
81 #endif // SERVICE_WIFI_LINKED_INFO_H
82 /** @} */
83