Mistake on this page?
Report an issue in GitHub or email us
nidd_tests.h
1 /*
2  * Copyright (c) 2019, ARM Limited, All Rights Reserved
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License"); you may
6  * 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, WITHOUT
13  * 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 
18 #ifndef NIDD_TESTS_H
19 #define NIDD_TESTS_H
20 
21 #include "CellularNonIPSocket.h"
22 #include "CellularLog.h"
23 #include "../test_params.h"
24 
25 NetworkInterface *get_interface();
26 void drop_bad_packets(CellularNonIPSocket &sock, int orig_timeout);
27 bool check_oversized_packets(nsapi_error_t error, int &size);
28 void fill_tx_buffer_ascii(char *buff, size_t len);
29 void poll_pending_messages(CellularNonIPSocket &sock, int count);
30 
31 /**
32  * Single testcase might take only half of the remaining execution time
33  */
34 int split2half_rmng_nidd_test_time(); // [s]
35 
36 namespace nidd_global {
37 #ifdef MBED_GREENTEA_TEST_NIDDSOCKET_TIMEOUT_S
38 static const int TESTS_TIMEOUT = MBED_GREENTEA_TEST_NIDDSOCKET_TIMEOUT_S;
39 #else
40 static const int TESTS_TIMEOUT = (3 * 60);
41 #endif
42 static const int SOCKET_SEND_COUNT = 4;
43 }
44 
45 /*
46  * Test cases
47  */
48 void NIDDSOCKET_CONNECT();
49 void NIDDSOCKET_DISCONNECT();
50 void NIDDSOCKET_OPEN_CLOSE_REPEAT();
51 void NIDDSOCKET_OPEN_LIMIT();
52 void NIDDSOCKET_RECV_TIMEOUT();
53 void NIDDSOCKET_SEND_TIMEOUT();
54 void NIDDSOCKET_OPEN_DESTRUCT();
55 void NIDDSOCKET_OPEN_TWICE();
56 void NIDDSOCKET_SEND_INVALID();
57 void NIDDSOCKET_ECHOTEST_NONBLOCK();
58 void NIDDSOCKET_SEND_REPEAT();
59 
60 #endif //NIDD_TESTS_H
MBED_NORETURN void error(const char *format,...) MBED_PRINTF(1
To generate a fatal compile-time error, you can use the pre-processor error directive.
signed int nsapi_error_t
Type used to represent error codes.
Definition: nsapi_types.h:95
Common interface that is shared between network devices.
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.