summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuchita Lad2025-05-14 17:25:54 +0530
committerSuchita Lad2025-05-14 17:25:54 +0530
commitde3eca7b96bd5c9a8f8d82140a6a8734361dd42a (patch)
tree4404e0c88c2b609172f28d5851299b3fc6cebad5
parent6e14f02d83a8cfb325ddc047cf04429db8fd403b (diff)
downloadCommon-Interface-Project-de3eca7b96bd5c9a8f8d82140a6a8734361dd42a.tar.gz
Common-Interface-Project-de3eca7b96bd5c9a8f8d82140a6a8734361dd42a.tar.bz2
Common-Interface-Project-de3eca7b96bd5c9a8f8d82140a6a8734361dd42a.zip
Added style to CLKOUTV_f block
-rwxr-xr-xblocks/Xcos/MxGraphParser.py6
-rw-r--r--blocks/Xcos/blocks/CLKOUTV_f.py1
-rw-r--r--blocks/Xcos/blocks/SUPER_f.py7
-rw-r--r--blocks/Xcos/common/AAAAAA.py6
-rw-r--r--blocks/xcos2xml/blocks/CLKOUTV_f.xsl9
5 files changed, 19 insertions, 10 deletions
diff --git a/blocks/Xcos/MxGraphParser.py b/blocks/Xcos/MxGraphParser.py
index e9251f31..e75aea67 100755
--- a/blocks/Xcos/MxGraphParser.py
+++ b/blocks/Xcos/MxGraphParser.py
@@ -41,7 +41,11 @@ outdiagram.append(comment)
outmodel = process_xcos_model(diagram, title, rootattribid, parentattribid,
workspace_file, context)
outdiagram.append(outmodel)
-
+outnode = ET.Element('mxCell')
+outnode.set('as', 'defaultParent')
+outnode.set('id', parentattribid)
+outnode.set('parent', rootattribid)
+outdiagram.append(outnode)
outtree = ET.ElementTree(outdiagram)
ET.indent(outtree)
diff --git a/blocks/Xcos/blocks/CLKOUTV_f.py b/blocks/Xcos/blocks/CLKOUTV_f.py
index 96a45718..1d84c5b0 100644
--- a/blocks/Xcos/blocks/CLKOUTV_f.py
+++ b/blocks/Xcos/blocks/CLKOUTV_f.py
@@ -9,7 +9,6 @@ def CLKOUTV_f(outroot, attribid, ordering, geometry, parameters, parent=1, style
if style is None:
style = func_name
- block_id, port_id, link_id = generate_id(3, 0, 0)
outnode = addOutNode(outroot, BLOCK_EVENT_OUT,
attribid, ordering, parent,
func_name, 'output', 'DEFAULT',
diff --git a/blocks/Xcos/blocks/SUPER_f.py b/blocks/Xcos/blocks/SUPER_f.py
index 8cd43120..d1453760 100644
--- a/blocks/Xcos/blocks/SUPER_f.py
+++ b/blocks/Xcos/blocks/SUPER_f.py
@@ -41,8 +41,13 @@ def SUPER_f(outroot, attribid, ordering, geometry, parameters, parent=1, style=N
outmodel = process_xcos_model(superblock, title, rootattribid, parentattribid)
SuperBlockDiagram.append(outmodel)
+ outnode = ET.Element('mxCell')
+ outnode.set('as', 'defaultParent')
+ outnode.set('id', parentattribid)
+ outnode.set('parent', rootattribid)
+ SuperBlockDiagram.append(outnode)
- return outnode
+ return SuperBlockDiagram
def get_from_SUPER_f(cell):
diff --git a/blocks/Xcos/common/AAAAAA.py b/blocks/Xcos/common/AAAAAA.py
index 0ca284be..aeb18eeb 100644
--- a/blocks/Xcos/common/AAAAAA.py
+++ b/blocks/Xcos/common/AAAAAA.py
@@ -1851,12 +1851,6 @@ def process_xcos_model(diagram, title, rootattribid, parentattribid,
getattr(Links, style)(outroot, attribid, sourceVertex, targetVertex, waypoints[1:-1], parent=parentattribid)
- outnode = ET.Element('mxCell')
- outnode.set('as', 'defaultParent')
- outnode.set('id', parentattribid)
- outnode.set('parent', rootattribid)
- outmodel.append(outnode)
-
if started_workspace:
print('Terminating workspace')
WORKSPACE.clean()
diff --git a/blocks/xcos2xml/blocks/CLKOUTV_f.xsl b/blocks/xcos2xml/blocks/CLKOUTV_f.xsl
index 4f8894ff..da68ffae 100644
--- a/blocks/xcos2xml/blocks/CLKOUTV_f.xsl
+++ b/blocks/xcos2xml/blocks/CLKOUTV_f.xsl
@@ -7,7 +7,14 @@
<xsl:variable name="commandPorts">0</xsl:variable>
<xsl:element name="mxCell">
<xsl:attribute name="style">
- <xsl:value-of select="@style" />
+ <xsl:choose>
+ <xsl:when test="@style">
+ <xsl:value-of select="@style"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>CLKOUTV_f</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:value-of select="@id" />