aqhome-react: rename "name" to "typeName" in AQHREACT_Unit

This commit is contained in:
Martin Preuss
2024-04-18 23:28:27 +02:00
parent e486a7e69d
commit 7ee7edffec
16 changed files with 39 additions and 39 deletions

View File

@@ -186,7 +186,7 @@ AQHREACT_UNIT *AqHomeReact_UnitModule_fromXml(AQHOME_REACT *aqh, GWEN_XMLNODE *x
unit=AqHomeReact_UnitModule_new(aqh);
xunit=(AQHREACT_UNIT_MODULE*)GWEN_INHERIT_GETDATA(AQHREACT_UNIT, AQHREACT_UNIT_MODULE, unit);
AQHREACT_Unit_SetName(unit, GWEN_XMLNode_GetProperty(xmlNode, "type", NULL));
AQHREACT_Unit_SetTypeName(unit, GWEN_XMLNode_GetProperty(xmlNode, "type", NULL));
AQHREACT_Unit_SetId(unit, GWEN_XMLNode_GetProperty(xmlNode, "id", NULL));
_readProxyFromXml(xmlNode, xunit->paramProxyList, "paramdefs", "param", "name", "targetModule", "targetParam");
@@ -245,7 +245,7 @@ AQHREACT_PARAM *_cbGetParamByName(const AQHREACT_UNIT *unit, const char *paramNa
{
AQHREACT_UNIT_MODULE *xunit;
DBG_INFO(NULL, "Looking for param \"%s\" in proxy descr of module \"%s\"", paramName, AQHREACT_Unit_GetName(unit));
DBG_INFO(NULL, "Looking for param \"%s\" in proxy descr of module \"%s\"", paramName, AQHREACT_Unit_GetTypeName(unit));
xunit=(AQHREACT_UNIT_MODULE*)GWEN_INHERIT_GETDATA(AQHREACT_UNIT, AQHREACT_UNIT_MODULE, unit);
if (xunit) {
const MODULE_PROXY_DESCR *pd;
@@ -253,7 +253,7 @@ AQHREACT_PARAM *_cbGetParamByName(const AQHREACT_UNIT *unit, const char *paramNa
pd=ModuleProxyDescr_List_FindByName(xunit->paramProxyList, paramName);
if (pd) {
DBG_INFO(NULL, "Found proxydescr for param (-> %s:%s)",
(pd->targetObjectPtr)?AQHREACT_Unit_GetName(pd->targetObjectPtr):"<no unit>",
(pd->targetObjectPtr)?AQHREACT_Unit_GetTypeName(pd->targetObjectPtr):"<no unit>",
(pd->targetName)?(pd->targetName):"<no param>");
return AQHREACT_Unit_GetParamByName(pd->targetObjectPtr, pd->targetName);
}
@@ -433,7 +433,7 @@ int _finishParams(AQHREACT_UNIT *unit)
const char *unitName;
xunit=(AQHREACT_UNIT_MODULE*)GWEN_INHERIT_GETDATA(AQHREACT_UNIT, AQHREACT_UNIT_MODULE, unit);
unitName=AQHREACT_Unit_GetName(unit);
unitName=AQHREACT_Unit_GetTypeName(unit);
pd=ModuleProxyDescr_List_First(xunit->paramProxyList);
while(pd) {
AQHREACT_UNIT *subUnit;
@@ -561,7 +561,7 @@ int _readParamFromXml(AQHREACT_UNIT *unit, GWEN_XMLNODE *paramNode)
} /* if value */
}
else {
DBG_ERROR(NULL, "No param name \"%s\" in unit \"%s\"", paramName, AQHREACT_Unit_GetName(unit));
DBG_ERROR(NULL, "No param name \"%s\" in unit \"%s\"", paramName, AQHREACT_Unit_GetTypeName(unit));
return GWEN_ERROR_BAD_DATA;
}
}
@@ -616,7 +616,7 @@ int _readLinksFromXml(AQHOME_REACT *aqh, AQHREACT_UNIT *unit, GWEN_XMLNODE *xmlN
rv=_readLinkFromXml(aqh, unit, n);
if (rv<0) {
DBG_ERROR(NULL, "Error reading link in net \"%s\" (%d)", AQHREACT_Unit_GetName(unit), rv);
DBG_ERROR(NULL, "Error reading link in net \"%s\" (%d)", AQHREACT_Unit_GetTypeName(unit), rv);
return GWEN_ERROR_BAD_DATA;
}
n=GWEN_XMLNode_FindNextTag(n, "link", NULL, NULL);
@@ -644,7 +644,7 @@ int _readLinkFromXml(AQHOME_REACT *aqh, AQHREACT_UNIT *unit, GWEN_XMLNODE *linkN
receivingUnitName && *receivingUnitName && receivingPortName && *receivingPortName)) {
DBG_ERROR(NULL,
"Link in net \"%s\" needs properties sourceUnit, sourcePort, targetUnit and targetPort",
AQHREACT_Unit_GetName(unit));
AQHREACT_Unit_GetTypeName(unit));
return GWEN_ERROR_BAD_DATA;
}
@@ -689,7 +689,7 @@ int _linkFromThisModulesInput(AQHOME_REACT *aqh,
emittingPort=AQHREACT_Unit_GetInputPortByName(unit, emittingPortName); /* find in modules input port list! */
if (emittingPort==NULL) {
DBG_ERROR(NULL, "Target port \"%s\" not found for source unit \"%s\"", emittingPortName, AQHREACT_Unit_GetName(unit));
DBG_ERROR(NULL, "Target port \"%s\" not found for source unit \"%s\"", emittingPortName, AQHREACT_Unit_GetTypeName(unit));
return GWEN_ERROR_NOT_FOUND;
}