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

PacketStream Implementation for Linux based Systems. More...

#include <eoLinuxPacketStream.h>

Inheritance diagram for eoLinuxPacketStream:
Collaboration diagram for eoLinuxPacketStream:

Public Member Functions

eoReturn Open (const char *port)
 
void Close ()
 
eoReturn ReceiveByte (uint8_t *u8RxByte)
 
eoReturn SendByte (uint8_t u8TxByte)
 
- Public Member Functions inherited from eoPacketStream
 eoPacketStream ()
 
virtual eoReturn Receive (eoPacket *p)
 
virtual eoReturn Send (const eoPacket &p)
 
virtual bool IsPacketPending ()
 

Detailed Description

PacketStream Implementation for Linux based Systems.

LinuxPacketStream uses a /dev/ttyxx Interface for a direct communication to an EnOcean device via UART [ESP3].

Examples:
linuxPacketStream_example.cpp, and packetStream_example.cpp.

Member Function Documentation

◆ Close()

void eoLinuxPacketStream::Close ( )
virtual

Close the Port

Implements eoPacketStream.

◆ Open()

eoReturn eoLinuxPacketStream::Open ( const char *  port)
virtual

Tries to Open and initialize the specific port for the eoLinuxPacketstream

Parameters
portto open; for example "/dev/ttyUSB0"
Returns
eoReturn EO_OK if everything was ok else eoReturn PORT_ERROR

Implements eoPacketStream.

Examples:
linuxPacketStream_example.cpp.

◆ ReceiveByte()

eoReturn eoLinuxPacketStream::ReceiveByte ( uint8_t *  d)
virtual
Parameters
dPointer where to write the Byte
Returns
Returns a eoReturn

Implements eoPacketStream.

◆ SendByte()

eoReturn eoLinuxPacketStream::SendByte ( uint8_t  d)
virtual
Parameters
dThe byte to send
Returns
Returns a eoReturn

Implements eoPacketStream.