EnOcean Link
1.14.0.0
Middleware to Connect EnOcean easily to other Projects
|
The base class for all PacketStreams Implementations. More...
#include <eoPacketStream.h>
Public Member Functions | |
eoPacketStream () | |
virtual eoReturn | Open (const char *port)=0 |
virtual void | Close ()=0 |
virtual eoReturn | Receive (eoPacket *p) |
virtual eoReturn | ReceiveByte (uint8_t *d)=0 |
virtual eoReturn | Send (const eoPacket &p) |
virtual eoReturn | SendByte (uint8_t d)=0 |
virtual bool | IsPacketPending () |
The base class for all PacketStreams Implementations.
PacketStream is an abstract base class for the Hardware specific xyPacketStream Classes. It contains the Important PacketStream::Receive and PacketStream::Send Functions to receive and send [ESP3] Packets. The specific Hardware classed have to implement at least SendByte and ReceiveByte to get the Bytes.
eoPacketStream::eoPacketStream | ( | ) |
Constructor for eoPacketStream, Inits the necessary Hardware and opens the ports
|
pure virtual |
Close the Port
Implemented in eoLinuxPacketStream, eoMacPacketStream, and eoWin32PacketStream.
|
virtual |
Checks if a packet is currently received through the receive line, but is not yet fully received.
|
pure virtual |
Tries to Open and initialize the specific port for the eoPacketStream
port | to open; for example "/dev/USB300" |
Implemented in eoLinuxPacketStream, eoMacPacketStream, and eoWin32PacketStream.
This functions will parse all the available bytes in the Stream, and tries to find an ESP3 Packet. It will Return EO_OK if we found one, or NEW_RX_BYTE if we've received some bytes but not yet a full Packet.
p | Pointer to eoPacket to be filled |
|
pure virtual |
d | Pointer where to write the Byte |
Implemented in eoWin32PacketStream, eoLinuxPacketStream, and eoMacPacketStream.
p | The eoPacket to send |
|
pure virtual |
d | The byte to send |
Implemented in eoWin32PacketStream, eoLinuxPacketStream, and eoMacPacketStream.