Mistake on this page?
Report an issue in GitHub or email us
wifi_tests.h
1 /*
2  * Copyright (c) 2018-2019, Arm Limited and affiliates.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef WIFI_TESTS_H
18 #define WIFI_TESTS_H
19 
20 #include "WiFiInterface.h"
21 
22 /** Get WiFiInterface based on provided
23  * app_json. */
24 WiFiInterface *get_interface(void);
25 
26 /**
27  * Get security protocol to be used
28  */
29 nsapi_security get_security(void);
30 
31 /*
32  * Test cases
33  */
34 
35 /** Test that constructor of the driver works. */
36 void wifi_constructor(void);
37 
38 /** This test case is to test whether the driver accepts valid credentials and reject ones that are not valid. */
39 void wifi_set_credential(void);
40 
41 /** Test validity of WiFiInterface::set_channel(). */
42 void wifi_set_channel(void);
43 
44 /** Test WiFiInterface::get_rssi() API.
45  * When connected, it should return valid RSSI value. When unconnected it should return 0. */
46 void wifi_get_rssi(void);
47 
48 /** Test WiFiInterface::connect(ssid, pass, security, channel) with NULL parameters */
49 void wifi_connect_params_null(void);
50 
51 /** Test WiFiInterface::connect(ssid, pass, security) with valid parameters for unsecure network */
52 void wifi_connect_params_valid_unsecure(void);
53 
54 /** Test WiFiInterface::connect(ssid, pass, security) with valid parameters for secure network */
55 void wifi_connect_params_valid_secure(void);
56 
57 /** Test WiFiInterface::connect(ssid, pass, security, channel) with valid parameters for secure network using channel specified. */
58 void wifi_connect_params_channel(void);
59 
60 /** Test WiFiInterface::connect(ssid, pass, security, channel) with valid parameters for secure network using wrong channel number. */
61 void wifi_connect_params_channel_fail(void);
62 
63 /** Test WiFiInterface::connect() without parameters. Use set_credentials() for setting parameters. */
64 void wifi_connect(void);
65 
66 /** Test WiFiInterface::connect() without parameters. Don't set parameters with set_credentials() */
67 void wifi_connect_nocredentials(void);
68 
69 /** Test WiFiInterface::connect() without parameters. Use secure settings for set_credentials. */
70 void wifi_connect_secure(void);
71 
72 /** Test WiFiInterface::connect() failing with wrong password. */
73 void wifi_connect_secure_fail(void);
74 
75 /** Test WiFiInterface::connect() - disconnect() repeatition works. */
76 void wifi_connect_disconnect_repeat(void);
77 
78 /** Call WiFiInterface::scan() with null parameters to get number of networks available. */
79 void wifi_scan_null(void);
80 
81 /** Call WiFiInterface::scan() with valid accesspoint list allocated */
82 void wifi_scan(void);
83 
84 #endif //WIFI_TESTS_H
Common interface between Wi-Fi devices.
Definition: WiFiInterface.h:31
nsapi_security
Enum of encryption types.
Definition: nsapi_types.h:120
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.