diff --git a/src/knx/bau07B0.cpp b/src/knx/bau07B0.cpp index 92fe665..c68ecb2 100644 --- a/src/knx/bau07B0.cpp +++ b/src/knx/bau07B0.cpp @@ -151,18 +151,4 @@ bool Bau07B0::isAckRequired(uint16_t address, bool isGrpAddr) return false; } -// /// @brief sets the Callback Function indicating sent or received telegrams -// /// @param activityCallback -// /// @details the info parameter -// void Bau07B0::setActivityCallback(ActivityCallback activityCallback) -// { -// _activityCallback = activityCallback; -// } - -// void Bau07B0::Activity(uint8_t info) -// { -// if(_activityCallback) -// _activityCallback(info); -// } - #endif diff --git a/src/knx/data_link_layer.cpp b/src/knx/data_link_layer.cpp index 8de99f8..be9d6fa 100644 --- a/src/knx/data_link_layer.cpp +++ b/src/knx/data_link_layer.cpp @@ -7,7 +7,7 @@ #include "cemi_frame.h" -void DataLinkLayerCallbacks::Activity(uint8_t info) +void DataLinkLayerCallbacks::activity(uint8_t info) { if(_activityCallback) _activityCallback(info); diff --git a/src/knx/data_link_layer.h b/src/knx/data_link_layer.h index fe0d474..817078e 100644 --- a/src/knx/data_link_layer.h +++ b/src/knx/data_link_layer.h @@ -18,7 +18,7 @@ protected: ActivityCallback _activityCallback = nullptr; public: virtual ~DataLinkLayerCallbacks() = default; - virtual void Activity(uint8_t info); + virtual void activity(uint8_t info); virtual void setActivityCallback(ActivityCallback activityCallback); }; diff --git a/src/knx/ip_data_link_layer.cpp b/src/knx/ip_data_link_layer.cpp index aad2c14..aa291cc 100644 --- a/src/knx/ip_data_link_layer.cpp +++ b/src/knx/ip_data_link_layer.cpp @@ -32,7 +32,7 @@ bool IpDataLinkLayer::sendFrame(CemiFrame& frame) bool success = sendBytes(packet.data(), packet.totalLength()); #ifdef KNX_ACTIVITYCALLBACK if(_dllcb) - _dllcb->Activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_SEND << KNX_ACTIVITYCALLBACK_DIR)); + _dllcb->activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_SEND << KNX_ACTIVITYCALLBACK_DIR)); #endif dataConReceived(frame, success); return success; @@ -57,7 +57,7 @@ void IpDataLinkLayer::loop() #ifdef KNX_ACTIVITYCALLBACK if(_dllcb) - _dllcb->Activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_RECV << KNX_ACTIVITYCALLBACK_DIR)); + _dllcb->activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_RECV << KNX_ACTIVITYCALLBACK_DIR)); #endif uint16_t code; @@ -77,8 +77,8 @@ void IpDataLinkLayer::loop() auto hpai = searchRequest.hpai(); #ifdef KNX_ACTIVITYCALLBACK - if(_dllcb) - _dllcb->Activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_SEND << KNX_ACTIVITYCALLBACK_DIR) | (KNX_ACTIVITYCALLBACK_IPUNICAST)); + if(_dllcb) + _dllcb->activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_SEND << KNX_ACTIVITYCALLBACK_DIR) | (KNX_ACTIVITYCALLBACK_IPUNICAST)); #endif _platform.sendBytesUniCast(hpai.ipAddress(), hpai.ipPortNumber(), searchResponse.data(), searchResponse.totalLength()); break; diff --git a/src/knx/tpuart_data_link_layer.cpp b/src/knx/tpuart_data_link_layer.cpp index 2af0dda..1c9f777 100644 --- a/src/knx/tpuart_data_link_layer.cpp +++ b/src/knx/tpuart_data_link_layer.cpp @@ -550,7 +550,7 @@ void TpUartDataLinkLayer::frameBytesReceived(uint8_t* buffer, uint16_t length) //printHex("=>", buffer, length); #ifdef KNX_ACTIVITYCALLBACK if(_dllcb) - _dllcb->Activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_RECV << KNX_ACTIVITYCALLBACK_DIR)); + _dllcb->activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_RECV << KNX_ACTIVITYCALLBACK_DIR)); #endif CemiFrame frame(buffer, length); frameReceived(frame); @@ -659,8 +659,8 @@ bool TpUartDataLinkLayer::sendSingleFrameByte() { _TxByteCnt = 0; #ifdef KNX_ACTIVITYCALLBACK - if(_dllcb) - _dllcb->Activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_SEND << KNX_ACTIVITYCALLBACK_DIR)); + if(_dllcb) + _dllcb->activity((_netIndex << KNX_ACTIVITYCALLBACK_NET) | (KNX_ACTIVITYCALLBACK_DIR_SEND << KNX_ACTIVITYCALLBACK_DIR)); #endif return false; } diff --git a/src/knx/tpuart_data_link_layer.h b/src/knx/tpuart_data_link_layer.h index 4551fcf..c2e46f3 100644 --- a/src/knx/tpuart_data_link_layer.h +++ b/src/knx/tpuart_data_link_layer.h @@ -21,8 +21,6 @@ class TpUartDataLinkLayer : public DataLinkLayer using DataLinkLayer::_platform; public: - // TpUartDataLinkLayer(DeviceObject& devObj, NetworkLayerEntity& netLayerEntity, - // Platform& platform, ITpUartCallBacks& cb); TpUartDataLinkLayer(DeviceObject& devObj, NetworkLayerEntity& netLayerEntity, Platform& platform, ITpUartCallBacks& cb, DataLinkLayerCallbacks* dllcb = nullptr);