Skip to content

GSM3MobileMockupProvider

詳細情報

メンバー

minSocket()

Minimum socket

int GSM3MobileMockupProvider::minSocket()

戻り値

int 1

maxSocket()

Maximum socket

int GSM3MobileMockupProvider::maxSocket()

戻り値

int 8

GSM3MobileMockupProvider()

Constructor

GSM3MobileMockupProvider::GSM3MobileMockupProvider()

getStatus()

Get network status

GSM3_NetworkStatus_t GSM3MobileMockupProvider::getStatus()

戻り値

GSM3_NetworkStatus_t network status

getvoiceCallStatus()

Get voice call status

GSM3_voiceCall_st GSM3MobileMockupProvider::getvoiceCallStatus()

戻り値

GSM3_voiceCall_st call status

ready()

Get last command status

int GSM3MobileMockupProvider::ready()

戻り値

int Returns 0 if last command is still executing, 1 success, >1 error

closeCommand()

void GSM3MobileMockupProvider::closeCommand(int code)

引数

  • int code Close code

begin()

int GSM3MobileMockupProvider::begin(char *pin=0)

引数

  • char * pin PIN code

戻り値

int

isModemAlive()

Check if is modem alive

int GSM3MobileMockupProvider::isModemAlive()

戻り値

int 0

shutdown()

Shutdown the modem (power off really)

bool GSM3MobileMockupProvider::shutdown()

戻り値

bool true if successful

voiceCall()

int GSM3MobileMockupProvider::voiceCall(const char *number)

引数

  • constchar * number Phone number to be called

戻り値

int If asynchronous, returns 0. If synchronous, 1 if success, other if error

answerCall()

Answer a voice call

int GSM3MobileMockupProvider::answerCall()

戻り値

int If asynchronous, returns 0. If synchronous, 1 if success, other if error

hangCall()

Hang a voice call

int GSM3MobileMockupProvider::hangCall()

戻り値

int If asynchronous, returns 0. If synchronous, 1 if success, other if error

retrieveCallingNumber()

int GSM3MobileMockupProvider::retrieveCallingNumber(char *buffer, int *&bufsize)

引数

  • char * buffer Buffer for copy phone number
  • int *& bufsize Buffer size

戻り値

int If asynchronous, returns 0. If synchronous, 1 if success, other if error

beginSMS()

int GSM3MobileMockupProvider::beginSMS(const char *number)

引数

  • constchar * number Destination

戻り値

int error command if it exists

endSMS()

End SMS

int GSM3MobileMockupProvider::endSMS()

戻り値

int error command if it exists

availableSMS()

Check if SMS available and prepare it to be read

int GSM3MobileMockupProvider::availableSMS()

戻り値

int error command if it exists

peek()

Read a byte but do not advance the buffer header (circular buffer)

int GSM3MobileMockupProvider::peek()

戻り値

int character

flushSMS()

Delete the SMS from Modem memory and proccess answer

void GSM3MobileMockupProvider::flushSMS()

remoteSMSNumber()

int GSM3MobileMockupProvider::remoteSMSNumber(char *number, int nlength)

引数

  • char * number Buffer for save number phone
  • int nlength Buffer length

戻り値

int 1 success, >1 error

readSMS()

Read one char for SMS buffer (advance circular buffer)

int GSM3MobileMockupProvider::readSMS()

戻り値

int character

writeSMS()

void GSM3MobileMockupProvider::writeSMS(char c)

引数

  • char c Character

connectTCPClient()

int GSM3MobileMockupProvider::connectTCPClient(const char *server, int port, int id_socket)

引数

  • constchar * server String with IP or server name
  • int port Remote port number
  • int id_socket Local socket number

戻り値

int 0 if command running, 1 if success, otherwise error

writeSocket()

void GSM3MobileMockupProvider::writeSocket(const uint8_t *buf, size_t size, int idsocket)

引数

  • constuint8_t * buf Buffer
  • size_t size Buffer size
  • int idsocket Socket

readSocket()

int GSM3MobileMockupProvider::readSocket(uint8_t *buf, size_t size, int idsocket)

引数

  • uint8_t * buf Buffer
  • size_t size Buffer size
  • int idsocket Socket

戻り値

int

availableSocket()

int GSM3MobileMockupProvider::availableSocket(int idsocket)

引数

  • int idsocket Local socket number

戻り値

int 0 if command running, 1 if there are data available, 4 if no data, otherwise error

readSocket()

int GSM3MobileMockupProvider::readSocket(int idsocket, bool advance=true)

引数

  • int idsocket Socket
  • bool advance Determines if advance the buffer head

戻り値

int character

flushSocket()

void GSM3MobileMockupProvider::flushSocket(int idsocket)

引数

  • int idsocket Socket

disconnectTCP()

int GSM3MobileMockupProvider::disconnectTCP(int idsocket)

引数

  • int idsocket Socket

戻り値

int 0 if command running, 1 if success, otherwise error

connectTCPServer()

int GSM3MobileMockupProvider::connectTCPServer(int port, char *localIP, int *localIPlength)

引数

  • int port Port
  • char * localIP IP address
  • int * localIPlength IP address size in characters

戻り値

int command error if exists

getSocketModemStatus()

bool GSM3MobileMockupProvider::getSocketModemStatus(uint8_t s)

引数

  • uint8_t s Socket

戻り値

bool modem status (true if connected)