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

PacketStream Implementation for Linux based Systems. More...

#include <eoMacPacketStream.h>

Inheritance diagram for eoMacPacketStream:
Collaboration diagram for eoMacPacketStream:

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].

Member Function Documentation

◆ Close()

void eoMacPacketStream::Close ( )
virtual

Close the Port

Implements eoPacketStream.

◆ Open()

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

Tries to Open and initialize the specific port for the eoMacPacketStream

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

Implements eoPacketStream.

◆ ReceiveByte()

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

Implements eoPacketStream.

◆ SendByte()

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

Implements eoPacketStream.