20
20
#include < ModemInterface.h>
21
21
#include < TimeUtils.h>
22
22
23
+ /* *
24
+ * @enum ModemModel
25
+ * @brief Represents the model of the modem.
26
+ */
23
27
enum ModemModel {
24
- EC200,
25
- EG95,
26
- Unsupported
28
+ EC200, /* *< Quectel EC200 modem. */
29
+ EG95, /* *< Quectel EG95 modem. */
30
+ Unsupported /* *< Unsupported modem model. */
27
31
};
28
32
29
33
/* *
@@ -124,6 +128,7 @@ class ArduinoCellular {
124
128
/* *
125
129
* @brief Gets the cellular location. (Blocking call)
126
130
* @param timeout The timeout (In milliseconds) to wait for the cellular location.
131
+ * @return The cellular location. If the location is not retrieved, the latitude and longitude will be 0.0.
127
132
*/
128
133
Location getCellularLocation (unsigned long timeout = 10000 );
129
134
@@ -141,9 +146,8 @@ class ArduinoCellular {
141
146
142
147
/* *
143
148
* @brief Sends an SMS message to the specified number.
144
- * @param number The phone number to send the SMS to. (TODO: find out number format)
149
+ * @param number The phone number to send the SMS to.
145
150
* @param message The message to send.
146
- * @return True if the SMS is sent successfully, false otherwise.
147
151
*/
148
152
void sendSMS (String number, String message);
149
153
@@ -162,6 +166,7 @@ class ArduinoCellular {
162
166
/* *
163
167
* @brief Sends an AT command to the modem and waits for a response, then returns the response.
164
168
* @param command The AT command to send.
169
+ * @param timeout The timeout (In milliseconds) to wait for the response.
165
170
* @return The response from the modem.
166
171
*/
167
172
String sendATCommand (char * command, unsigned long timeout = 1000 );
@@ -187,9 +192,26 @@ class ArduinoCellular {
187
192
*/
188
193
HttpClient getHTTPClient (const char * server, const int port);
189
194
195
+ /* *
196
+ * @brief Gets the HTTPS client for the specified server and port.
197
+ * @param server The server address.
198
+ * @param port The server port.
199
+ * @return The HTTPS client.
200
+ */
190
201
HttpClient getHTTPSClient (const char * server, const int port);
202
+
203
+ /* *
204
+ * @brief Gets the local IP address.
205
+ * @return The local IP address.
206
+ */
207
+ IPAddress getIPAddress ();
208
+
209
+ /* *
210
+ * @brief Gets the signal quality.
211
+ * @return The signal quality.
212
+ */
213
+ int getSignalQuality ();
191
214
192
- void getConnectionStatus ();
193
215
private:
194
216
bool connectToGPRS (const char * apn, const char * gprsUser, const char * gprsPass);
195
217
@@ -217,7 +239,6 @@ class ArduinoCellular {
217
239
* @param latitude Pointer to store the latitude. (0.0 if not retrieved)
218
240
* @param longitude Pointer to store the longitude. (0.0 if not retrieved)
219
241
* @param timeout The timeout (In milliseconds) to wait for the GPS location.
220
- * @return True if the GPS location is retrieved, false otherwise.
221
242
*/
222
243
void getGPSLocation (float * latitude, float * longitude, unsigned long timeout = 60000 );
223
244
@@ -226,7 +247,7 @@ class ArduinoCellular {
226
247
227
248
ModemModel model; /* *< The modem model. */
228
249
229
- static unsigned long getTime ();
250
+ static unsigned long getTime (); /* * Callback for getting the current time as an unix timestamp. */
230
251
};
231
252
232
253
0 commit comments