v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Member Functions | Static Public Member Functions | List of all members
Sifteo::BluetoothPacket Struct Reference

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)
 

Detailed Description

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.


The documentation for this struct was generated from the following file: