Chuck Swiger / WNCInterface2

Dependencies:   WncControllerK64F

Fork of WNCInterface by Avnet

Embed: (wiki syntax)

« Back to documentation index

WNCSms Class Reference

WNCSms Class Reference

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

#include <IOTSMS.h>

Public Member Functions

int init (uint32_t poll=0, void((*cb)(WNCSmsMsg &s))=NULL)
 Create SMSInterface instance.
int send (const string &number, const string &message)
 Send a SM.
int get (string &number, string &message)
 Receive a SM.
char * getSMSNbr (void)
 Get the users number to use for SMS messaging.
void attach (void(*fp)(WNCSmsMsg &s))
 Attached a callback function for a Receive SMS.

Detailed Description

Component to use the Short Messages Service (SMS)

Definition at line 43 of file IOTSMS.h.


Member Function Documentation

void attach ( void(*)(WNCSmsMsg &s)  fp )

Attached a callback function for a Receive SMS.

Parameters:
fp(string&)a function that takes a string as an input argument

Definition at line 86 of file IOTSMS.h.

int get ( string &  number,
string &  message 
)

Receive a SM.

Parameters:
stringPointer to the sender's phone number
stringPointer to store the the incoming message into
Returns:
0 on success, error code on failure

Definition at line 136 of file IOTSMS.cpp.

char * getSMSNbr ( void   )

Get the users number to use for SMS messaging.

Parameters:
none
Returns:
character pointer on success, NULL on failure

Definition at line 148 of file IOTSMS.cpp.

int init ( uint32_t  poll = 0,
void((*cb)(WNCSmsMsg &s))  = NULL 
)

Create SMSInterface instance.

Initialize interface

int send ( const string &  number,
const string &  message 
)

Send a SM.

Parameters:
string&receiver's contact number
string&the message to send
Returns:
0 on success, error code on failure

Definition at line 114 of file IOTSMS.cpp.