Easyuino  1.2.0
Easyuino::GSMServiceSecure Class Reference

GSMServiceSecure extends the GSMService API allowing user to add phone numbers to accept calls and SMSs from this predefined set of numbers. More...

#include <GSMServiceSecure.h>

Inheritance diagram for Easyuino::GSMServiceSecure:
Easyuino::GSMService Easyuino::Device

Public Member Functions

 GSMServiceSecure (IN uint8_t txPin, IN uint8_t rxPin, IN uint8_t powerPin, IN Stream &outputStream)
 Constructor. More...
 
 GSMServiceSecure (IN uint8_t txPin, IN uint8_t rxPin, IN uint8_t powerPin)
 Constructor. More...
 
 ~GSMServiceSecure ()
 Destructor.
 
GSMRequestStatus addAllowedNumber (IN unsigned long phoneNumberToAdd)
 Add the phone number to the allowed numbers IF it doesn't exist yet. More...
 
GSMRequestStatus isAllowed (IN unsigned long phoneNumber, OUT bool &allowed)
 Verify if the phone number is in the list of allowed numbers. More...
 
GSMRequestStatus removeAllowedNumber (IN unsigned long phoneNumberToRemove)
 Remove the given number from the allowed numbers list (If exists there) More...
 
GSMRequestStatus clearAllowedNumbers ()
 Clear the list for allowed phone numbers ENABLING any number to Call and send SMS to the service and accept it. More...
 
GSMRequestStatus availableSMS (OUT SMS &message, OUT bool &smsRead)
 Check if there is a new received SMS. More...
 
- Public Member Functions inherited from Easyuino::GSMService
 GSMService (IN uint8_t txPin, IN uint8_t rxPin, IN uint8_t powerPin, IN Stream &outputStream)
 Constructor. More...
 
 GSMService (IN uint8_t txPin, IN uint8_t rxPin, IN uint8_t powerPin)
 Constructor. More...
 
 ~GSMService ()
 Destructor.
 
bool begin (IN unsigned long gsmModuleBaudRate)
 Initialize the GSMService API make it ready tor receive requests. More...
 
bool begin ()
 Initialize the GSMService API make it ready tor receive requests It uses the baud rate GSM_DEFAULT_BAUD_RATE to initialize the API. More...
 
void end ()
 Stops the GSMService API making it unable to receive more requests.
 
GSMRequestStatus turnOn ()
 Turns On the GSM module if it is turned Off. More...
 
GSMRequestStatus turnOff ()
 Turns Off the GSM module if it is turned On. More...
 
GSMRequestStatus isOn (OUT bool &isOn)
 Used to see if the GSM module is turned on or off. More...
 
GSMRequestStatus setBaudRate (IN unsigned long newBaudRate)
 Set the baud rate of the GSM module to a new one. More...
 
GSMRequestStatus beginListenForSMS ()
 Start listening for SMS reception. More...
 
GSMRequestStatus sendSMS (IN SMS &sms)
 Send a SMS through the GSM module. More...
 
GSMRequestStatus sendSMS (IN unsigned long phoneNumber, IN const char *message, IN unsigned int countryPrefixCode)
 Send a SMS through the GSM module. More...
 
GSMRequestStatus deleteAllSMS ()
 Delete all the sms in the GSM module. More...
 
GSMRequestStatus deleteAllReadSMS ()
 Detele all the messages that were received and read. More...
 
GSMRequestStatus deleteAllSentAndReadSMS ()
 Delete all the the messages that were received and read plus the sent ones. More...
 
- Public Member Functions inherited from Easyuino::Device
 Device ()
 Constructor called by every sub-classes.
 
 ~Device ()
 Destroy all the resources associated with the device.
 
bool isInitialized () const
 Verify is the device is initialized and ready to use. More...
 

Additional Inherited Members

- Protected Attributes inherited from Easyuino::Device
bool _isInitialized
 Used to know if the device API is initialized and ready to receive requests.
 

Detailed Description

GSMServiceSecure extends the GSMService API allowing user to add phone numbers to accept calls and SMSs from this predefined set of numbers.

See also
Devices Supported: SIM90x Series Chipset, SIM80x Chipset
Devices Tested: SIM900 Chipset

Constructor & Destructor Documentation

◆ GSMServiceSecure() [1/2]

Easyuino::GSMServiceSecure::GSMServiceSecure ( IN uint8_t  txPin,
IN uint8_t  rxPin,
IN uint8_t  powerPin,
IN Stream &  outputStream 
)

Constructor.

Parameters
txPinArduino pin used to send the serial information to GSM module
rxPinArduino pin used to receive the serial information from GSM module
powerPinArduino pin used to turn on and off the GSM module
outputStreamDebug output stream

◆ GSMServiceSecure() [2/2]

Easyuino::GSMServiceSecure::GSMServiceSecure ( IN uint8_t  txPin,
IN uint8_t  rxPin,
IN uint8_t  powerPin 
)

Constructor.

Parameters
txPinArduino pin used to send the serial information to GSM module
rxPinArduino pin used to receive the serial information from GSM module
powerPinArduino pin used to turn on and off the GSM module

Member Function Documentation

◆ addAllowedNumber()

GSMRequestStatus Easyuino::GSMServiceSecure::addAllowedNumber ( IN unsigned long  phoneNumberToAdd)

Add the phone number to the allowed numbers IF it doesn't exist yet.

Parameters
phoneNumberToAddPhone number to add to the allowed numbers
Returns
GSMRequestStatus (NOT_INITIALIZED, GSM_REQUEST_INVALID_ARGUMENT, GSM_OK, GSM_MAXIMUM_ALLOWED_NUMBERS_REACHED)

◆ availableSMS()

GSMRequestStatus Easyuino::GSMServiceSecure::availableSMS ( OUT SMS message,
OUT bool &  smsRead 
)
virtual

Check if there is a new received SMS.

If there is it filles the message with the content.

Parameters
messageMessage reference to be filled by the method if there is a new SMS.
smsReadFilled by the API. True: if a SMS was available. False: otherwise.
Returns
GSMRequestStatus (NOT_INITIALIZED, GSM_OK)

Reimplemented from Easyuino::GSMService.

◆ clearAllowedNumbers()

GSMRequestStatus Easyuino::GSMServiceSecure::clearAllowedNumbers ( )

Clear the list for allowed phone numbers ENABLING any number to Call and send SMS to the service and accept it.

Returns
GSMRequestStatus (NOT_INITIALIZED, GSM_OK)

◆ isAllowed()

GSMRequestStatus Easyuino::GSMServiceSecure::isAllowed ( IN unsigned long  phoneNumber,
OUT bool &  allowed 
)

Verify if the phone number is in the list of allowed numbers.

Parameters
phoneNumberNumber to verify
allowedFilled by the API. True: If the number is in allowed list or if the list is empty. False: Otherwise.
Returns
GSMRequestStatus (NOT_INITIALIZED, GSM_REQUEST_INVALID_ARGUMENT, GSM_OK)

◆ removeAllowedNumber()

GSMRequestStatus Easyuino::GSMServiceSecure::removeAllowedNumber ( IN unsigned long  phoneNumberToRemove)

Remove the given number from the allowed numbers list (If exists there)

Parameters
phoneNumberToRemoveNumber to remove from the allowed numbers
Returns
GSMRequestStatus (NOT_INITIALIZED, GSM_REQUEST_INVALID_ARGUMENT, GSM_OK)

The documentation for this class was generated from the following file: