AsciiMassage
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AsciiMassagePacker Class Reference

#include <AsciiMassagePacker.h>

Inheritance diagram for AsciiMassagePacker:
MassagePacker

Public Member Functions

 AsciiMassagePacker ()
 
virtual void beginPacket (const char *address)
 
virtual void addByte (uint8_t value)
 
virtual void addInt (int16_t value)
 
virtual void addLong (int32_t value)
 
virtual void addFloat (float value)
 
virtual void addString (const char *value)
 
virtual void endPacket ()
 
void flush ()
 Flushes current message in buffer (if any).
 
size_t size () const
 Returns size of buffer.
 
const uint8_t * buffer () const
 
virtual void streamPacket (Stream *stream)
 Ends the sending of a message and sends it through a Stream.
 
virtual void packEmpty (const char *address)
 Create a packet with no arguments.
 
virtual void packOneByte (const char *address, uint8_t value)
 Create a packet with a single byte value.
 
virtual void packOneInt (const char *address, int16_t value)
 Create a packet with a single int value.
 
virtual void packOneLong (const char *address, int32_t value)
 Create a packet with a single long value.
 
virtual void packOneFloat (const char *address, float value)
 Create a packet with a single float value.
 
virtual void packOneString (const char *address, const char *value)
 Create a packet with a single string value.
 
virtual void streamEmpty (Stream *stream, const char *address)
 Stream a packet with no arguments.
 
virtual void streamOneByte (Stream *stream, const char *address, uint8_t value)
 Stream a packet with a single byte value.
 
virtual void streamOneInt (Stream *stream, const char *address, int16_t value)
 Stream a packet with a single int value.
 
virtual void streamOneLong (Stream *stream, const char *address, int32_t value)
 Stream a packet with a single long value.
 
virtual void streamOneFloat (Stream *stream, const char *address, float value)
 Stream a packet with a single float value.
 
virtual void streamOneString (Stream *stream, const char *address, const char *s)
 Stream a packet with a single string value.
 

Protected Member Functions

bool _store (uint8_t value)
 

Protected Attributes

size_t _messageSize
 
uint8_t _buffer [MASSAGE_PACKER_BUFFERSIZE]
 

Detailed Description

AsciiMassagePacker class

Constructor & Destructor Documentation

◆ AsciiMassagePacker()

AsciiMassagePacker::AsciiMassagePacker ( )

Constructor

Member Function Documentation

◆ addByte()

void AsciiMassagePacker::addByte ( uint8_t  value)
virtual

Adds a byte.

Implements MassagePacker.

◆ addFloat()

void AsciiMassagePacker::addFloat ( float  value)
virtual

Adds a float.

Implements MassagePacker.

◆ addInt()

void AsciiMassagePacker::addInt ( int16_t  value)
virtual

Adds an int.

Implements MassagePacker.

◆ addLong()

void AsciiMassagePacker::addLong ( int32_t  value)
virtual

Adds a long.

Implements MassagePacker.

◆ addString()

void AsciiMassagePacker::addString ( const char *  value)
virtual

Adds a string.

Implements MassagePacker.

◆ beginPacket()

void AsciiMassagePacker::beginPacket ( const char *  address)
virtual

Begins the sending of a message.

Implements MassagePacker.

◆ endPacket()

void AsciiMassagePacker::endPacket ( )
virtual

[[Deprecated]] Ends a packet.

Implements MassagePacker.


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