|
SBB Host
Host communication with the self balancing bike.
|
A templated-class for managing data packet. More...
#include <Packet.h>
Public Member Functions | |
| Packet () | |
| Constructor. More... | |
| T | getValue (unsigned int i) |
| Get a value of the packet. More... | |
Public Attributes | |
| T | value [Size] = { 0 } |
| Buffer with base type T and size Size. More... | |
| unsigned int | id [Size] |
| Zero-based index of data elements (from 0 to Size-1). More... | |
| const unsigned int | size = Size |
| Number of element of the packet. More... | |
| const unsigned int | bytes = Size * sizeof(T) |
| Number of bytes of the packet according to sizeof(T) and Size. More... | |
A templated-class for managing data packet.
Templated-class for managing data-packet with used-defined type and size, used in SBBHostCore.
| T | The base type of the packet. |
| Size | The size of the packet (number of element with type T). |
Constructor.
Default constructor.
|
inline |
Get a value of the packet.
Function to get a value of the packet.
| i | The index of the value. |
| const unsigned int Packet< T, Size >::bytes = Size * sizeof(T) |
Number of bytes of the packet according to sizeof(T) and Size.
| unsigned int Packet< T, Size >::id[Size] |
Zero-based index of data elements (from 0 to Size-1).
| const unsigned int Packet< T, Size >::size = Size |
Number of element of the packet.
| T Packet< T, Size >::value[Size] = { 0 } |
Buffer with base type T and size Size.