Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

omSmsManager Class Reference
[GENERIC LIBRARY classes]

#include <omSmsManager.h>


Public Member Functions

 omSmsManager ()
virtual ~omSmsManager ()
int InitDevice (wxString port, int bouds=B19200)
wxString GetDevice ()
void Reset ()
int SendSMS (wxString phone_number, wxString message)
int ReceiveMessages (omSmsArray *messages)

Private Member Functions

int WriteString (char *s, int how)
int WriteChar (char c, char *answ, int lansw)
int SendString (char *dom, char *ris, int tmout)
int QueryPhone (char *qy, char *stop, char *answ, int tmout)
omSmsGetSmsHeader (wxString buf)

Private Attributes

wxString port
 Port to connect the device.

int device_init
 Flag for device initialization.

int device
 Device handler.


Detailed Description

This class is used to interface computer with a cellular phone via serial port or infra red connection. The class can be used to send or retrive SMS messages using a cellular phone.


Constructor & Destructor Documentation

omSmsManager::omSmsManager  ) 
 

Constructor

omSmsManager::~omSmsManager  )  [virtual]
 

Destructor. Close the device.


Member Function Documentation

wxString omSmsManager::GetDevice  ) 
 

Get the port value

Returns:
the value of port

omSms * omSmsManager::GetSmsHeader wxString  buf  )  [private]
 

int omSmsManager::InitDevice wxString  port,
int  bouds = B19200
 

Initialize the device Opens serial connection on cellular phone return TRUE if open OK FALSE if error

Parameters:
port 
bouds 
Returns:
Return a boolean integer value.

int omSmsManager::QueryPhone char *  qy,
char *  stop,
char *  answ,
int  tmout
[private]
 

int omSmsManager::ReceiveMessages omSmsArray *  messages  ) 
 

Receive an SMS from the phone

Parameters:
messages Pointer to message structure.
Returns:
Number of received messages.

void omSmsManager::Reset  ) 
 

Reset the connection

int omSmsManager::SendSMS wxString  phone_number,
wxString  message
 

Send an SMS to the phone

Returns:
int
Parameters:
phone_number 
message 

int omSmsManager::SendString char *  dom,
char *  ris,
int  tmout
[private]
 

Send a string to phone tmout - timeout in milliseconds

return TRUE if the modem respons correctly FALSE elsewhere

int omSmsManager::WriteChar char  c,
char *  answ,
int  lansw
[private]
 

Write a char to the modem.

int omSmsManager::WriteString char *  s,
int  how
[private]
 

Write a string to the modem. If how == 0, '~' sleeps 1 second. If how == 1, "^~" sleeps 1 second.


Field Documentation

int omSmsManager::device [private]
 

Device handler.

int omSmsManager::device_init [private]
 

Flag for device initialization.

wxString omSmsManager::port [private]
 

Port to connect the device.


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