mirror of
https://github.com/thelsing/knx.git
synced 2025-02-04 00:16:20 +01:00
save work
This commit is contained in:
parent
0dc98b2a30
commit
0f794ab2ea
@ -62,10 +62,6 @@ void BauSystemB::sendNextGroupTelegram()
|
||||
if(!configured())
|
||||
return;
|
||||
|
||||
// TODO: get security flags from Security Interface Object for this group object
|
||||
SecurityControl goSecurity;
|
||||
goSecurity.dataSecurity = DataSecurity::none;
|
||||
|
||||
static uint16_t startIdx = 1;
|
||||
|
||||
GroupObjectTableObject& table = _groupObjTable;
|
||||
@ -82,6 +78,18 @@ void BauSystemB::sendNextGroupTelegram()
|
||||
if (!go.communicationEnable())
|
||||
continue;
|
||||
|
||||
SecurityControl goSecurity;
|
||||
// TODO: what do we do with it?
|
||||
goSecurity.toolAccess;
|
||||
|
||||
#ifdef USE_DATASECURE
|
||||
// Get security flags from Security Interface Object for this group object
|
||||
goSecurity.dataSecurity = _appLayer.getGoSecurityFlags(asap);
|
||||
|
||||
#else
|
||||
goSecurity.dataSecurity = DataSecurity::none;
|
||||
#endif
|
||||
|
||||
if (flag == WriteRequest && go.transmitEnable())
|
||||
{
|
||||
uint8_t* data = go.valueRef();
|
||||
|
@ -1275,3 +1275,8 @@ bool SecureApplicationLayer::isSyncService(APDU& secureApdu)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
DataSecurity SecureApplicationLayer::getGoSecurityFlags(uint16_t index)
|
||||
{
|
||||
return _secIfObj.getGoSecurityFlags(index);
|
||||
}
|
||||
|
@ -35,6 +35,8 @@ class SecureApplicationLayer : public ApplicationLayer
|
||||
void getFailureCounters(uint8_t* data);
|
||||
uint8_t getFromFailureLogByIndex(uint8_t index, uint8_t* data, uint8_t maxDataLen);
|
||||
|
||||
DataSecurity getGoSecurityFlags(uint16_t index);
|
||||
|
||||
// from transport layer
|
||||
virtual void dataGroupIndication(HopCountType hopType, Priority priority, uint16_t tsap, APDU& apdu) override;
|
||||
virtual void dataGroupConfirm(AckType ack, HopCountType hopType, Priority priority, uint16_t tsap,
|
||||
|
@ -491,5 +491,12 @@ void SecurityInterfaceObject::setLastValidSequenceNumber(uint16_t deviceAddr, ui
|
||||
}
|
||||
}
|
||||
|
||||
DataSecurity SecurityInterfaceObject::getGoSecurityFlags(uint16_t index)
|
||||
{
|
||||
// TODO
|
||||
// PID_GO_SECURITY_FLAGS
|
||||
return DataSecurity::none;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#ifdef USE_DATASECURE
|
||||
|
||||
#include "interface_object.h"
|
||||
#include "knx_types.h"
|
||||
|
||||
class SecureApplicationLayer;
|
||||
|
||||
@ -32,6 +33,8 @@ public:
|
||||
uint64_t getLastValidSequenceNumber(uint16_t deviceAddr);
|
||||
void setLastValidSequenceNumber(uint16_t deviceAddr, uint64_t seqNum);
|
||||
|
||||
DataSecurity getGoSecurityFlags(uint16_t index);
|
||||
|
||||
private:
|
||||
SecureApplicationLayer* _secAppLayer = nullptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user