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

PacketStream Implementation for Windows based Systems. More...

#include <eoWin32PacketStream.h>

Inheritance diagram for eoWin32PacketStream:
Collaboration diagram for eoWin32PacketStream:

Public Member Functions

eoReturn Open (const char *port)
 
void Close ()
 
DWORD GetLastError ()
 
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 Windows based Systems.

eoWin32PacketStream uses a \\.\COMxx Interface for a direct communication to an EnOcean device via UART [ESP3].

Examples:
packetStream_example.cpp.

Member Function Documentation

◆ Close()

void eoWin32PacketStream::Close ( )
virtual

Close the Port

Implements eoPacketStream.

◆ GetLastError()

DWORD eoWin32PacketStream::GetLastError ( )
inline

Returns the last error from the windows api

Here is the call graph for this function:

◆ Open()

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

Tries to Open and initialize the specific port for the eoLinuxPacketstream

Parameters
portto open; for example "\\\\.\\COM0"
Returns
eoReturn OK if everything was ok else eoReturn PORT_ERROR

Implements eoPacketStream.

◆ ReceiveByte()

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

Implements eoPacketStream.

Here is the caller graph for this function:

◆ SendByte()

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

Implements eoPacketStream.

Here is the caller graph for this function: