EnOcean Link
1.14.0.0
Middleware to Connect EnOcean easily to other Projects
|
Class which contains a Packet. More...
#include <eoPacket.h>
Public Member Functions | |
eoPacket () | |
eoPacket (uint8_t *dataBuffer, uint16_t size) | |
eoPacket (uint16_t size) | |
eoPacket (const eoPacket &packet) | |
uint16_t | getBufferSize () const |
uint8_t | copyTo (eoPacket &packet) |
Public Attributes | |
uint8_t * | data |
uint16_t | dataLength |
uint8_t | optionalLength |
uint8_t | type |
Class which contains a Packet.
Packets are used for the communication with the connected EnOcean Device via ESP3. linuxPacketStream_example.cpp
eoPacket::eoPacket | ( | ) |
The base constructor for Packet will allocate 550bytes for the internal dataBuffer. 550bytes is enough for ESP 3 (1.17), if you need more or less you can always use Packet(uint16_t size);
eoPacket::eoPacket | ( | uint8_t * | dataBuffer, |
uint16_t | size | ||
) |
This constructor allows the User to set the dataBuffer Pointer as he wants The dataBuffer, will not be deleted in this case, in the destructor.
dataBuffer | Pointer to dataBuffer |
size | size of the buffer |
eoPacket::eoPacket | ( | uint16_t | size | ) |
This constructor automatically allocates size bytes as dataBuffer
size | bytes to allocate |
eoPacket::eoPacket | ( | const eoPacket & | packet | ) |
This is copy constructor automatically allocates size bytes as dataBuffer
packet | bytes to allocate |
uint8_t eoPacket::copyTo | ( | eoPacket & | packet | ) |
Copies the content of this eoPacket to packet.
uint16_t eoPacket::getBufferSize | ( | ) | const |
Returns the size of the buffer
uint8_t* eoPacket::data |
Direct access to DataBuffer, can be unsafe only use it if you know what you do!
uint16_t eoPacket::dataLength |
Sets or get the DataLength of the Packet
uint8_t eoPacket::optionalLength |
Sets or get the Optional DataLength of the Packet
uint8_t eoPacket::type |
The PACKET_TYPE