Base library for cellular modem implementations

Dependencies:   Socket lwip-sys lwip

Dependents:   CellularUSBModem CellularUSBModem

Embed: (wiki syntax)

« Back to documentation index

GSMSMSInterface Class Reference

GSMSMSInterface Class Reference

Component to use the Short Messages Service (SMS) More...

#include <GSMSMSInterface.h>

Inherits ISMSInterface, IATCommandsProcessor, and IATEventsHandler.

Public Member Functions

 GSMSMSInterface (ATCommandsInterface *pIf)
 Create SMSInterface instance.
virtual int init ()
 Initialize interface Configure SMS commands & register for SMS-related unsolicited result codes.
virtual int send (const char *number, const char *message)
 Send a SM.
virtual int get (char *number, char *message, size_t maxLength)
 Receive a SM.
virtual int getCount (size_t *pCount)
 Get the number of SMs in the incoming box.

Friends

class ATCommandsInterface
class ATCommandsInterface

Detailed Description

Component to use the Short Messages Service (SMS)

Definition at line 28 of file GSMSMSInterface.h.


Constructor & Destructor Documentation

Create SMSInterface instance.

Parameters:
pIfPointer to the ATCommandsInterface instance to use

Definition at line 34 of file GSMSMSInterface.cpp.


Member Function Documentation

int get ( char *  number,
char *  message,
size_t  maxLength 
) [virtual]

Receive a SM.

Parameters:
numberPointer to a buffer to store the sender's phone number (must be at least 17 characters-long, including the space for the null-terminating char)
messagePointer to a buffer to store the the incoming message
maxLengthMaximum message length that can be stored in buffer (including null-terminating character)
Returns:
0 on success, error code on failure

Implements ISMSInterface.

Definition at line 110 of file GSMSMSInterface.cpp.

int getCount ( size_t *  pCount ) [virtual]

Get the number of SMs in the incoming box.

Parameters:
pCountpointer to store the number of unprocessed SMs on
Returns:
0 on success, error code on failure

Implements ISMSInterface.

Definition at line 200 of file GSMSMSInterface.cpp.

int init (  ) [virtual]

Initialize interface Configure SMS commands & register for SMS-related unsolicited result codes.

Implements ISMSInterface.

Definition at line 39 of file GSMSMSInterface.cpp.

int send ( const char *  number,
const char *  message 
) [virtual]

Send a SM.

Parameters:
numberThe receiver's phone number
messageThe message to send
Returns:
0 on success, error code on failure

Implements ISMSInterface.

Definition at line 78 of file GSMSMSInterface.cpp.