summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2024-12-30 17:15:18 +0530
committerSunil Shetye2024-12-31 10:52:19 +0530
commit373ba7b8d4d3b821ef74adb58ab3571f09a453be (patch)
tree461154bbd23bb5bc5900076606adbb127276af34
parentf72f9c84f9fdba294eed2182cf3ca08e7f2fd85a (diff)
downloadCommon-Interface-Project-373ba7b8d4d3b821ef74adb58ab3571f09a453be.tar.gz
Common-Interface-Project-373ba7b8d4d3b821ef74adb58ab3571f09a453be.tar.bz2
Common-Interface-Project-373ba7b8d4d3b821ef74adb58ab3571f09a453be.zip
add dataLines to ExplicitInputPort
change attribute order
-rwxr-xr-xblocks/Xcos/XmlParser.py16
-rw-r--r--blocks/Xcos/common/AAAAAA.py8
-rw-r--r--blocks/Xcos/ports/ExplicitInputPort.py2
3 files changed, 10 insertions, 16 deletions
diff --git a/blocks/Xcos/XmlParser.py b/blocks/Xcos/XmlParser.py
index b86b67aa..088ec94b 100755
--- a/blocks/Xcos/XmlParser.py
+++ b/blocks/Xcos/XmlParser.py
@@ -508,7 +508,6 @@ for root in model:
mergeLinks(sourceVertex, key1, graph_link, removable_link)
mergeLinks(targetVertex, key1, graph_link, removable_link)
-
except BaseException:
traceback.print_exc()
sys.exit(103)
@@ -536,13 +535,10 @@ for k, r_link in removable_link.items():
print("#LINKDATA#:", link_data)
print("#NODEATTRIB#:", node.attrib)
- sourceVertex = link_data[1] # small link
- targetVertex = link_data[2] # small link
- # sourceVertex = node.attrib.get('sourceVertex')
- # targetVertex = node.attrib.get('targetVertex')
+ sourceVertex = link_data[1] # small link
+ targetVertex = link_data[2] # small link
# print("#SV & #TV:", sourceVertex, targetVertex)
-
if sourceVertex in link:
node2 = nodeList[sourceVertex]
link_data2 = edgeDict[sourceVertex] # big removed link
@@ -571,9 +567,9 @@ for k, r_link in removable_link.items():
split_point = link_data[9]
- sourceVertex2 = link_data2[1] # big link
- targetVertex2 = link_data2[2] # big link
-
+ sourceVertex2 = link_data2[1] # big link
+ targetVertex2 = link_data2[2] # big link
+
tarx = link_data2[8]['x']
tary = link_data2[8]['y']
@@ -581,8 +577,6 @@ for k, r_link in removable_link.items():
tar2y = link_data2[9]['y']
print("TARX & TARY:", tarx, tary, tar2x, tar2y)
-
-
root.remove(node)
root.remove(node2)
diff --git a/blocks/Xcos/common/AAAAAA.py b/blocks/Xcos/common/AAAAAA.py
index abf6a3d6..0dd9b461 100644
--- a/blocks/Xcos/common/AAAAAA.py
+++ b/blocks/Xcos/common/AAAAAA.py
@@ -172,11 +172,11 @@ def addOutNode(node, subNodeType,
**kwargs):
newkwargs = {'id': attribid, 'parent': parent,
'interfaceFunctionName': interface_func_name,
- 'blockType': blockType}
+ 'blockType': blockType,
+ 'simulationFunctionName': simulation_func_name,
+ 'simulationFunctionType': simulation_func_type,
+ 'style': style}
newkwargs.update(kwargs)
- newkwargs.update({'simulationFunctionName': simulation_func_name,
- 'simulationFunctionType': simulation_func_type,
- 'style': style})
return addNode(node, subNodeType, **newkwargs)
diff --git a/blocks/Xcos/ports/ExplicitInputPort.py b/blocks/Xcos/ports/ExplicitInputPort.py
index b1b0aa32..1178c3f6 100644
--- a/blocks/Xcos/ports/ExplicitInputPort.py
+++ b/blocks/Xcos/ports/ExplicitInputPort.py
@@ -21,7 +21,7 @@ def ExplicitInputPort(outroot, attribid, parentattribid, ordering, geometry,
else:
outnode = addNode(outroot, func_name, **{'id': attribid},
parent=parentattribid, ordering=ordering,
- dataType='REAL_MATRIX', dataColumns=1,
+ dataType='REAL_MATRIX', dataColumns=1, dataLines=1,
initialState="-1.0", style=style, value=value)
return outnode