mbed-os
Dependents: cobaLCDJoyMotor_Thread odometry_omni_3roda_v3 odometry_omni_3roda_v1 odometry_omni_3roda_v2 ... more
TESTS/network/wifi/wifi_tests.h@0:b74591d5ab33, 2017-12-11 (annotated)
- Committer:
- be_bryan
- Date:
- Mon Dec 11 17:54:04 2017 +0000
- Revision:
- 0:b74591d5ab33
motor ++
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
be_bryan | 0:b74591d5ab33 | 1 | #ifndef WIFI_TESTS_H |
be_bryan | 0:b74591d5ab33 | 2 | #define WIFI_TESTS_H |
be_bryan | 0:b74591d5ab33 | 3 | |
be_bryan | 0:b74591d5ab33 | 4 | #include "WiFiInterface.h" |
be_bryan | 0:b74591d5ab33 | 5 | |
be_bryan | 0:b74591d5ab33 | 6 | /** Get WiFiInterface based on provided |
be_bryan | 0:b74591d5ab33 | 7 | * app_json. */ |
be_bryan | 0:b74591d5ab33 | 8 | WiFiInterface *get_interface(void); |
be_bryan | 0:b74591d5ab33 | 9 | |
be_bryan | 0:b74591d5ab33 | 10 | /* |
be_bryan | 0:b74591d5ab33 | 11 | * Test cases |
be_bryan | 0:b74591d5ab33 | 12 | */ |
be_bryan | 0:b74591d5ab33 | 13 | |
be_bryan | 0:b74591d5ab33 | 14 | /** Test that constructor of the driver works. */ |
be_bryan | 0:b74591d5ab33 | 15 | void wifi_constructor(void); |
be_bryan | 0:b74591d5ab33 | 16 | |
be_bryan | 0:b74591d5ab33 | 17 | /** This test case is to test whether the driver accepts valid credentials and reject ones that are not valid. */ |
be_bryan | 0:b74591d5ab33 | 18 | void wifi_set_credential(void); |
be_bryan | 0:b74591d5ab33 | 19 | |
be_bryan | 0:b74591d5ab33 | 20 | /** Test validity of WiFiInterface::set_channel(). */ |
be_bryan | 0:b74591d5ab33 | 21 | void wifi_set_channel(void); |
be_bryan | 0:b74591d5ab33 | 22 | |
be_bryan | 0:b74591d5ab33 | 23 | /** Test WiFiInterface::get_rssi() API. |
be_bryan | 0:b74591d5ab33 | 24 | * When connected, it should return valid RSSI value. When unconnected it should return 0. */ |
be_bryan | 0:b74591d5ab33 | 25 | void wifi_get_rssi(void); |
be_bryan | 0:b74591d5ab33 | 26 | |
be_bryan | 0:b74591d5ab33 | 27 | /** Test WiFiInterface::connect(ssid, pass, security, channel) with NULL parameters */ |
be_bryan | 0:b74591d5ab33 | 28 | void wifi_connect_params_null(void); |
be_bryan | 0:b74591d5ab33 | 29 | |
be_bryan | 0:b74591d5ab33 | 30 | /** Test WiFiInterface::connect(ssid, pass, security) with valid parameters for unsecure network */ |
be_bryan | 0:b74591d5ab33 | 31 | void wifi_connect_params_valid_unsecure(void); |
be_bryan | 0:b74591d5ab33 | 32 | |
be_bryan | 0:b74591d5ab33 | 33 | /** Test WiFiInterface::connect(ssid, pass, security) with valid parameters for secure network */ |
be_bryan | 0:b74591d5ab33 | 34 | void wifi_connect_params_valid_secure(void); |
be_bryan | 0:b74591d5ab33 | 35 | |
be_bryan | 0:b74591d5ab33 | 36 | /** Test WiFiInterface::connect(ssid, pass, security, channel) with valid parameters for secure network using channel specified. */ |
be_bryan | 0:b74591d5ab33 | 37 | void wifi_connect_params_channel(void); |
be_bryan | 0:b74591d5ab33 | 38 | |
be_bryan | 0:b74591d5ab33 | 39 | /** Test WiFiInterface::connect(ssid, pass, security, channel) with valid parameters for secure network using wrong channel number. */ |
be_bryan | 0:b74591d5ab33 | 40 | void wifi_connect_params_channel_fail(void); |
be_bryan | 0:b74591d5ab33 | 41 | |
be_bryan | 0:b74591d5ab33 | 42 | /** Test WiFiInterface::connect() without parameters. Use set_credentials() for setting parameters. */ |
be_bryan | 0:b74591d5ab33 | 43 | void wifi_connect(void); |
be_bryan | 0:b74591d5ab33 | 44 | |
be_bryan | 0:b74591d5ab33 | 45 | /** Test WiFiInterface::connect() without parameters. Don't set parameters with set_credentials() */ |
be_bryan | 0:b74591d5ab33 | 46 | void wifi_connect_nocredentials(void); |
be_bryan | 0:b74591d5ab33 | 47 | |
be_bryan | 0:b74591d5ab33 | 48 | /** Test WiFiInterface::connect() without parameters. Use secure settings for set_credentials. */ |
be_bryan | 0:b74591d5ab33 | 49 | void wifi_connect_secure(void); |
be_bryan | 0:b74591d5ab33 | 50 | |
be_bryan | 0:b74591d5ab33 | 51 | /** Test WiFiInterface::connect() failing with wrong password. */ |
be_bryan | 0:b74591d5ab33 | 52 | void wifi_connect_secure_fail(void); |
be_bryan | 0:b74591d5ab33 | 53 | |
be_bryan | 0:b74591d5ab33 | 54 | /** Test WiFiInterface::connect() - disconnect() repeatition works. */ |
be_bryan | 0:b74591d5ab33 | 55 | void wifi_connect_disconnect_repeat(void); |
be_bryan | 0:b74591d5ab33 | 56 | |
be_bryan | 0:b74591d5ab33 | 57 | /** Call WiFiInterface::scan() with null parameters to get number of networks available. */ |
be_bryan | 0:b74591d5ab33 | 58 | void wifi_scan_null(void); |
be_bryan | 0:b74591d5ab33 | 59 | |
be_bryan | 0:b74591d5ab33 | 60 | /** Call WiFiInterface::scan() with valid accesspoint list allocated */ |
be_bryan | 0:b74591d5ab33 | 61 | void wifi_scan(void); |
be_bryan | 0:b74591d5ab33 | 62 | |
be_bryan | 0:b74591d5ab33 | 63 | #endif //WIFI_TESTS_H |