mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
GroupObjects can communicate internally (#194)
* GroupObjects can communicate internally - GroupObjects use callback infrastructure also during write to bus - external and internal write of a GO can be handled identically - needs #define INTERNAL_GROUPOBJECT * FIX-Works now also if SMALL_GROUPOBJECT is not set * Remove #ifdef INTERNAL_GROUPOBJECT Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
This commit is contained in:
parent
2453c3ce5d
commit
9c620a013d
@ -69,8 +69,21 @@ void BauSystemBDevice::sendNextGroupTelegram()
|
||||
if (flag != ReadRequest && flag != WriteRequest)
|
||||
continue;
|
||||
|
||||
if (flag == WriteRequest)
|
||||
{
|
||||
#ifdef SMALL_GROUPOBJECT
|
||||
GroupObject::processClassCallback(go);
|
||||
#else
|
||||
GroupObjectUpdatedHandler handler = go.callback();
|
||||
if (handler)
|
||||
handler(go);
|
||||
#endif
|
||||
}
|
||||
if (!go.communicationEnable())
|
||||
{
|
||||
go.commFlag(Ok);
|
||||
continue;
|
||||
}
|
||||
|
||||
SecurityControl goSecurity;
|
||||
goSecurity.toolAccess = false; // Secured group communication never uses the toolkey. ETS knows all keys, also the group keys.
|
||||
@ -113,7 +126,8 @@ void BauSystemBDevice::updateGroupObject(GroupObject & go, uint8_t * data, uint8
|
||||
|
||||
memcpy(goData, data, length);
|
||||
|
||||
go.commFlag(Updated);
|
||||
if (go.commFlag() != WriteRequest)
|
||||
{
|
||||
#ifdef SMALL_GROUPOBJECT
|
||||
GroupObject::processClassCallback(go);
|
||||
#else
|
||||
@ -122,6 +136,8 @@ void BauSystemBDevice::updateGroupObject(GroupObject & go, uint8_t * data, uint8
|
||||
handler(go);
|
||||
#endif
|
||||
}
|
||||
go.commFlag(Updated);
|
||||
}
|
||||
|
||||
bool BauSystemBDevice::configured()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user