31 lines
627 B
C++
31 lines
627 B
C++
#ifndef GSMMobileDevice_H
|
|
#define GSMMobileDevice_H
|
|
|
|
#include "GSMMobileData.h"
|
|
#include "SoftwareSerial.h"
|
|
|
|
class GSMMobileDevice
|
|
{
|
|
private:
|
|
SoftwareSerial _gsmSerial;
|
|
|
|
// Methods
|
|
|
|
void executeAtCommand(const String &atCommand);
|
|
String readStringSerialPort();
|
|
void sendSMSToGSM(GSMMobileData gsmData);
|
|
long _baudRate;
|
|
bool checkSMSError();
|
|
|
|
public:
|
|
// Constructor with no parameters
|
|
GSMMobileDevice(uint8_t pinRx, uint8_t pinTx, long baudRate) : _gsmSerial(pinRx, pinTx), _baudRate(baudRate)
|
|
{
|
|
}
|
|
|
|
// Methods
|
|
void init();
|
|
void sendSMS(GSMMobileData gsmData);
|
|
void end();
|
|
};
|
|
#endif // GSMDevice_H
|