Skip to content

GSM3CircularBuffer

詳細情報

メンバー

GSM3CircularBuffer()

GSM3CircularBuffer::GSM3CircularBuffer(GSM3CircularBufferManager *mgr=0)

引数

  • GSM3CircularBufferManager* mgr Circular buffer manager

availableBytes()

Get available bytes in circular buffer

byte GSM3CircularBuffer::availableBytes()

戻り値

byte available bytes

storedBytes()

Stored bytes in circular buffer

byte GSM3CircularBuffer::storedBytes()

戻り値

byte stored bytes

write()

int GSM3CircularBuffer::write(char c)

引数

  • char c Character

戻り値

int 1 if successful

read()

Returns a character and moves the pointer

char GSM3CircularBuffer::read()

戻り値

char character

peek()

char GSM3CircularBuffer::peek(int increment)

引数

  • int increment Increment

戻り値

char character

firstString()

Returns a pointer to the head of the buffer

char* GSM3CircularBuffer::firstString()

戻り値

char * buffer with pointer in head

nextString()

Go forward one string

char * GSM3CircularBuffer::nextString()

戻り値

char * buffer with one string advance

flush()

Flush circular buffer

void GSM3CircularBuffer::flush()

getTail()

Get tail

byte GSM3CircularBuffer::getTail()

戻り値

byte tail

getHead()

Get head

byte GSM3CircularBuffer::getHead()

戻り値

byte head

deleteToTheEnd()

void GSM3CircularBuffer::deleteToTheEnd(byte from)

引数

  • byte from Initial byte position

locate()

bool GSM3CircularBuffer::locate(const char *reference)

引数

  • constchar * reference

戻り値

bool true if exists, in otherwise return false

chopUntil()

bool GSM3CircularBuffer::chopUntil(const char *reference, bool movetotheend, bool head=true)

引数

  • constchar * reference
  • bool movetotheend
  • bool head

戻り値

bool true if successful

readInt()

Reads an integer from the head. Stops with first non blank, non number character

int GSM3CircularBuffer::readInt()

戻り値

int integer from the head

extractSubstring()

bool GSM3CircularBuffer::extractSubstring(const char *from, const char *to, char *buffer, int bufsize)

引数

  • constchar * from Initial byte position
  • constchar * to Final byte position
  • char * buffer Buffer for copy substring
  • int bufsize Buffer size

戻り値

bool true if successful, false if substring does not exists

retrieveBuffer()

bool GSM3CircularBuffer::retrieveBuffer(char *buffer, int bufsize, int &SizeWritten)

引数

  • char * buffer
  • int bufsize
  • int & SizeWritten

戻り値

bool true if successful

debugBuffer()

Debug function to print the buffer after receiving data from the modem.

void GSM3CircularBuffer::debugBuffer()

printCharDebug()

void GSM3CircularBuffer::printCharDebug(uint8_t c)

引数

  • uint8_t c Character