diff --git a/src/knx/cemi_frame.cpp b/src/knx/cemi_frame.cpp index 289e83a..c4d6ff1 100644 --- a/src/knx/cemi_frame.cpp +++ b/src/knx/cemi_frame.cpp @@ -160,6 +160,8 @@ void CemiFrame::fillTelegramTP(uint8_t* data) data[len - 1] = calcCrcTP(data, len - 1); } +#ifdef USE_RF + uint16_t CemiFrame::telegramLengthtRF() const { return totalLenght() - 3; @@ -183,7 +185,7 @@ void CemiFrame::fillTelegramRF(uint8_t* data) //printHex("cEMI_fill: ", &data[0], len); } - +#endif uint8_t* CemiFrame::data() { return _data; @@ -315,7 +317,7 @@ void CemiFrame::destinationAddress(uint16_t value) { pushWord(value, _ctrl1 + 4); } - +#ifdef USE_RF uint8_t* CemiFrame::rfSerialOrDoA() const { return _rfSerialOrDoA; @@ -345,7 +347,7 @@ void CemiFrame::rfLfn(uint8_t rfLfn) { _rfLfn = rfLfn; } - +#endif NPDU& CemiFrame::npdu() { return _npdu; diff --git a/src/knx/cemi_frame.h b/src/knx/cemi_frame.h index d9db230..ef30165 100644 --- a/src/knx/cemi_frame.h +++ b/src/knx/cemi_frame.h @@ -5,6 +5,7 @@ #include "npdu.h" #include "tpdu.h" #include "apdu.h" +#include "config.h" #define NPDU_LPDU_DIFF 8 #define TPDU_NPDU_DIFF 1 @@ -56,6 +57,7 @@ class CemiFrame uint16_t destinationAddress() const; void destinationAddress(uint16_t value); +#ifdef USE_RF // only for RF medium uint8_t* rfSerialOrDoA() const; void rfSerialOrDoA(uint8_t* rfSerialOrDoA); @@ -63,7 +65,7 @@ class CemiFrame void rfInfo(uint8_t rfInfo); uint8_t rfLfn() const; void rfLfn(uint8_t rfInfo); - +#endif NPDU& npdu(); TPDU& tpdu(); APDU& apdu(); @@ -80,8 +82,11 @@ class CemiFrame APDU _apdu; uint16_t _length = 0; // only set if created from byte array +#ifdef USE_RF + // FIXME: integrate this propery in _data // only for RF medium uint8_t* _rfSerialOrDoA = 0; uint8_t _rfInfo = 0; uint8_t _rfLfn = 0xFF; // RF Data Link layer frame number + #endif }; \ No newline at end of file