Tiny protocol  0.9.3
Tiny communication protocol for microcontrollers
Public Member Functions | List of all members
Tiny::PacketD Class Reference

#include <TinyPacket.h>

Inheritance diagram for Tiny::PacketD:
Inheritance graph
[legend]
Collaboration diagram for Tiny::PacketD:
Collaboration graph
[legend]

Public Member Functions

 PacketD (int size)
 
- Public Member Functions inherited from Tiny::IPacket
 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)
 

Detailed Description

Class which allocated buffer for packet dynamically. Use this class only on powerful microcontrollers.

Constructor & Destructor Documentation

◆ PacketD()

Tiny::PacketD::PacketD ( int  size)
inline

Creates packet with dynamically allocated buffer.

Parameters
sizenumber of bytes to allocate for the packet buffer.

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