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
This commit is contained in:
Waldemar Porscha 2022-04-01 18:04:01 +02:00
parent 22af8267c3
commit f7e8fec2ff

View File

@ -69,8 +69,15 @@ void BauSystemBDevice::sendNextGroupTelegram()
if (flag != ReadRequest && flag != WriteRequest) if (flag != ReadRequest && flag != WriteRequest)
continue; continue;
#ifdef INTERNAL_GROUPOBJECT
if (flag == WriteRequest)
GroupObject::processClassCallback(go);
#endif
if (!go.communicationEnable()) if (!go.communicationEnable())
{
go.commFlag(Ok);
continue; continue;
}
SecurityControl goSecurity; SecurityControl goSecurity;
goSecurity.toolAccess = false; // Secured group communication never uses the toolkey. ETS knows all keys, also the group keys. goSecurity.toolAccess = false; // Secured group communication never uses the toolkey. ETS knows all keys, also the group keys.
@ -113,7 +120,10 @@ void BauSystemBDevice::updateGroupObject(GroupObject & go, uint8_t * data, uint8
memcpy(goData, data, length); memcpy(goData, data, length);
go.commFlag(Updated); #ifdef INTERNAL_GROUPOBJECT
if (go.commFlag() != WriteRequest)
{
#endif
#ifdef SMALL_GROUPOBJECT #ifdef SMALL_GROUPOBJECT
GroupObject::processClassCallback(go); GroupObject::processClassCallback(go);
#else #else
@ -121,6 +131,10 @@ void BauSystemBDevice::updateGroupObject(GroupObject & go, uint8_t * data, uint8
if (handler) if (handler)
handler(go); handler(go);
#endif #endif
#ifdef INTERNAL_GROUPOBJECT
}
#endif
go.commFlag(Updated);
} }
bool BauSystemBDevice::configured() bool BauSystemBDevice::configured()