Skip to content

Commit b7fb9d7

Browse files
fixed javadocs documentation
1 parent 5344f32 commit b7fb9d7

File tree

3 files changed

+58
-12
lines changed

3 files changed

+58
-12
lines changed

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vscode/*
2+
.github/*
3+
.DS_Store

Diff for: src/ArduinoCellular.h

+32-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* @file ArduinoCellular.h
3+
* @brief Header file for the ArduinoCellular library.
4+
*
5+
* This library provides methods to interact with the Arduino Pro Modem, such as connecting to the network,
6+
* sending SMS messages, getting GPS location, and more.
7+
*/
8+
19
#ifndef ARDUINO_CELLULAR_MODEM_H
210
#define ARDUINO_CELLULAR_MODEM_H
311

@@ -18,34 +26,50 @@ enum ModemModel {
1826
Unsupported
1927
};
2028

29+
/**
30+
* Represents an SMS message.
31+
*/
2132
class SMS {
2233
public:
23-
String number;
24-
String message;
25-
Time timestamp;
34+
String number; /**< The phone number associated with the SMS. */
35+
String message; /**< The content of the SMS message. */
36+
Time timestamp; /**< The timestamp when the SMS was received. */
2637

38+
/**
39+
* Default constructor for SMS.
40+
* Initializes the number, message, and timestamp to empty values.
41+
*/
2742
SMS() {
2843
this->number = "";
2944
this->message = "";
3045
this->timestamp = Time();
3146
}
3247

48+
/**
49+
* Constructor for SMS.
50+
* @param number The phone number associated with the SMS.
51+
* @param message The content of the SMS message.
52+
* @param timestamp The timestamp when the SMS was received.
53+
*/
3354
SMS(String number, String message, Time timestamp) {
3455
this->number = number;
3556
this->message = message;
3657
this->timestamp = timestamp;
3758
}
3859
};
39-
// TODO: move time implementation to Time class
4060

61+
62+
/**
63+
* @struct Location
64+
* @brief Represents a geographic location with latitude and longitude coordinates.
65+
*/
4166
struct Location {
42-
float latitude;
43-
float longitude;
67+
float latitude; /**< The latitude coordinate of the location. */
68+
float longitude; /**< The longitude coordinate of the location. */
4469
};
4570

4671
/**
47-
* @class ArduinoPro_Modem
48-
* @brief Represents an Arduino Pro Modem.
72+
* @class ArduinoCellular
4973
*
5074
* This class provides methods to interact with the Arduino Pro Modem, such as connecting to the network,
5175
* sending SMS messages, getting GPS location, and more.

Diff for: src/ModemInterface.h

+23-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* @file ModemInterface.h
3+
* @brief Header file for the ModemInterface class.
4+
*/
5+
16
#ifndef ARDUINO_4G_MODULE_H
27
#define ARDUINO_4G_MODULE_H
38

@@ -12,11 +17,26 @@
1217
#include <TinyGsmClient.h>
1318
#include <ArduinoHttpClient.h>
1419

20+
/**
21+
* @class ModemInterface
22+
* @brief Represents the interface to the 4G modem module.
23+
*/
1524
class ModemInterface : public TinyGsmBG96 {
1625
public:
26+
/**
27+
* @brief Constructor for the ModemInterface class.
28+
* @param stream The stream object for communication with the modem.
29+
* @param power_pin The pin number for controlling the power of the modem.
30+
*/
1731
explicit ModemInterface(Stream& stream, int power_pin) : TinyGsmBG96(stream),stream(&stream),power_pin(power_pin) {
1832

1933
};
34+
35+
/**
36+
* @brief Initializes the modem interface.
37+
* @param pin The PIN code for the SIM card (optional).
38+
* @return True if initialization is successful, false otherwise.
39+
*/
2040
bool init(const char* pin = NULL) {
2141
pinMode(power_pin, OUTPUT);
2242
digitalWrite(power_pin, HIGH);
@@ -31,13 +51,12 @@ class ModemInterface : public TinyGsmBG96 {
3151
#endif
3252
return TinyGsmBG96::init();
3353
};
54+
3455
public:
35-
Stream* stream;
36-
int power_pin;
56+
Stream* stream; /**< The stream object for communication with the modem. */
57+
int power_pin; /**< The pin number for controlling the power of the modem. */
3758
};
3859

3960
extern ModemInterface modem;
4061

41-
42-
4362
#endif

0 commit comments

Comments
 (0)