-
Notifications
You must be signed in to change notification settings - Fork 0
/
u_cx_diagnostics.h
180 lines (163 loc) · 7.12 KB
/
u_cx_diagnostics.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/*
* This file was automatically generated using csnake v0.3.5.
*
* This file should not be edited directly, any changes will be
* overwritten next time the script is run.
*
* Source code for csnake is available at:
* https://gitlab.com/andrejr/csnake
*
* csnake is also available on PyPI, at :
* https://pypi.org/project/csnake
*/
#ifndef _U_CX_DIAGNOSTICS_H_
#define _U_CX_DIAGNOSTICS_H_
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "u_cx_types.h"
#include "u_cx.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* ------------------------------------------------------------
* RESPONSES
* ---------------------------------------------------------- */
/* ------------------------------------------------------------
* PUBLIC FUNCTIONS
* ---------------------------------------------------------- */
/**
* Sends a ping command to a destination address every second, repeating it (count) times.
*
* Output AT command:
* > AT+UDGP=<destination>
*
* @param[in] puCxHandle: uCX API handle
* @param destination: Destination host to send a ping call to in the form of an IPv4 address (i.e. 192.168.1.10)
* or hostname (i.e. www.u-blox.com).
*/
int32_t uCxDiagnosticsPing1(uCxHandle_t * puCxHandle, const char * destination);
/**
* Sends a ping command to a destination address every second, repeating it (count) times.
*
* Output AT command:
* > AT+UDGP=<destination>,<count>
*
* @param[in] puCxHandle: uCX API handle
* @param destination: Destination host to send a ping call to in the form of an IPv4 address (i.e. 192.168.1.10)
* or hostname (i.e. www.u-blox.com).
* @param count: The number of pings (or packets) that will be transmitted. 0 means ping continuously.
*/
int32_t uCxDiagnosticsPing2(uCxHandle_t * puCxHandle, const char * destination, int32_t count);
/**
* This command will stop any ping in progress.
* Please note the command is asynchronous, and the ping will not be interrupted immediately,
* but right after the next ping packet has a response, which might take a few seconds if the packet response times out.
* This command always returns OK and does nothing if there is no ping in progress.
*
* Output AT command:
* > AT+UDGSP
*
* @param[in] puCxHandle: uCX API handle
*/
int32_t uCxDiagnosticsPingStop(uCxHandle_t * puCxHandle);
/**
* Start/stop IPERF 2 server/client
*
* Output AT command:
* > AT+UDGI=<iperf_action>,<protocol_type>
*
* @param[in] puCxHandle: uCX API handle
* @param iperf_action: Action
* @param protocol_type: IP protocol
*/
int32_t uCxDiagnosticsIperf2(uCxHandle_t * puCxHandle, uIperfAction_t iperf_action, uProtocolType_t protocol_type);
/**
* Start/stop IPERF 2 server/client
*
* Output AT command:
* > AT+UDGI=<iperf_action>,<protocol_type>,<role>,<port>,<report_interval>
*
* @param[in] puCxHandle: uCX API handle
* @param iperf_action: Action
* @param protocol_type: IP protocol
* @param role: Role
* @param port: Port
* @param report_interval: Report interval
*/
int32_t uCxDiagnosticsIperf5(uCxHandle_t * puCxHandle, uIperfAction_t iperf_action, uProtocolType_t protocol_type, uRole_t role, int32_t port, int32_t report_interval);
/**
* Start/stop IPERF 2 server/client
*
* Output AT command:
* > AT+UDGI=<iperf_action>,<protocol_type>,<role>,<port>,<report_interval>,<time_boundary>,<ip_addr>
*
* @param[in] puCxHandle: uCX API handle
* @param iperf_action: Action
* @param protocol_type: IP protocol
* @param role: Role
* @param port: Port
* @param report_interval: Report interval
* @param time_boundary: Time boundary. Client only. Ignored if role is server
* @param ip_addr: IP address to connect to. Client only. Ignored if role is server
*/
int32_t uCxDiagnosticsIperf7(uCxHandle_t * puCxHandle, uIperfAction_t iperf_action, uProtocolType_t protocol_type, uRole_t role, int32_t port, int32_t report_interval, int32_t time_boundary, uSockIpAddress_t * ip_addr);
/**
* Start/stop IPERF 2 server/client
*
* Output AT command:
* > AT+UDGI=<iperf_action>,<protocol_type>,<role>,<port>,<report_interval>,<time_boundary>,<ip_addr>,<length>
*
* @param[in] puCxHandle: uCX API handle
* @param iperf_action: Action
* @param protocol_type: IP protocol
* @param role: Role
* @param port: Port
* @param report_interval: Report interval
* @param time_boundary: Time boundary. Client only. Ignored if role is server
* @param ip_addr: IP address to connect to. Client only. Ignored if role is server
* @param length: Size of packets.
*/
int32_t uCxDiagnosticsIperf8(uCxHandle_t * puCxHandle, uIperfAction_t iperf_action, uProtocolType_t protocol_type, uRole_t role, int32_t port, int32_t report_interval, int32_t time_boundary, uSockIpAddress_t * ip_addr, int32_t length);
/**
* Start/stop IPERF 2 server/client
*
* Output AT command:
* > AT+UDGI=<iperf_action>,<protocol_type>,<role>,<port>,<report_interval>,<time_boundary>,<ip_addr>,<length>,<bandwidth>
*
* @param[in] puCxHandle: uCX API handle
* @param iperf_action: Action
* @param protocol_type: IP protocol
* @param role: Role
* @param port: Port
* @param report_interval: Report interval
* @param time_boundary: Time boundary. Client only. Ignored if role is server
* @param ip_addr: IP address to connect to. Client only. Ignored if role is server
* @param length: Size of packets.
* @param bandwidth: Bandwidth to be used for UDP
*/
int32_t uCxDiagnosticsIperf9(uCxHandle_t * puCxHandle, uIperfAction_t iperf_action, uProtocolType_t protocol_type, uRole_t role, int32_t port, int32_t report_interval, int32_t time_boundary, uSockIpAddress_t * ip_addr, int32_t length, int32_t bandwidth);
/**
* Start/stop IPERF 2 server/client
*
* Output AT command:
* > AT+UDGI=<iperf_action>,<protocol_type>,<role>,<port>,<report_interval>,<time_boundary>,<ip_addr>,<length>,<bandwidth>,
* <bidirectional>
*
* @param[in] puCxHandle: uCX API handle
* @param iperf_action: Action
* @param protocol_type: IP protocol
* @param role: Role
* @param port: Port
* @param report_interval: Report interval
* @param time_boundary: Time boundary. Client only. Ignored if role is server
* @param ip_addr: IP address to connect to. Client only. Ignored if role is server
* @param length: Size of packets.
* @param bandwidth: Bandwidth to be used for UDP
* @param bidirectional: Bidirectional flag. Client only. Ignored if role is server
*/
int32_t uCxDiagnosticsIperf10(uCxHandle_t * puCxHandle, uIperfAction_t iperf_action, uProtocolType_t protocol_type, uRole_t role, int32_t port, int32_t report_interval, int32_t time_boundary, uSockIpAddress_t * ip_addr, int32_t length, int32_t bandwidth, uBidirectional_t bidirectional);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _U_CX_DIAGNOSTICS_H_ */