Gleb Klochkov / Mbed OS Climatcontroll_Main

Dependencies:   esp8266-driver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CellularTests.h Source File

CellularTests.h

00001 /*
00002  * Copyright (c) 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 #ifndef CELLULAR_TESTS_H
00018 #define CELLULAR_TESTS_H
00019 
00020 #include "CellularUtil.h" // for CELLULAR_ helper macros
00021 #include "CellularTargets.h"
00022 
00023 #ifdef CELLULAR_DEVICE
00024 
00025 #include "mbed_events.h"
00026 
00027 #include "greentea-client/test_env.h"
00028 #include "unity.h"
00029 #include "utest.h"
00030 
00031 #include "CellularLog.h"
00032 
00033 #include CELLULAR_STRINGIFY(CELLULAR_DEVICE.h)
00034 extern EventQueue queue;
00035 extern CELLULAR_DEVICE cellularDevice;
00036 
00037 extern UARTSerial serial;
00038 extern CellularNetwork *network;
00039 
00040 extern CellularSMS *sms;
00041 extern CellularPower *pwr;
00042 extern CellularSIM *sim;
00043 
00044 
00045 /**
00046  * TEST CASES DEFINED HERE AND in main.cpp
00047  */
00048 
00049 // power
00050 void test_create_power(void);
00051 
00052 // SIM
00053 void test_get_sim_state(void);
00054 void test_set_pin(void);
00055 void test_change_pin(void);
00056 
00057 // sms
00058 void test_sms_init(void);
00059 
00060 // network
00061 void test_attach(void);
00062 void test_connect(void);
00063 void test_get_ip_address(void);
00064 void test_disconnect(void);
00065 
00066 // stack
00067 void test_socket_open(void);
00068 void test_socket_bind(void);
00069 /*
00070 void test_socket_set_blocking();
00071 void test_socket_send_receive_blocking();
00072 */
00073 void test_socket_set_non_blocking();
00074 void test_socket_send_receive_non_blocking();
00075 void test_socket_close(void);
00076 
00077 // Test closing all interface via device
00078 void test_close_interfaces(void);
00079 
00080 #endif // CELLULAR_DEVICE
00081 
00082 #endif // CELLULAR_TESTS_H