Easyuino  1.2.0
Easyuino::SMS Class Reference

Represents a SMS object used to send and receive it from the GSMService API. More...

#include <SMS.h>

Public Member Functions

 SMS (IN unsigned long number, IN const char *message, IN unsigned int countryPrefixCode=351)
 Constructor. More...
 
 SMS (IN unsigned int countryPrefixCode=351)
 Create an empty SMS. More...
 
unsigned int getCountryPrefixCode ()
 Get the country prefix code associated with the SMS. More...
 
void setCountryPrefixCode (IN unsigned int newCountryPrefixCode)
 Set the country prefix code associated with the SMS. More...
 
unsigned long getNumber ()
 Get the number associated with the SMS. More...
 
void setNumber (IN unsigned long newNumber)
 Set the number of the SMS. More...
 
const char * getMessage ()
 Get the message associated with the SMS. More...
 
void setMessage (IN const char *newMessage)
 Set the message of the SMS. More...
 
void reset ()
 Resets the message to empty, phone number to zero and the country prefix code to 0.
 

Detailed Description

Represents a SMS object used to send and receive it from the GSMService API.

Constructor & Destructor Documentation

◆ SMS() [1/2]

Easyuino::SMS::SMS ( IN unsigned long  number,
IN const char *  message,
IN unsigned int  countryPrefixCode = 351 
)

Constructor.

Parameters
numberNumber of sender or receiver
messageMessage content
countryPrefixCodeCountry prefix code of the message. Default value is 351 (Portugal Code)

◆ SMS() [2/2]

Easyuino::SMS::SMS ( IN unsigned int  countryPrefixCode = 351)

Create an empty SMS.

Parameters
countryPrefixCodeCountry prefix code of the message. Default value is 351 (Portugal Code)

Member Function Documentation

◆ getCountryPrefixCode()

unsigned int Easyuino::SMS::getCountryPrefixCode ( )

Get the country prefix code associated with the SMS.

Returns
countryPrefixCode Code associated with the SMS OR 0 if it was impossible to obtain the prefix code.

◆ getMessage()

const char* Easyuino::SMS::getMessage ( )

Get the message associated with the SMS.

Returns
message Message content associated with the SMS

◆ getNumber()

unsigned long Easyuino::SMS::getNumber ( )

Get the number associated with the SMS.

Returns
number Phone number associated with the SMS

◆ setCountryPrefixCode()

void Easyuino::SMS::setCountryPrefixCode ( IN unsigned int  newCountryPrefixCode)

Set the country prefix code associated with the SMS.

Valid numbers are in range [0,999].

Parameters
newCountryPrefixCodeNew country prefix code to the SMS

◆ setMessage()

void Easyuino::SMS::setMessage ( IN const char *  newMessage)

Set the message of the SMS.

Parameters
newMessageThe new message to be set on the SMS

◆ setNumber()

void Easyuino::SMS::setNumber ( IN unsigned long  newNumber)

Set the number of the SMS.

Parameters
newNumberThe new phone number to be set on the SMS

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