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

every Communication from an EnOcean Device to another one consist out of one more Telegrams. The eoTelegram class contains the payload Data from one Telegram. More...

#include <eoTelegramERP2.h>

Inheritance diagram for eoTelegramERP2:
Collaboration diagram for eoTelegramERP2:

Public Member Functions

 eoTelegramERP2 (const eoTelegramERP2 &telegram)
 
 eoTelegramERP2 (uint16_t size)
 
virtual void Clear ()
 
virtual eoReturn copyTo (eoTelegramERP2 &msg) const
 
virtual eoReturn copyTo (eoTelegram &msg) const
 
virtual eoReturn copyTo (eoMessage &msg) const
 
virtual eoReturn SetDataLength (uint16_t dataLen, bool reallocate=false)
 
uint8_t GetOptionalDataLength () const
 
eoReturn SetOptionalDataLength (uint8_t u8Length)
 
uint8_t GetRepeaterCount (void) const
 
eoReturn SetRepeaterCount (uint8_t repCounter)
 
- Public Member Functions inherited from eoTelegram
 eoTelegram (const eoTelegram &telegram)
 
 eoTelegram (uint16_t size)
 
eoReturn copyTo (eoMaintenanceMessage &msg) const
 
- Public Member Functions inherited from eoMessage
 eoMessage (uint16_t size=1)
 
 eoMessage (const eoTelegram &tel)
 
- Public Member Functions inherited from eoAbstractMessage
virtual uint16_t GetDataLength () const
 
uint16_t GetMaxLength () const
 

Public Attributes

uint16_t sourceIDMSB
 The Most significant 16bytes of a 48bit telegram.
 
SourceIDLength sourceIDLength
 
DestinationIDType destIDLength
 
uint8_t optionalData [15]
 
- Public Attributes inherited from eoTelegram
int8_t dBm
 strength of the last received Telegram
 
uint8_t subtelCount
 number of Subtelegrams
 
- Public Attributes inherited from eoMessage
uint8_t RORG
 RORG as specified by EnOcean.
 
uint8_t status
 status Information from device
 
uint8_t securityLevel
 Security level of the message.
 
uint32_t sourceID
 SourceID. More...
 
uint32_t destinationID
 the destination ID
 
- Public Attributes inherited from eoAbstractMessage
uint8_t * data
 Data Pointer.
 
uint16_t dataLength
 Payload data length.
 
uint16_t maxLength
 

Additional Inherited Members

- Protected Member Functions inherited from eoAbstractMessage
 eoAbstractMessage (uint16_t size=1)
 

Detailed Description

every Communication from an EnOcean Device to another one consist out of one more Telegrams. The eoTelegram class contains the payload Data from one Telegram.

a Telegram coming from a Device

Constructor & Destructor Documentation

◆ eoTelegramERP2() [1/2]

eoTelegramERP2::eoTelegramERP2 ( const eoTelegramERP2 telegram)

Copy Constructor

Parameters
telegram

◆ eoTelegramERP2() [2/2]

eoTelegramERP2::eoTelegramERP2 ( uint16_t  size)

Creates a new Telegram with the maximal datalength size

Parameters
sizedatalength

Member Function Documentation

◆ Clear()

virtual void eoTelegramERP2::Clear ( )
virtual

Clears the message

Returns

Reimplemented from eoTelegram.

◆ copyTo() [1/2]

virtual eoReturn eoTelegramERP2::copyTo ( eoTelegramERP2 msg) const
virtual

Copies the content of this eoMessage to another eoMessage.

Returns
EO_OK
OUT_OF_RANGE if the eoMessage.maxLength is smaller than this eoMessage.maxLength

◆ copyTo() [2/2]

virtual eoReturn eoTelegramERP2::copyTo ( eoMessage msg) const
virtual

Copies the content of this eoMessage to another eoMessage.

Returns
EO_OK
OUT_OF_RANGE if the eoMessage.maxLength is smaller than this eoMessage.maxLength

Reimplemented from eoTelegram.

◆ SetDataLength()

virtual eoReturn eoTelegramERP2::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 from eoAbstractMessage.