EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoAbstractMessage Class Reference

base class for all Messages More...

#include <eoAbstractMessage.h>

Inheritance diagram for eoAbstractMessage:

Public Member Functions

virtual eoReturn SetDataLength (uint16_t dataLen, bool reallocate=false)
 
virtual uint16_t GetDataLength () const
 
uint16_t GetMaxLength () const
 

Public Attributes

uint8_t * data
 Data Pointer.
 
uint16_t dataLength
 Payload data length.
 
uint16_t maxLength
 

Protected Member Functions

 eoAbstractMessage (uint16_t size=1)
 

Detailed Description

base class for all Messages

this class describes an abstract Message. It is the base class for all real Message Applications

Constructor & Destructor Documentation

◆ eoAbstractMessage()

eoAbstractMessage::eoAbstractMessage ( uint16_t  size = 1)
protected

Constructor.

Parameters
sizeDefault size of the message.

Member Function Documentation

◆ GetDataLength()

virtual uint16_t eoAbstractMessage::GetDataLength ( ) const
virtual

Returns current DataLength

Returns
data length

◆ GetMaxLength()

uint16_t eoAbstractMessage::GetMaxLength ( ) const

Gets the maximal Message Length

Returns
maximal Data Length

◆ SetDataLength()

virtual eoReturn eoAbstractMessage::SetDataLength ( uint16_t  dataLen,
bool  reallocate = false 
)
virtual

Gets the dataLength, when reallocate is set to true, a new data Buffer is allocated if the new Size is bigger then the max Size

Parameters
dataLennew dataLen Size
reallocateEnables new allocation
Returns

Reimplemented in eoTelegramERP2.

Examples:
profile_examples.cpp.

Member Data Documentation

◆ maxLength

uint16_t eoAbstractMessage::maxLength

maximal Length the message can have