GSM 07.10 multiplexer buffer class. More...
#include <Gsm0710Buffer.h>
Public Member Functions | |
Gsm0710Buffer () | |
Class constructor. | |
~Gsm0710Buffer () | |
Class destructor. | |
size_t | getFree () |
Get buffer free space in bytes. | |
size_t | getAllocated () |
Get buffer allocated space in bytes. | |
size_t | write (const unsigned char *data, size_t len) |
Write raw data to buffer. | |
Gsm0710Frame * | read () |
Read frame from buffer. | |
Static Public Member Functions | |
static unsigned char | makeCheckSum (const unsigned char *data, size_t len) |
Calculate checksum. |
GSM 07.10 multiplexer buffer class.
Implements the GSM 07.10 multiplexer buffer related functionality.
Gsm0710Buffer::Gsm0710Buffer | ( | ) |
Class constructor.
Initializes the GSM 07.10 multiplexer buffer class.
Gsm0710Buffer::~Gsm0710Buffer | ( | ) |
Class destructor.
Terminates the GSM 07.10 multiplexer buffer class.
size_t Gsm0710Buffer::getAllocated | ( | ) |
Get buffer allocated space in bytes.
size_t Gsm0710Buffer::getFree | ( | ) |
Get buffer free space in bytes.
unsigned char Gsm0710Buffer::makeCheckSum | ( | const unsigned char * | data, | |
size_t | len | |||
) | [static] |
Calculate checksum.
Calculates the checksum according to GSM 07.10 multiplexer specification.
data | Points to the data buffer. | |
len | Specifies the length of the data in bytes. |
Gsm0710Frame * Gsm0710Buffer::read | ( | ) |
Read frame from buffer.
Extracts a new frame from the GSM 07.10 buffer.
size_t Gsm0710Buffer::write | ( | const unsigned char * | data, | |
size_t | len | |||
) |
Write raw data to buffer.
Appends raw GSM 07.10 multiplexer stream data to the buffer.
data | Points to the data buffer. | |
len | Specifies the length of data in bytes. |