Skip to content

GSM3ShieldV1ClientProvider

詳細情報

メンバー

GSM3ShieldV1ClientProvider()

Constructor

GSM3ShieldV1ClientProvider::GSM3ShieldV1ClientProvider()

minSocket()

minSocket

int GSM3ShieldV1ClientProvider::minSocket()

戻り値

int 0

maxSocket()

maxSocket

int GSM3ShieldV1ClientProvider::maxSocket()

戻り値

int 0

connectTCPClient()

int GSM3ShieldV1ClientProvider::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

connectTCPClient()

int GSM3ShieldV1ClientProvider::connectTCPClient(IPAddress add, int port, int id_socket)

引数

  • IPAddress add Remote IP address
  • int port Remote port number
  • int id_socket Local socket number

戻り値

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

beginWriteSocket()

void GSM3ShieldV1ClientProvider::beginWriteSocket(bool client1Server0, int id_socket)

引数

  • bool client1Server0 1 if modem acts as client, 0 if acts as server
  • int id_socket Local socket number

writeSocket()

void GSM3ShieldV1ClientProvider::writeSocket(const char *buf)

引数

  • constchar * buf characters to be written (final 0 will not be written)

writeSocket()

void GSM3ShieldV1ClientProvider::writeSocket(uint8_t c)

引数

  • uint8_t c character to be written

endWriteSocket()

Finish current writing

void GSM3ShieldV1ClientProvider::endWriteSocket()

availableSocket()

int GSM3ShieldV1ClientProvider::availableSocket(bool client, int id_socket)

引数

  • bool client
  • int id_socket Local socket number

戻り値

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

readSocket()

Read data (get a character) available in socket

int GSM3ShieldV1ClientProvider::readSocket()

戻り値

int character

flushSocket()

Flush socket

void GSM3ShieldV1ClientProvider::flushSocket()

peekSocket()

Get a character but will not advance the buffer head

int GSM3ShieldV1ClientProvider::peekSocket()

戻り値

int character

disconnectTCP()

int GSM3ShieldV1ClientProvider::disconnectTCP(bool client1Server0, int id_socket)

引数

  • bool client1Server0 1 if modem acts as client, 0 if acts as server
  • int id_socket Socket

戻り値

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

recognizeUnsolicitedEvent()

bool GSM3ShieldV1ClientProvider::recognizeUnsolicitedEvent(byte from)

引数

  • byte from

戻り値

bool true if successful

manageResponse()

void GSM3ShieldV1ClientProvider::manageResponse(byte from, byte to)

引数

  • byte from Initial byte position
  • byte to Final byte position

ready()

Get last command status

int GSM3ShieldV1ClientProvider::ready()

戻り値

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

getSocket()

int GSM3ShieldV1ClientProvider::getSocket(int socket=-1)

引数

  • int socket Socket

戻り値

int socket

releaseSocket()

void GSM3ShieldV1ClientProvider::releaseSocket(int socket)

引数

  • int socket Socket

getStatusSocketClient()

bool GSM3ShieldV1ClientProvider::getStatusSocketClient(uint8_t socket)

引数

  • uint8_t socket Socket

戻り値

bool 1 if connected, 0 otherwise