mirror of
https://github.com/thelsing/knx.git
synced 2025-03-13 00:15:58 +01:00
Rework
This commit is contained in:
parent
73a0989a3b
commit
2d70750378
@ -118,7 +118,7 @@ void ApplicationLayer::dataBroadcastIndication(HopCountType hopType, Priority pr
|
||||
break;
|
||||
}
|
||||
default:
|
||||
#if (defined(USE_TP)||defined(USE_IP))
|
||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
||||
dataSystemBroadcastIndication(hopType, priority, source, apdu);
|
||||
#else
|
||||
print("Broadcast-indication: unhandled APDU-Type: ");
|
||||
@ -163,7 +163,7 @@ void ApplicationLayer::dataBroadcastConfirm(AckType ack, HopCountType hopType, P
|
||||
break;
|
||||
}
|
||||
default:
|
||||
#if (defined(USE_TP)||defined(USE_IP))
|
||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
||||
dataSystemBroadcastConfirm(hopType, priority, apdu, status);
|
||||
#else
|
||||
print("Broadcast-confirm: unhandled APDU-Type: ");
|
||||
@ -206,14 +206,14 @@ void ApplicationLayer::dataSystemBroadcastIndication(HopCountType hopType, Prior
|
||||
break;
|
||||
}
|
||||
default:
|
||||
#if !(defined(USE_TP)||defined(USE_IP))
|
||||
// For open media (e.g. PL, RF)
|
||||
print("SystemBroadcast-indication: unhandled APDU-Type: ");
|
||||
println(apdu.type());
|
||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
||||
// For closed media
|
||||
print("Broadcast-indication: unhandled APDU-Type: ");
|
||||
println(apdu.type());
|
||||
#else
|
||||
// For closed media
|
||||
print("Broadcast-indication: unhandled APDU-Type: ");
|
||||
println(apdu.type());
|
||||
// For open media (e.g. PL, RF)
|
||||
print("SystemBroadcast-indication: unhandled APDU-Type: ");
|
||||
println(apdu.type());
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
@ -252,14 +252,14 @@ void ApplicationLayer::dataSystemBroadcastConfirm(HopCountType hopType, Priority
|
||||
break;
|
||||
}
|
||||
default:
|
||||
#if !(defined(USE_TP)||defined(USE_IP))
|
||||
// For open media (e.g. PL, RF)
|
||||
print("SystemBroadcast-confirm: unhandled APDU-Type: ");
|
||||
println(apdu.type());
|
||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
||||
// For closed media
|
||||
print("Broadcast-confirm: unhandled APDU-Type: ");
|
||||
println(apdu.type());
|
||||
#else
|
||||
// For closed media
|
||||
print("Broadcast-confirm: unhandled APDU-Type: ");
|
||||
println(apdu.type());
|
||||
// For open media (e.g. PL, RF)
|
||||
print("SystemBroadcast-confirm: unhandled APDU-Type: ");
|
||||
println(apdu.type());
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
@ -45,10 +45,10 @@ void DataLinkLayer::systemBroadcastRequest(AckType ack, FrameFormat format, Prio
|
||||
{
|
||||
// System Broadcast requests will always be transmitted as broadcast with KNX serial number for open media (e.g. RF medium)
|
||||
// See 3.2.5 p.22
|
||||
#if !(defined(USE_TP)||defined(USE_IP))
|
||||
sendTelegram(npdu, ack, 0, GroupAddress, format, priority, SysBroadcast);
|
||||
#else
|
||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
||||
sendTelegram(npdu, ack, 0, GroupAddress, format, priority, Broadcast);
|
||||
#else
|
||||
sendTelegram(npdu, ack, 0, GroupAddress, format, priority, SysBroadcast);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -78,13 +78,13 @@ void DataLinkLayer::dataConReceived(CemiFrame& frame, bool success)
|
||||
|
||||
if (addrType == GroupAddress && destination == 0)
|
||||
{
|
||||
#if !(defined(USE_TP)||defined(USE_IP))
|
||||
if (systemBroadcast == SysBroadcast)
|
||||
_networkLayer.systemBroadcastConfirm(ack, type, priority, source, npdu, success);
|
||||
else
|
||||
_networkLayer.broadcastConfirm(ack, type, priority, source, npdu, success);
|
||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
||||
(void) systemBroadcast; // not used
|
||||
_networkLayer.broadcastConfirm(ack, type, priority, source, npdu, success);
|
||||
#else
|
||||
(void) systemBroadcast; // not used
|
||||
if (systemBroadcast == SysBroadcast)
|
||||
_networkLayer.systemBroadcastConfirm(ack, type, priority, source, npdu, success);
|
||||
else
|
||||
_networkLayer.broadcastConfirm(ack, type, priority, source, npdu, success);
|
||||
#endif
|
||||
}
|
||||
@ -119,14 +119,14 @@ void DataLinkLayer::frameRecieved(CemiFrame& frame)
|
||||
|
||||
if (addrType == GroupAddress && destination == 0)
|
||||
{
|
||||
#if !(defined(USE_TP)||defined(USE_IP))
|
||||
if (systemBroadcast == SysBroadcast)
|
||||
_networkLayer.systemBroadcastIndication(ack, type, npdu, priority, source);
|
||||
else
|
||||
_networkLayer.broadcastIndication(ack, type, npdu, priority, source);
|
||||
#else
|
||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
||||
(void) systemBroadcast; // not used
|
||||
_networkLayer.broadcastIndication(ack, type, npdu, priority, source);
|
||||
#else
|
||||
if (systemBroadcast == SysBroadcast)
|
||||
_networkLayer.systemBroadcastIndication(ack, type, npdu, priority, source);
|
||||
else
|
||||
_networkLayer.broadcastIndication(ack, type, npdu, priority, source);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user