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

Message Class for communication. More...

#include <eoMessage.h>

Inheritance diagram for eoMessage:
Collaboration diagram for eoMessage:

Public Member Functions

virtual eoReturn copyTo (eoMessage &msg) const
 
virtual void Clear ()
 
 eoMessage (uint16_t size=1)
 
 eoMessage (const eoTelegram &tel)
 
- Public Member Functions inherited from eoAbstractMessage
virtual eoReturn SetDataLength (uint16_t dataLen, bool reallocate=false)
 
virtual uint16_t GetDataLength () const
 
uint16_t GetMaxLength () const
 

Public Attributes

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

Message Class for communication.

this class describes a Message, a message is the virtual piece of information, which is exchanged between eoLink and the Gateway.

It contains the payload data, the Source ID and the RORG information.

Examples:
genericProfile_examples.cpp, profile_examples.cpp, Security_example.cpp, sendTelegram_example.cpp, tutorial2.cpp, tutorial3.cpp, tutorial6.cpp, and vld_example.cpp.

Constructor & Destructor Documentation

◆ eoMessage() [1/2]

eoMessage::eoMessage ( uint16_t  size = 1)

Creates a new Message and reserves size bytes for the data in the ram

Parameters
sizebytes ti reserve in the ram

◆ eoMessage() [2/2]

eoMessage::eoMessage ( const eoTelegram tel)

Creates a new Message from a telegram

Parameters
teleoTelegram used by the eoMessage.

Member Function Documentation

◆ Clear()

virtual void eoMessage::Clear ( )
virtual

Clears the message

Returns

Reimplemented in eoTelegramERP2, and eoTelegram.

◆ copyTo()

virtual eoReturn eoMessage::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 in eoTelegramERP2, and eoTelegram.

Member Data Documentation

◆ sourceID

uint32_t eoMessage::sourceID

SourceID.

When sending data= ID to use

Note
can only be a valid id based from the BASE_ID or use 0x0 for the connected device ID

When it is a received Message, id from the transmitter.

Examples:
GatewayFiltered_example.cpp, genericProfile_examples.cpp, tutorial1.cpp, tutorial4.cpp, tutorial6.cpp, and vld_example.cpp.