mirror of
https://github.com/thelsing/knx.git
synced 2025-08-17 13:47:28 +02:00
fixed typo: induvidualAddress
This commit is contained in:
parent
66d862f599
commit
ed20f394c1
@ -51,7 +51,7 @@ void setup()
|
||||
srand((unsigned int)time(NULL));
|
||||
knx.readMemory();
|
||||
|
||||
if (knx.induvidualAddress() == 0)
|
||||
if (knx.individualAddress() == 0)
|
||||
knx.progMode(true);
|
||||
|
||||
if (knx.configured())
|
||||
|
@ -97,7 +97,7 @@ void setup()
|
||||
srand((unsigned int)time(NULL));
|
||||
knx.readMemory();
|
||||
|
||||
if (knx.induvidualAddress() == 0)
|
||||
if (knx.individualAddress() == 0)
|
||||
knx.progMode(true);
|
||||
|
||||
if (knx.configured())
|
||||
|
@ -75,7 +75,7 @@ void setup(void)
|
||||
// read adress table, association table, groupobject table and parameters from eeprom
|
||||
knx.readMemory();
|
||||
|
||||
if (knx.induvidualAddress() == 0)
|
||||
if (knx.individualAddress() == 0)
|
||||
knx.progMode(true);
|
||||
|
||||
|
||||
|
@ -139,7 +139,7 @@ bool Bau07B0::isAckRequired(uint16_t address, bool isGrpAddr)
|
||||
}
|
||||
|
||||
// Also ACK for our own individual address
|
||||
if (address == _deviceObj.induvidualAddress())
|
||||
if (address == _deviceObj.individualAddress())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@ -441,7 +441,7 @@ void BauSystemB::individualAddressReadIndication(HopCountType hopType, const Sec
|
||||
void BauSystemB::individualAddressWriteIndication(HopCountType hopType, const SecurityControl &secCtrl, uint16_t newaddress)
|
||||
{
|
||||
if (_deviceObj.progMode())
|
||||
_deviceObj.induvidualAddress(newaddress);
|
||||
_deviceObj.individualAddress(newaddress);
|
||||
}
|
||||
|
||||
void BauSystemB::individualAddressSerialNumberWriteIndication(Priority priority, HopCountType hopType, const SecurityControl &secCtrl, uint16_t newIndividualAddress,
|
||||
@ -450,7 +450,7 @@ void BauSystemB::individualAddressSerialNumberWriteIndication(Priority priority,
|
||||
// If the received serial number matches our serial number
|
||||
// then store the received new individual address in the device object
|
||||
if (!memcmp(knxSerialNumber, _deviceObj.propertyData(PID_SERIAL_NUMBER), 6))
|
||||
_deviceObj.induvidualAddress(newIndividualAddress);
|
||||
_deviceObj.individualAddress(newIndividualAddress);
|
||||
}
|
||||
|
||||
void BauSystemB::individualAddressSerialNumberReadIndication(Priority priority, HopCountType hopType, const SecurityControl &secCtrl, uint8_t* knxSerialNumber)
|
||||
|
@ -18,7 +18,7 @@ CemiServer::CemiServer(BauSystemB& bau)
|
||||
{
|
||||
// The cEMI server will hand out the device address + 1 to the cEMI client (e.g. ETS),
|
||||
// so that the device and the cEMI client/server connection(tunnel) can operate simultaneously.
|
||||
_clientAddress = _bau.deviceObject().induvidualAddress() + 1;
|
||||
_clientAddress = _bau.deviceObject().individualAddress() + 1;
|
||||
}
|
||||
|
||||
void CemiServer::dataLinkLayer(DataLinkLayer& layer)
|
||||
|
@ -91,7 +91,7 @@ void DataLinkLayer::frameReceived(CemiFrame& frame)
|
||||
FrameFormat type = frame.frameType();
|
||||
Priority priority = frame.priority();
|
||||
NPDU& npdu = frame.npdu();
|
||||
uint16_t ownAddr = _deviceObject.induvidualAddress();
|
||||
uint16_t ownAddr = _deviceObject.individualAddress();
|
||||
SystemBroadcast systemBroadcast = frame.systemBroadcast();
|
||||
|
||||
#ifdef USE_CEMI_SERVER
|
||||
|
@ -113,12 +113,12 @@ uint16_t DeviceObject::saveSize()
|
||||
return 2 + InterfaceObject::saveSize();
|
||||
}
|
||||
|
||||
uint16_t DeviceObject::induvidualAddress()
|
||||
uint16_t DeviceObject::individualAddress()
|
||||
{
|
||||
return _ownAddress;
|
||||
}
|
||||
|
||||
void DeviceObject::induvidualAddress(uint16_t value)
|
||||
void DeviceObject::individualAddress(uint16_t value)
|
||||
{
|
||||
_ownAddress = value;
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ public:
|
||||
const uint8_t* restore(const uint8_t* buffer) override;
|
||||
uint16_t saveSize() override;
|
||||
|
||||
uint16_t induvidualAddress();
|
||||
void induvidualAddress(uint16_t value);
|
||||
uint16_t individualAddress();
|
||||
void individualAddress(uint16_t value);
|
||||
|
||||
void individualAddressDuplication(bool value);
|
||||
bool verifyMode();
|
||||
|
@ -79,7 +79,7 @@ void IpDataLinkLayer::loop()
|
||||
void IpDataLinkLayer::enabled(bool value)
|
||||
{
|
||||
// _print("own address: ");
|
||||
// _println(_deviceObject.induvidualAddress());
|
||||
// _println(_deviceObject.individualAddress());
|
||||
if (value && !_enabled)
|
||||
{
|
||||
_platform.setupMultiCast(_ipParameters.propertyValue<uint32_t>(PID_ROUTING_MULTICAST_ADDRESS), KNXIP_MULTICAST_PORT);
|
||||
|
@ -26,12 +26,12 @@ IpParameterObject::IpParameterObject(DeviceObject& deviceObject, Platform& platf
|
||||
return 1;
|
||||
}
|
||||
// TODO: get property of deviceobject and use it
|
||||
pushWord(io->_deviceObject.induvidualAddress(), data);
|
||||
pushWord(io->_deviceObject.individualAddress(), data);
|
||||
return 1;
|
||||
},
|
||||
[](IpParameterObject* io, uint16_t start, uint8_t count, const uint8_t* data) -> uint8_t
|
||||
{
|
||||
io->_deviceObject.induvidualAddress(getWord(data));
|
||||
io->_deviceObject.individualAddress(getWord(data));
|
||||
return 1;
|
||||
}),
|
||||
new DataProperty(PID_IP_ASSIGNMENT_METHOD, true, PDT_UNSIGNED_CHAR, 1, ReadLv3 | WriteLv3),
|
||||
|
@ -10,7 +10,7 @@ NetworkLayerCoupler::NetworkLayerCoupler(DeviceObject &deviceObj,
|
||||
NetworkLayer(deviceObj, layer),
|
||||
_netLayerEntities { {*this, kPrimaryIfIndex}, {*this, kSecondaryIfIndex} }
|
||||
{
|
||||
_currentAddress = deviceObj.induvidualAddress();
|
||||
_currentAddress = deviceObj.individualAddress();
|
||||
evaluateCouplerType();
|
||||
}
|
||||
|
||||
@ -43,11 +43,11 @@ void NetworkLayerCoupler::rtObjSecondary(RouterObject& rtObjSecondary)
|
||||
void NetworkLayerCoupler::evaluateCouplerType()
|
||||
{
|
||||
// Check coupler mode
|
||||
if ((_deviceObj.induvidualAddress() & 0x00FF) == 0x00)
|
||||
if ((_deviceObj.individualAddress() & 0x00FF) == 0x00)
|
||||
{
|
||||
// Device is a router
|
||||
// Check if line coupler or backbone coupler
|
||||
if ((_deviceObj.induvidualAddress() & 0x0F00) == 0x0)
|
||||
if ((_deviceObj.individualAddress() & 0x0F00) == 0x0)
|
||||
{
|
||||
// Device is a backbone coupler -> individual address: x.0.0
|
||||
_couplerType = BackboneCoupler;
|
||||
@ -99,7 +99,7 @@ bool NetworkLayerCoupler::isRoutedIndividualAddress(uint16_t individualAddress)
|
||||
// too. A typical use case is the protection of a Subnetwork that is located outside a building)
|
||||
|
||||
// Also ACK for our own individual address
|
||||
if (individualAddress == _deviceObj.induvidualAddress())
|
||||
if (individualAddress == _deviceObj.individualAddress())
|
||||
return true;
|
||||
|
||||
// use 2 for now
|
||||
@ -158,7 +158,7 @@ void NetworkLayerCoupler::routeDataIndividual(AckType ack, uint16_t destination,
|
||||
{
|
||||
// TODO: improve: we have to be notified about anything that might affect routing decision
|
||||
// Ugly: we could ALWAYS evaluate coupler type for every received frame
|
||||
if (_currentAddress != _deviceObj.induvidualAddress())
|
||||
if (_currentAddress != _deviceObj.individualAddress())
|
||||
{
|
||||
evaluateCouplerType();
|
||||
}
|
||||
@ -172,8 +172,8 @@ void NetworkLayerCoupler::routeDataIndividual(AckType ack, uint16_t destination,
|
||||
* Z high nibble of high order octet of the Destination Address, i.e. Area Address
|
||||
* ZS high order octet of the Destination Address, i.e. hierarchy information part: Area Address + Line Address
|
||||
*/
|
||||
uint16_t ownSNA = _deviceObj.induvidualAddress() & 0xFF00; // Own subnetwork address (area + line)
|
||||
uint16_t ownAA = _deviceObj.induvidualAddress() & 0xF000; // Own area address
|
||||
uint16_t ownSNA = _deviceObj.individualAddress() & 0xFF00; // Own subnetwork address (area + line)
|
||||
uint16_t ownAA = _deviceObj.individualAddress() & 0xF000; // Own area address
|
||||
uint16_t ZS = destination & 0xFF00; // destination subnetwork address (area + line)
|
||||
uint16_t Z = destination & 0xF000; // destination area address
|
||||
uint16_t D = destination & 0x00FF; // destination device address (without subnetwork part)
|
||||
@ -324,7 +324,7 @@ void NetworkLayerCoupler::dataConfirm(AckType ack, AddressType addrType, uint16_
|
||||
HopCountType hopType = npdu.hopCount() == 7 ? UnlimitedRouting : NetworkLayerParameter;
|
||||
|
||||
// Check if received frame is an echo from our sent frame, we are a normal device in this case
|
||||
if (source == _deviceObj.induvidualAddress())
|
||||
if (source == _deviceObj.individualAddress())
|
||||
{
|
||||
if (addrType == InduvidualAddress)
|
||||
{
|
||||
@ -365,7 +365,7 @@ void NetworkLayerCoupler::broadcastConfirm(AckType ack, FrameFormat format, Prio
|
||||
HopCountType hopType = npdu.hopCount() == 7 ? UnlimitedRouting : NetworkLayerParameter;
|
||||
|
||||
// Check if received frame is an echo from our sent frame, we are a normal device in this case
|
||||
if (source == _deviceObj.induvidualAddress())
|
||||
if (source == _deviceObj.individualAddress())
|
||||
{
|
||||
_transportLayer.dataBroadcastConfirm(ack, hopType, priority, npdu.tpdu(), status);
|
||||
}
|
||||
@ -386,7 +386,7 @@ void NetworkLayerCoupler::systemBroadcastIndication(AckType ack, FrameFormat for
|
||||
void NetworkLayerCoupler::systemBroadcastConfirm(AckType ack, FrameFormat format, Priority priority, uint16_t source, NPDU& npdu, bool status, uint8_t srcIfIdx)
|
||||
{
|
||||
// Check if received frame is an echo from our sent frame, we are a normal device in this case
|
||||
if (source == _deviceObj.induvidualAddress())
|
||||
if (source == _deviceObj.individualAddress())
|
||||
{
|
||||
HopCountType hopType = npdu.hopCount() == 7 ? UnlimitedRouting : NetworkLayerParameter;
|
||||
_transportLayer.dataSystemBroadcastConfirm(ack, hopType, npdu.tpdu(), priority, status);
|
||||
@ -408,7 +408,7 @@ void NetworkLayerCoupler::dataIndividualRequest(AckType ack, uint16_t destinatio
|
||||
// print.print("-> NL ");
|
||||
// tpdu.apdu().printPDU();
|
||||
//}
|
||||
routeDataIndividual(ack, destination, npdu, priority, _deviceObj.induvidualAddress(), kLocalIfIndex);
|
||||
routeDataIndividual(ack, destination, npdu, priority, _deviceObj.individualAddress(), kLocalIfIndex);
|
||||
}
|
||||
|
||||
void NetworkLayerCoupler::dataGroupRequest(AckType ack, uint16_t destination, HopCountType hopType, Priority priority, TPDU& tpdu)
|
||||
@ -423,10 +423,10 @@ void NetworkLayerCoupler::dataGroupRequest(AckType ack, uint16_t destination, Ho
|
||||
// If the group address is in the filter table, then we route it to the primary side too
|
||||
if (isGroupAddressInFilterTable(destination))
|
||||
{
|
||||
_netLayerEntities[kPrimaryIfIndex].sendDataRequest(npdu, ack, destination, _deviceObj.induvidualAddress(), priority, GroupAddress, Broadcast);
|
||||
_netLayerEntities[kPrimaryIfIndex].sendDataRequest(npdu, ack, destination, _deviceObj.individualAddress(), priority, GroupAddress, Broadcast);
|
||||
}
|
||||
// We send it to our sub line in any case
|
||||
_netLayerEntities[kSecondaryIfIndex].sendDataRequest(npdu, ack, destination, _deviceObj.induvidualAddress(), priority, GroupAddress, Broadcast);
|
||||
_netLayerEntities[kSecondaryIfIndex].sendDataRequest(npdu, ack, destination, _deviceObj.individualAddress(), priority, GroupAddress, Broadcast);
|
||||
}
|
||||
|
||||
void NetworkLayerCoupler::dataBroadcastRequest(AckType ack, HopCountType hopType, Priority priority, TPDU& tpdu)
|
||||
@ -438,8 +438,8 @@ void NetworkLayerCoupler::dataBroadcastRequest(AckType ack, HopCountType hopType
|
||||
else
|
||||
npdu.hopCount(hopCount());
|
||||
|
||||
_netLayerEntities[kPrimaryIfIndex].sendDataRequest(npdu, ack, 0, _deviceObj.induvidualAddress(), priority, GroupAddress, Broadcast);
|
||||
_netLayerEntities[kSecondaryIfIndex].sendDataRequest(npdu, ack, 0, _deviceObj.induvidualAddress(), priority, GroupAddress, Broadcast);
|
||||
_netLayerEntities[kPrimaryIfIndex].sendDataRequest(npdu, ack, 0, _deviceObj.individualAddress(), priority, GroupAddress, Broadcast);
|
||||
_netLayerEntities[kSecondaryIfIndex].sendDataRequest(npdu, ack, 0, _deviceObj.individualAddress(), priority, GroupAddress, Broadcast);
|
||||
}
|
||||
|
||||
void NetworkLayerCoupler::dataSystemBroadcastRequest(AckType ack, HopCountType hopType, Priority priority, TPDU& tpdu)
|
||||
@ -451,6 +451,6 @@ void NetworkLayerCoupler::dataSystemBroadcastRequest(AckType ack, HopCountType h
|
||||
else
|
||||
npdu.hopCount(hopCount());
|
||||
|
||||
_netLayerEntities[kPrimaryIfIndex].sendDataRequest(npdu, ack, 0, _deviceObj.induvidualAddress(), priority, GroupAddress, SysBroadcast);
|
||||
_netLayerEntities[kSecondaryIfIndex].sendDataRequest(npdu, ack, 0, _deviceObj.induvidualAddress(), priority, GroupAddress, SysBroadcast);
|
||||
_netLayerEntities[kPrimaryIfIndex].sendDataRequest(npdu, ack, 0, _deviceObj.individualAddress(), priority, GroupAddress, SysBroadcast);
|
||||
_netLayerEntities[kSecondaryIfIndex].sendDataRequest(npdu, ack, 0, _deviceObj.individualAddress(), priority, GroupAddress, SysBroadcast);
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ void NetworkLayerDevice::dataIndividualRequest(AckType ack, uint16_t destination
|
||||
// print.print("-> NL ");
|
||||
// tpdu.apdu().printPDU();
|
||||
//}
|
||||
_netLayerEntities[kInterfaceIndex].sendDataRequest(npdu, ack, destination, _deviceObj.induvidualAddress(), priority, InduvidualAddress, Broadcast);
|
||||
_netLayerEntities[kInterfaceIndex].sendDataRequest(npdu, ack, destination, _deviceObj.individualAddress(), priority, InduvidualAddress, Broadcast);
|
||||
}
|
||||
|
||||
void NetworkLayerDevice::dataGroupRequest(AckType ack, uint16_t destination, HopCountType hopType, Priority priority, TPDU& tpdu)
|
||||
@ -41,7 +41,7 @@ void NetworkLayerDevice::dataGroupRequest(AckType ack, uint16_t destination, Hop
|
||||
else
|
||||
npdu.hopCount(hopCount());
|
||||
|
||||
_netLayerEntities[kInterfaceIndex].sendDataRequest(npdu, ack, destination, _deviceObj.induvidualAddress(), priority, GroupAddress, Broadcast);
|
||||
_netLayerEntities[kInterfaceIndex].sendDataRequest(npdu, ack, destination, _deviceObj.individualAddress(), priority, GroupAddress, Broadcast);
|
||||
}
|
||||
|
||||
void NetworkLayerDevice::dataBroadcastRequest(AckType ack, HopCountType hopType, Priority priority, TPDU& tpdu)
|
||||
@ -53,7 +53,7 @@ void NetworkLayerDevice::dataBroadcastRequest(AckType ack, HopCountType hopType,
|
||||
else
|
||||
npdu.hopCount(hopCount());
|
||||
|
||||
_netLayerEntities[kInterfaceIndex].sendDataRequest(npdu, ack, 0, _deviceObj.induvidualAddress(), priority, GroupAddress, Broadcast);
|
||||
_netLayerEntities[kInterfaceIndex].sendDataRequest(npdu, ack, 0, _deviceObj.individualAddress(), priority, GroupAddress, Broadcast);
|
||||
}
|
||||
|
||||
void NetworkLayerDevice::dataSystemBroadcastRequest(AckType ack, HopCountType hopType, Priority priority, TPDU& tpdu)
|
||||
@ -69,7 +69,7 @@ void NetworkLayerDevice::dataSystemBroadcastRequest(AckType ack, HopCountType ho
|
||||
else
|
||||
npdu.hopCount(hopCount());
|
||||
|
||||
_netLayerEntities[kInterfaceIndex].sendDataRequest(npdu, ack, 0, _deviceObj.induvidualAddress(), priority, GroupAddress, broadcastType);
|
||||
_netLayerEntities[kInterfaceIndex].sendDataRequest(npdu, ack, 0, _deviceObj.individualAddress(), priority, GroupAddress, broadcastType);
|
||||
}
|
||||
|
||||
void NetworkLayerDevice::dataIndication(AckType ack, AddressType addrType, uint16_t destination, FrameFormat format, NPDU& npdu, Priority priority, uint16_t source, uint8_t srcIfIdx)
|
||||
@ -78,7 +78,7 @@ void NetworkLayerDevice::dataIndication(AckType ack, AddressType addrType, uint1
|
||||
|
||||
if (addrType == InduvidualAddress)
|
||||
{
|
||||
if (destination != _deviceObj.induvidualAddress())
|
||||
if (destination != _deviceObj.individualAddress())
|
||||
return;
|
||||
|
||||
_transportLayer.dataIndividualIndication(destination, hopType, priority, source, npdu.tpdu());
|
||||
|
@ -246,7 +246,7 @@ void RfDataLinkLayer::enabled(bool value)
|
||||
{
|
||||
_enabled = true;
|
||||
print("ownaddr ");
|
||||
println(_deviceObject.induvidualAddress(), HEX);
|
||||
println(_deviceObject.individualAddress(), HEX);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -307,7 +307,7 @@ void SecureApplicationLayer::dataGroupRequest(AckType ack, HopCountType hopType,
|
||||
|
||||
if (secCtrl.dataSecurity != DataSecurity::none)
|
||||
{
|
||||
apdu.frame().sourceAddress(_deviceObj.induvidualAddress());
|
||||
apdu.frame().sourceAddress(_deviceObj.individualAddress());
|
||||
apdu.frame().destinationAddress(_addrTab->getGroupAddress(tsap));
|
||||
apdu.frame().addressType(GroupAddress);
|
||||
|
||||
@ -330,7 +330,7 @@ void SecureApplicationLayer::dataBroadcastRequest(AckType ack, HopCountType hopT
|
||||
|
||||
if (secCtrl.dataSecurity != DataSecurity::none)
|
||||
{
|
||||
apdu.frame().sourceAddress(_deviceObj.induvidualAddress());
|
||||
apdu.frame().sourceAddress(_deviceObj.individualAddress());
|
||||
apdu.frame().destinationAddress(0x0000);
|
||||
apdu.frame().addressType(GroupAddress);
|
||||
apdu.frame().systemBroadcast(Broadcast);
|
||||
@ -354,7 +354,7 @@ void SecureApplicationLayer::dataSystemBroadcastRequest(AckType ack, HopCountTyp
|
||||
|
||||
if (secCtrl.dataSecurity != DataSecurity::none)
|
||||
{
|
||||
apdu.frame().sourceAddress(_deviceObj.induvidualAddress());
|
||||
apdu.frame().sourceAddress(_deviceObj.individualAddress());
|
||||
apdu.frame().destinationAddress(0x0000);
|
||||
apdu.frame().addressType(GroupAddress);
|
||||
apdu.frame().systemBroadcast(SysBroadcast);
|
||||
@ -378,7 +378,7 @@ void SecureApplicationLayer::dataIndividualRequest(AckType ack, HopCountType hop
|
||||
|
||||
if (secCtrl.dataSecurity != DataSecurity::none)
|
||||
{
|
||||
apdu.frame().sourceAddress(_deviceObj.induvidualAddress());
|
||||
apdu.frame().sourceAddress(_deviceObj.individualAddress());
|
||||
apdu.frame().destinationAddress(destination);
|
||||
apdu.frame().addressType(InduvidualAddress);
|
||||
|
||||
@ -401,7 +401,7 @@ void SecureApplicationLayer::dataConnectedRequest(uint16_t tsap, Priority priori
|
||||
|
||||
if (secCtrl.dataSecurity != DataSecurity::none)
|
||||
{
|
||||
apdu.frame().sourceAddress(_deviceObj.induvidualAddress());
|
||||
apdu.frame().sourceAddress(_deviceObj.individualAddress());
|
||||
apdu.frame().destinationAddress(_transportLayer->getConnectionAddress());
|
||||
apdu.frame().addressType(InduvidualAddress);
|
||||
|
||||
@ -568,7 +568,7 @@ uint64_t SecureApplicationLayer::lastValidSequenceNumber(bool toolAccess, uint16
|
||||
if (toolAccess)
|
||||
{
|
||||
// TODO: check if we really have to support multiple tools at the same time
|
||||
if (srcAddr == _deviceObj.induvidualAddress())
|
||||
if (srcAddr == _deviceObj.individualAddress())
|
||||
return _sequenceNumberToolAccess;
|
||||
return _lastValidSequenceNumberTool;
|
||||
}
|
||||
@ -621,7 +621,7 @@ void SecureApplicationLayer::sendSyncRequest(uint16_t dstAddr, bool dstAddrIsGro
|
||||
print("sendSyncRequest: TPCI: ");
|
||||
println(tpci, HEX);
|
||||
|
||||
if(secure(request.data() + APDU_LPDU_DIFF, kSecureSyncRequest, _deviceObj.induvidualAddress(), dstAddr, dstAddrIsGroupAddr, tpci, asdu, sizeof(asdu), secCtrl, systemBcast))
|
||||
if(secure(request.data() + APDU_LPDU_DIFF, kSecureSyncRequest, _deviceObj.individualAddress(), dstAddr, dstAddrIsGroupAddr, tpci, asdu, sizeof(asdu), secCtrl, systemBcast))
|
||||
{
|
||||
println("SyncRequest: ");
|
||||
request.apdu().printPDU();
|
||||
@ -681,7 +681,7 @@ void SecureApplicationLayer::sendSyncResponse(uint16_t dstAddr, bool dstAddrIsGr
|
||||
print("sendSyncResponse: TPCI: ");
|
||||
println(tpci, HEX);
|
||||
|
||||
if(secure(response.data() + APDU_LPDU_DIFF, kSecureSyncResponse, _deviceObj.induvidualAddress(), dstAddr, dstAddrIsGroupAddr, tpci, asdu, sizeof(asdu), secCtrl, systemBcast))
|
||||
if(secure(response.data() + APDU_LPDU_DIFF, kSecureSyncResponse, _deviceObj.individualAddress(), dstAddr, dstAddrIsGroupAddr, tpci, asdu, sizeof(asdu), secCtrl, systemBcast))
|
||||
{
|
||||
_lastSyncRes = millis();
|
||||
|
||||
@ -823,7 +823,7 @@ bool SecureApplicationLayer::decrypt(uint8_t* plainApdu, uint16_t plainApduLengt
|
||||
|
||||
if (service == kSecureDataPdu)
|
||||
{
|
||||
if (srcAddr != _deviceObj.induvidualAddress())
|
||||
if (srcAddr != _deviceObj.individualAddress())
|
||||
{
|
||||
uint64_t expectedSeqNumber = lastValidSequenceNumber(toolAccess, srcAddr) + 1;
|
||||
|
||||
@ -847,7 +847,7 @@ bool SecureApplicationLayer::decrypt(uint8_t* plainApdu, uint16_t plainApduLengt
|
||||
if (!memcmp(knxSerialNumber, _deviceObj.propertyData(PID_SERIAL_NUMBER), 6))
|
||||
{
|
||||
uint8_t emptySerialNumber[6] = {0};
|
||||
if (systemBroadcast || dstAddr != _deviceObj.induvidualAddress() || !memcmp(knxSerialNumber, emptySerialNumber, 6))
|
||||
if (systemBroadcast || dstAddr != _deviceObj.individualAddress() || !memcmp(knxSerialNumber, emptySerialNumber, 6))
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -970,7 +970,7 @@ bool SecureApplicationLayer::decrypt(uint8_t* plainApdu, uint16_t plainApduLengt
|
||||
|
||||
// prevent a sync.req sent by us to trigger sync notification, this happens if we provide our own tool key
|
||||
// for decryption above
|
||||
if (syncReq && (srcAddr == _deviceObj.induvidualAddress()))
|
||||
if (syncReq && (srcAddr == _deviceObj.individualAddress()))
|
||||
return false;
|
||||
|
||||
if (syncReq)
|
||||
@ -986,7 +986,7 @@ bool SecureApplicationLayer::decrypt(uint8_t* plainApdu, uint16_t plainApduLengt
|
||||
}
|
||||
else
|
||||
{
|
||||
if (srcAddr == _deviceObj.induvidualAddress())
|
||||
if (srcAddr == _deviceObj.individualAddress())
|
||||
{
|
||||
print("Update our next ");
|
||||
print(toolAccess ? "tool access" : "");
|
||||
|
@ -444,7 +444,7 @@ void TpUartDataLinkLayer::enabled(bool value)
|
||||
{
|
||||
_enabled = true;
|
||||
print("ownaddr ");
|
||||
println(_deviceObject.induvidualAddress(), HEX);
|
||||
println(_deviceObject.individualAddress(), HEX);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -160,9 +160,9 @@ template <class P, class B> class KnxFacade : private SaveRestore
|
||||
_bau.writeMemory();
|
||||
}
|
||||
|
||||
uint16_t induvidualAddress()
|
||||
uint16_t individualAddress()
|
||||
{
|
||||
return _bau.deviceObject().induvidualAddress();
|
||||
return _bau.deviceObject().individualAddress();
|
||||
}
|
||||
|
||||
void loop()
|
||||
|
Loading…
Reference in New Issue
Block a user