mirror of
https://github.com/thelsing/knx.git
synced 2025-09-05 17:50:22 +02:00
handle SBC on closed media
This commit is contained in:
parent
79354f2394
commit
f46778c176
@ -142,14 +142,8 @@ void ApplicationLayer::dataBroadcastIndication(HopCountType hopType, Priority pr
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
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, secCtrl);
|
|
||||||
#else
|
|
||||||
print("Broadcast-indication: unhandled APDU-Type: ");
|
print("Broadcast-indication: unhandled APDU-Type: ");
|
||||||
println(apdu.type());
|
println(apdu.type());
|
||||||
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -195,14 +189,8 @@ void ApplicationLayer::dataBroadcastConfirm(AckType ack, HopCountType hopType, P
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
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, secCtrl, status);
|
|
||||||
#else
|
|
||||||
print("Broadcast-confirm: unhandled APDU-Type: ");
|
print("Broadcast-confirm: unhandled APDU-Type: ");
|
||||||
println(apdu.type());
|
println(apdu.type());
|
||||||
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -246,11 +234,7 @@ void ApplicationLayer::dataSystemBroadcastIndication(HopCountType hopType, Prior
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
|
||||||
print("Broadcast-indication: unhandled APDU-Type: ");
|
|
||||||
#else
|
|
||||||
print("SystemBroadcast-indication: unhandled APDU-Type: ");
|
print("SystemBroadcast-indication: unhandled APDU-Type: ");
|
||||||
#endif
|
|
||||||
println(apdu.type());
|
println(apdu.type());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -294,11 +278,7 @@ void ApplicationLayer::dataSystemBroadcastConfirm(HopCountType hopType, Priority
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
#if (MEDIUM_TYPE == 5)||(MEDIUM_TYPE == 0)
|
|
||||||
print("Broadcast-confirm: unhandled APDU-Type: ");
|
|
||||||
#else
|
|
||||||
print("SystemBroadcast-confirm: unhandled APDU-Type: ");
|
print("SystemBroadcast-confirm: unhandled APDU-Type: ");
|
||||||
#endif
|
|
||||||
println(apdu.type());
|
println(apdu.type());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -107,6 +107,15 @@ void NetworkLayer::dataConfirm(AckType ack, AddressType addressType, uint16_t de
|
|||||||
void NetworkLayer::broadcastIndication(AckType ack, FrameFormat format, NPDU& npdu, Priority priority, uint16_t source)
|
void NetworkLayer::broadcastIndication(AckType ack, FrameFormat format, NPDU& npdu, Priority priority, uint16_t source)
|
||||||
{
|
{
|
||||||
HopCountType hopType = npdu.hopCount() == 7 ? UnlimitedRouting : NetworkLayerParameter;
|
HopCountType hopType = npdu.hopCount() == 7 ? UnlimitedRouting : NetworkLayerParameter;
|
||||||
|
|
||||||
|
// for closed media like TP1 and IP
|
||||||
|
if (isApciSystemBroadcast(npdu.tpdu().apdu()))
|
||||||
|
{
|
||||||
|
npdu.frame().systemBroadcast(SysBroadcast);
|
||||||
|
_transportLayer.dataSystemBroadcastIndication(hopType, priority, source, npdu.tpdu());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_transportLayer.dataBroadcastIndication(hopType, priority, source, npdu.tpdu());
|
_transportLayer.dataBroadcastIndication(hopType, priority, source, npdu.tpdu());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user