A container for one Bluetooth packet's data. More...
#include <sifteo/bluetooth.h>
Public Member Functions | |
uint8_t * | bytes () |
Return a pointer to this packet's payload bytes. | |
void | clear () |
Set the packet's length and type to zero. | |
bool | empty () const |
Is this packet's payload empty? | |
void | resize (unsigned bytes) |
Change the size of this packet, in bytes. | |
void | setType (unsigned type) |
Set a packet's 7-bit type. | |
unsigned | size () const |
Retrieve the size of this packet, in bytes. | |
unsigned | type () const |
Return the packet's 7-bit type code. | |
Static Public Member Functions | |
static unsigned | capacity () |
Retrieve the capacity of a packet, in bytes. (19) | |
A container for one Bluetooth packet's data.
Each packet consists of a variable-length payload of up to 19 bytes, and a "type" byte of which the low 7 bits are available for games to use.
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen