From 66b31a6dd7ddfb8c063dae5b352fde0a3c76418a Mon Sep 17 00:00:00 2001 From: Nanosonde <2073569+nanosonde@users.noreply.github.com> Date: Tue, 9 Jun 2020 12:21:00 +0200 Subject: [PATCH] Make sure that services from SystemBroadcast are also available from Broadcast on closed media --- src/knx/application_layer.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/knx/application_layer.cpp b/src/knx/application_layer.cpp index 4dcb993..26480bb 100644 --- a/src/knx/application_layer.cpp +++ b/src/knx/application_layer.cpp @@ -118,8 +118,14 @@ void ApplicationLayer::dataBroadcastIndication(HopCountType hopType, Priority pr break; } default: +#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0) + // Make sure we also check if it is a service normally available only on SystemBroadcast on open media + dataSystemBroadcastIndication(hopType, priority, source, apdu); +#else print("Broadcast-indication: unhandled APDU-Type: "); println(apdu.type()); + break; +#endif } } @@ -159,8 +165,14 @@ void ApplicationLayer::dataBroadcastConfirm(AckType ack, HopCountType hopType, P break; } default: +#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0) + // Make sure we also check if it is a service normally available only on SystemBroadcast on open media + dataSystemBroadcastConfirm(hopType, priority, apdu, status); +#else print("Broadcast-confirm: unhandled APDU-Type: "); println(apdu.type()); + break; +#endif } } @@ -198,7 +210,11 @@ void ApplicationLayer::dataSystemBroadcastIndication(HopCountType hopType, Prior break; } default: +#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0) + print("Broadcast-indication: unhandled APDU-Type: "); +#else print("SystemBroadcast-indication: unhandled APDU-Type: "); +#endif println(apdu.type()); break; } @@ -238,7 +254,11 @@ void ApplicationLayer::dataSystemBroadcastConfirm(HopCountType hopType, Priority break; } default: +#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0) + print("Broadcast-confirm: unhandled APDU-Type: "); +#else print("SystemBroadcast-confirm: unhandled APDU-Type: "); +#endif println(apdu.type()); break; }