Tiny protocol
0.11.0
Tiny communication protocol for microcontrollers
|
#include <TinyPacket.h>
Public Member Functions | |
PacketD (int size) | |
![]() | |
IPacket (char *buf, size_t size) | |
virtual | ~IPacket ()=default |
void | clear () |
void | put (uint8_t byte) |
void | put (char chr) |
void | put (uint16_t data) |
void | put (uint32_t data) |
void | put (int16_t data) |
void | put (const char *str) |
void | put (const IPacket &pkt) |
uint8_t | getByte () |
char | getChar () |
uint16_t | getUint16 () |
int16_t | getInt16 () |
uint32_t | getUint32 () |
char * | getString () |
size_t | size () const |
size_t | maxSize () const |
char * | data () |
uint8_t & | operator[] (size_t idx) |
Class which allocated buffer for packet dynamically. Use this class only on powerful microcontrollers.
|
inline |
Creates packet with dynamically allocated buffer.
size | number of bytes to allocate for the packet buffer. |