Gsm0710Buffer Class Reference

GSM 07.10 multiplexer buffer class. More...

#include <Gsm0710Buffer.h>

List of all members.

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.
Gsm0710Frameread ()
 Read frame from buffer.

Static Public Member Functions

static unsigned char makeCheckSum (const unsigned char *data, size_t len)
 Calculate checksum.

Detailed Description

GSM 07.10 multiplexer buffer class.

Implements the GSM 07.10 multiplexer buffer related functionality.


Constructor & Destructor Documentation

Gsm0710Buffer::Gsm0710Buffer (  ) 

Class constructor.

Initializes the GSM 07.10 multiplexer buffer class.

Gsm0710Buffer::~Gsm0710Buffer (  ) 

Class destructor.

Terminates the GSM 07.10 multiplexer buffer class.


Member Function Documentation

size_t Gsm0710Buffer::getAllocated (  ) 

Get buffer allocated space in bytes.

Returns:
Returns the number of data bytes currently allocated in the buffer.
size_t Gsm0710Buffer::getFree (  ) 

Get buffer free space in bytes.

Returns:
Returns the total size of the unallocated part of the buffer, i.e. the number of bytes that would currently fit in the buffer.
unsigned char Gsm0710Buffer::makeCheckSum ( const unsigned char *  data,
size_t  len 
) [static]

Calculate checksum.

Calculates the checksum according to GSM 07.10 multiplexer specification.

Parameters:
data Points to the data buffer.
len Specifies the length of the data in bytes.
Returns:
Returns the checksum byte.
Gsm0710Frame * Gsm0710Buffer::read (  ) 

Read frame from buffer.

Extracts a new frame from the GSM 07.10 buffer.

Returns:
Returns a pointer to the newly created frame class.
Note:
If the buffer does not contain any frames, the NULL pointer is returned.
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.

Note:
The data is written partially if the buffer does not have enough free capacity.
Parameters:
data Points to the data buffer.
len Specifies the length of data in bytes.
Returns:
Returns the number of bytes written to the buffer.

The documentation for this class was generated from the following files:
Generated on Wed Oct 20 11:13:44 2010 for libspatha by  doxygen 1.6.3