mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
fix IndividualAddressSerialNumberReadResponse
This commit is contained in:
parent
38300f7e0d
commit
3c29d16450
@ -567,19 +567,19 @@ void ApplicationLayer::domainAddressSerialNumberReadResponse(Priority priority,
|
||||
|
||||
//TODO: ApplicationLayer::IndividualAddressSerialNumberWriteRequest()
|
||||
//TODO: ApplicationLayer::IndividualAddressSerialNumberReadRequest()
|
||||
void ApplicationLayer::IndividualAddressSerialNumberReadResponse(Priority priority, HopCountType hopType, const SecurityControl &secCtrl, const uint8_t* rfDoA,
|
||||
void ApplicationLayer::IndividualAddressSerialNumberReadResponse(Priority priority, HopCountType hopType, const SecurityControl &secCtrl, const uint8_t* domainAddress,
|
||||
const uint8_t* knxSerialNumber)
|
||||
{
|
||||
CemiFrame frame(13);
|
||||
CemiFrame frame(11);
|
||||
APDU& apdu = frame.apdu();
|
||||
apdu.type(IndividualAddressSerialNumberResponse);
|
||||
|
||||
uint8_t* data = apdu.data() + 1;
|
||||
|
||||
memcpy(data, knxSerialNumber, 6);
|
||||
memcpy(data + 6, rfDoA, 6);
|
||||
memcpy(data + 6, domainAddress, 2);
|
||||
|
||||
//apdu.printPDU();
|
||||
//apdu.printPDU();
|
||||
|
||||
dataBroadcastRequest(AckDontCare, hopType, SystemPriority, apdu, secCtrl);
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ class ApplicationLayer
|
||||
uint8_t* testResult, uint16_t testResultLength);
|
||||
void domainAddressSerialNumberReadResponse(Priority priority, HopCountType hopType, const SecurityControl& secCtrl, const uint8_t* rfDoA,
|
||||
const uint8_t* knxSerialNumber);
|
||||
void IndividualAddressSerialNumberReadResponse(Priority priority, HopCountType hopType, const SecurityControl& secCtrl, const uint8_t* rfDoA,
|
||||
void IndividualAddressSerialNumberReadResponse(Priority priority, HopCountType hopType, const SecurityControl& secCtrl, const uint8_t* domainAddress,
|
||||
const uint8_t* knxSerialNumber);
|
||||
#pragma endregion
|
||||
|
||||
|
@ -169,10 +169,7 @@ void Bau27B0::domainAddressSerialNumberReadIndication(Priority priority, HopCoun
|
||||
|
||||
void Bau27B0::individualAddressSerialNumberReadIndication(Priority priority, HopCountType hopType, const SecurityControl &secCtrl, uint8_t* knxSerialNumber)
|
||||
{
|
||||
// If the received serial number matches our serial number
|
||||
// then send a response with the current RF domain address stored in the RF medium object and the serial number
|
||||
if (!memcmp(knxSerialNumber, _deviceObj.propertyData(PID_SERIAL_NUMBER), 6))
|
||||
_appLayer.IndividualAddressSerialNumberReadResponse(priority, hopType, secCtrl, _rfMediumObj.rfDomainAddress(), knxSerialNumber);
|
||||
#pragma warning "individualAddressSerialNumberReadIndication is not available for rf"
|
||||
}
|
||||
|
||||
void Bau27B0::domainAddressSerialNumberWriteLocalConfirm(Priority priority, HopCountType hopType, const SecurityControl &secCtrl, const uint8_t* rfDoA,
|
||||
|
@ -494,7 +494,7 @@ void BauSystemB::individualAddressSerialNumberReadIndication(Priority priority,
|
||||
// An open medium BAU has to override this method and provide a proper domain address.
|
||||
if (!memcmp(knxSerialNumber, _deviceObj.propertyData(PID_SERIAL_NUMBER), 6))
|
||||
{
|
||||
uint8_t emptyDomainAddress[6] = {0x00};
|
||||
uint8_t emptyDomainAddress[2] = {0x00};
|
||||
applicationLayer().IndividualAddressSerialNumberReadResponse(priority, hopType, secCtrl, emptyDomainAddress, knxSerialNumber);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user