![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cATModem.h>
Public Types | |
enum | ATMODE_TYPE { ATMODE_UNK = 0 , ATMODE_Command , ATMODE_DataCarrier , ATMODE_DataVoice , ATMODE_DataFax } |
Public Member Functions | |
cATModem (cStream *pStream, cStringF sPortName) | |
virtual | ~cATModem () |
void | SetModeUnk (bool bUnInit=false) |
HRESULT | SetModeCommand () |
HRESULT | SendATCmd (const char *pszCmd, bool bCR=true) |
HRESULT | PollForResult () |
HRESULT | WaitForResult (TIMESYSD_t tWaitMin=10, TIMESYSD_t tWaitMax=10 *cTimeSys::k_FREQ) |
HRESULT | SendATCmdAndWait (const char *pszCmd, TIMESYSD_t tWaitMin=10, TIMESYSD_t tWaitMax=10 *cTimeSys::k_FREQ) |
HRESULT | SendATCmdScript (const char *pszCmdScript) |
HRESULT | SendSMS (const char *pszNumber, const char *pszMsg) |
UNITTEST_FRIEND (cATModem) | |
Static Public Member Functions | |
static HRESULT GRAYCALL | FindATModemStream (OUT cNewPtr< cStream > &rpStream, _Inout_ cStringF &sPortName) |
Public Attributes | |
bool | m_bIsInit |
I have applied my modem init set. m_sInitCommandScript. More... | |
cStringA | m_sInitCommandScript |
My command init script. Must put the modem into known state. More... | |
Manage a serial port connection to an AT modem device. Assume internal modem with no baud rate or handshake problems. does this device have a command mode pin ? or escape based switch to command mode.
|
virtual |
|
static |
Search the system for an attached AT Modem. sPortName = "" = find the first else find the one after this.
HRESULT GrayLib::cATModem::PollForResult | ( | ) |
HRESULT GrayLib::cATModem::SendATCmd | ( | const char * | pszCmd, |
bool | bCR = true |
||
) |
HRESULT GrayLib::cATModem::SendATCmdAndWait | ( | const char * | pszCmd, |
TIMESYSD_t | tWaitMin = 10 , |
||
TIMESYSD_t | tWaitMax = 10 * cTimeSys::k_FREQ |
||
) |
HRESULT GrayLib::cATModem::SendATCmdScript | ( | const char * | pszCmdScript | ) |
Send a complex set of commands and waits. Used for long init sequence. m_sInitCommandScript
HRESULT GrayLib::cATModem::SendSMS | ( | const char * | pszNumber, |
const char * | pszMsg | ||
) |
Send an SMS message via AT modem. For backup communications. http://www.developershome.com/sms/howToSendSMSFromPC.asp AT command Meaning: +CMGS Send message +CMSS Send message from storage +CMGW Write message to memory +CMGD Delete message +CMGC Send command +CMMS More messages to send
HRESULT GrayLib::cATModem::SetModeCommand | ( | ) |
Try to put me into command mode. ATMODE_Command
void GrayLib::cATModem::SetModeUnk | ( | bool | bUnInit = false | ) |
The modem responded in a bad way or not at all. I don't know what mode I'm in anymore.
GrayLib::cATModem::UNITTEST_FRIEND | ( | cATModem | ) |
HRESULT GrayLib::cATModem::WaitForResult | ( | TIMESYSD_t | tWaitMin = 10 , |
TIMESYSD_t | tWaitMax = 10 * cTimeSys::k_FREQ |
||
) |
< Sleep some while waiting for the command response. populate m_sResult
bool GrayLib::cATModem::m_bIsInit |
I have applied my modem init set. m_sInitCommandScript.
cStringA GrayLib::cATModem::m_sInitCommandScript |
My command init script. Must put the modem into known state.