aqhome-react: add "sourceNet" and "targetNet" to links.
This commit is contained in:
@@ -730,8 +730,10 @@ int _setParamDoubleValueFromString(AQHREACT_PARAM *param, const char *s)
|
|||||||
|
|
||||||
int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkNode)
|
int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkNode)
|
||||||
{
|
{
|
||||||
|
const char *sourceNetName;
|
||||||
const char *sourceUnitName;
|
const char *sourceUnitName;
|
||||||
const char *sourceSlotName;
|
const char *sourceSlotName;
|
||||||
|
const char *targetNetName;
|
||||||
const char *targetUnitName;
|
const char *targetUnitName;
|
||||||
const char *targetSlotName;
|
const char *targetSlotName;
|
||||||
AQHREACT_UNIT *sourceUnit;
|
AQHREACT_UNIT *sourceUnit;
|
||||||
@@ -740,8 +742,10 @@ int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkN
|
|||||||
AQHREACT_OUTPUT_SLOT *outputSlot;
|
AQHREACT_OUTPUT_SLOT *outputSlot;
|
||||||
AQHREACT_LINK *link;
|
AQHREACT_LINK *link;
|
||||||
|
|
||||||
|
sourceNetName=GWEN_XMLNode_GetProperty(linkNode, "sourceNet", NULL);
|
||||||
sourceUnitName=GWEN_XMLNode_GetProperty(linkNode, "sourceUnit", NULL);
|
sourceUnitName=GWEN_XMLNode_GetProperty(linkNode, "sourceUnit", NULL);
|
||||||
sourceSlotName=GWEN_XMLNode_GetProperty(linkNode, "sourceSlot", NULL);
|
sourceSlotName=GWEN_XMLNode_GetProperty(linkNode, "sourceSlot", NULL);
|
||||||
|
targetNetName=GWEN_XMLNode_GetProperty(linkNode, "targetNet", NULL);
|
||||||
targetUnitName=GWEN_XMLNode_GetProperty(linkNode, "targetUnit", NULL);
|
targetUnitName=GWEN_XMLNode_GetProperty(linkNode, "targetUnit", NULL);
|
||||||
targetSlotName=GWEN_XMLNode_GetProperty(linkNode, "targetSlot", NULL);
|
targetSlotName=GWEN_XMLNode_GetProperty(linkNode, "targetSlot", NULL);
|
||||||
|
|
||||||
@@ -754,6 +758,8 @@ int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkN
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceUnit=AQHREACT_UnitNet_GetUnitById(unitNet, sourceUnitName);
|
sourceUnit=AQHREACT_UnitNet_GetUnitById(unitNet, sourceUnitName);
|
||||||
|
if (sourceUnit==NULL && sourceNetName && *sourceNetName)
|
||||||
|
sourceUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, sourceNetName, sourceUnitName);
|
||||||
if (sourceUnit==NULL)
|
if (sourceUnit==NULL)
|
||||||
sourceUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, NULL, sourceUnitName);
|
sourceUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, NULL, sourceUnitName);
|
||||||
if (sourceUnit==NULL) {
|
if (sourceUnit==NULL) {
|
||||||
@@ -767,6 +773,8 @@ int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkN
|
|||||||
}
|
}
|
||||||
|
|
||||||
targetUnit=AQHREACT_UnitNet_GetUnitById(unitNet, targetUnitName);
|
targetUnit=AQHREACT_UnitNet_GetUnitById(unitNet, targetUnitName);
|
||||||
|
if (targetUnit==NULL && targetNetName && *targetNetName)
|
||||||
|
targetUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, targetNetName, targetUnitName);
|
||||||
if (targetUnit==NULL)
|
if (targetUnit==NULL)
|
||||||
targetUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, NULL, targetUnitName);
|
targetUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, NULL, targetUnitName);
|
||||||
if (targetUnit==NULL) {
|
if (targetUnit==NULL) {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<links>
|
<links>
|
||||||
|
<!-- (sourceNet), sourceUnit, sourceSlot, (targetNet), targetUnit, targetSlot -->
|
||||||
<link sourceUnit=".updatedValue" sourceSlot="output" targetUnit="valueFilterInPlug" targetSlot="input" />
|
<link sourceUnit=".updatedValue" sourceSlot="output" targetUnit="valueFilterInPlug" targetSlot="input" />
|
||||||
<link sourceUnit="valueFilterInPlug" sourceSlot="output" targetUnit="highPass1" targetSlot="input" />
|
<link sourceUnit="valueFilterInPlug" sourceSlot="output" targetUnit="highPass1" targetSlot="input" />
|
||||||
<link sourceUnit="highPass1" sourceSlot="output" targetUnit="stabilize1" targetSlot="input" />
|
<link sourceUnit="highPass1" sourceSlot="output" targetUnit="stabilize1" targetSlot="input" />
|
||||||
|
|||||||
Reference in New Issue
Block a user