a library to use GPRS like ethernet or wifi, which makes it possible to connect to the internet with your GPRS module

Dependencies:   BufferedSerial

Dependents:   ThinkSpeak_Test roam_v1 roam_v2 finalv3

Fork of GPRSInterface by wei zou

Embed: (wiki syntax)

« Back to documentation index

Modem Class Reference

Modem class. More...

#include <modem.h>

Inherited by GPRS.

Public Member Functions

 Modem (PinName tx, PinName rx)
 Create Modem Instance.

Protected Member Functions

int readline (char *buf, int len, uint32_t timeout=DEFAULT_TIMEOUT_MS)
 Read a line.

Detailed Description

Modem class.

Used for Modem communication. attention that Modem module communicate with MCU in serial protocol

Definition at line 40 of file modem.h.


Constructor & Destructor Documentation

Modem ( PinName  tx,
PinName  rx 
)

Create Modem Instance.

Parameters:
txuart transmit pin to communicate with Modem
rxuart receive pin to communicate with Modem

Definition at line 48 of file modem.h.


Member Function Documentation

int readline ( char *  buf,
int  len,
uint32_t  timeout = DEFAULT_TIMEOUT_MS 
) [protected]

Read a line.

Parameters:
bufthe buffer to store a line
lensize of the buffer
timeoutwait time (ms)
Returns:
-1 if timeout, length of the line if otherwise

Definition at line 19 of file modem.cpp.