diff options
author | Sunil Shetye | 2024-10-22 12:34:53 +0530 |
---|---|---|
committer | Sunil Shetye | 2024-10-22 13:40:39 +0530 |
commit | 6c2682249524bc5ea29343b52616c7f9e4f65428 (patch) | |
tree | f65b049bccde6e5ae6d0203b8d8891c1c9d7b551 | |
parent | 0edff6e11c3984ce70843a855ba0c5098e8ada8c (diff) | |
download | Common-Interface-Project-6c2682249524bc5ea29343b52616c7f9e4f65428.tar.gz Common-Interface-Project-6c2682249524bc5ea29343b52616c7f9e4f65428.tar.bz2 Common-Interface-Project-6c2682249524bc5ea29343b52616c7f9e4f65428.zip |
add parent to blocks and links
also add normal imports along with the star import
252 files changed, 726 insertions, 474 deletions
diff --git a/blocks/.flake8 b/blocks/.flake8 index ba0bcbf6..57dab6f9 100644 --- a/blocks/.flake8 +++ b/blocks/.flake8 @@ -4,6 +4,6 @@ # default flake8 list #ignore = E121,E123,E126,E226,E24,E704,W503,W504 ignore = F401,F403,W504 -extend-exclude = docs,env*,migrations,node_modules,Xcos +extend-exclude = docs,env*,migrations,node_modules,Xcos/common,Xcos/blocks,Xcos/ports,Xcos/links max-complexity = 13 max-line-length = 100 diff --git a/blocks/Makefile b/blocks/Makefile index 648ac1bb..6c0752c0 100644 --- a/blocks/Makefile +++ b/blocks/Makefile @@ -33,7 +33,6 @@ $(TARGET) : $(SRCFILES) @echo Making $@ ... @for f in $^; do \ echo "# BEGIN $$f"; \ - echo; \ grep -v "from .* import" "$$f"; \ echo; \ echo "# END $$f"; \ diff --git a/blocks/Xcos/MxGraphParser.py b/blocks/Xcos/MxGraphParser.py index 90cd5240..365f38a4 100755 --- a/blocks/Xcos/MxGraphParser.py +++ b/blocks/Xcos/MxGraphParser.py @@ -8,6 +8,11 @@ import traceback import xml.etree.ElementTree as ET import defusedxml.ElementTree as goodET +from xcosblocks import SplitBlock +from xcosblocks import addExplicitInputPortForSplit, addExplicitOutputPortForSplit +from xcosblocks import ImplicitInputPort, ImplicitOutputPort +from xcosblocks import CommandPort, ControlPort +from xcosblocks import num2str, style_to_object from xcosblocks import * if len(sys.argv) != 2: diff --git a/blocks/Xcos/blocks/ABS_VALUE.py b/blocks/Xcos/blocks/ABS_VALUE.py index da7c0eaf..1f30bbe4 100644 --- a/blocks/Xcos/blocks/ABS_VALUE.py +++ b/blocks/Xcos/blocks/ABS_VALUE.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def ABS_VALUE(outroot, attribid, ordering, geometry, parameters): + +def ABS_VALUE(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ABS_VALUE' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'absolute_value', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/AFFICH_m.py b/blocks/Xcos/blocks/AFFICH_m.py index 192b1048..6ac8c8f8 100644 --- a/blocks/Xcos/blocks/AFFICH_m.py +++ b/blocks/Xcos/blocks/AFFICH_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def AFFICH_m(outroot, attribid, ordering, geometry, parameters): + +def AFFICH_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'AFFICH_m' outnode = addOutNode(outroot, BLOCK_AFFICHE, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'affich2', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/ANDBLK.py b/blocks/Xcos/blocks/ANDBLK.py index 15468dee..59bb914b 100644 --- a/blocks/Xcos/blocks/ANDBLK.py +++ b/blocks/Xcos/blocks/ANDBLK.py @@ -5,11 +5,12 @@ from blocks.IFTHEL_f import IFTHEL_f from blocks.CLKSPLIT_f import CLKSPLIT_f from common.AAAAAA import * -def ANDBLK(outroot, attribid, ordering, geometry, parameters): + +def ANDBLK(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ANDBLK' block_id, port_id, link_id = generate_id(8, 13, 6) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H) diff --git a/blocks/Xcos/blocks/ANDLOG_f.py b/blocks/Xcos/blocks/ANDLOG_f.py index 74a98281..f62c6424 100644 --- a/blocks/Xcos/blocks/ANDLOG_f.py +++ b/blocks/Xcos/blocks/ANDLOG_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def ANDLOG_f(outroot, attribid, ordering, geometry, parameters): + +def ANDLOG_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ANDLOG_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'andlog', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/AUTOMAT.py b/blocks/Xcos/blocks/AUTOMAT.py index e681ed26..352f8d58 100644 --- a/blocks/Xcos/blocks/AUTOMAT.py +++ b/blocks/Xcos/blocks/AUTOMAT.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def AUTOMAT(outroot, attribid, ordering, geometry, parameters): + +def AUTOMAT(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'AUTOMAT' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'automat', 'IMPLICIT_C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/BACKLASH.py b/blocks/Xcos/blocks/BACKLASH.py index ea988316..f088600e 100644 --- a/blocks/Xcos/blocks/BACKLASH.py +++ b/blocks/Xcos/blocks/BACKLASH.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def BACKLASH(outroot, attribid, ordering, geometry, parameters): + +def BACKLASH(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'BACKLASH' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'backlash', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/BARXY.py b/blocks/Xcos/blocks/BARXY.py index d5063675..5982d42f 100644 --- a/blocks/Xcos/blocks/BARXY.py +++ b/blocks/Xcos/blocks/BARXY.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def BARXY(outroot, attribid, ordering, geometry, parameters): + +def BARXY(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'BARXY' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'BARXY_sim', 'SCILAB', func_name, BLOCKTYPE_D, dependsOnU='1') diff --git a/blocks/Xcos/blocks/BIGSOM_f.py b/blocks/Xcos/blocks/BIGSOM_f.py index a55dee3c..88141442 100644 --- a/blocks/Xcos/blocks/BIGSOM_f.py +++ b/blocks/Xcos/blocks/BIGSOM_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def BIGSOM_f(outroot, attribid, ordering, geometry, parameters): + +def BIGSOM_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'BIGSOM_f' outnode = addOutNode(outroot, BLOCK_BIGSOM, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'sum', 'TYPE_2', func_name, BLOCKTYPE_C, dependsOnU='1', diff --git a/blocks/Xcos/blocks/BITCLEAR.py b/blocks/Xcos/blocks/BITCLEAR.py index cb0349f4..e5adf4b2 100644 --- a/blocks/Xcos/blocks/BITCLEAR.py +++ b/blocks/Xcos/blocks/BITCLEAR.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def BITCLEAR(outroot, attribid, ordering, geometry, parameters): + +def BITCLEAR(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'BITCLEAR' datatype = ['', '', '', '32', '16', '8', '32', '16', '8'] @@ -9,7 +10,7 @@ def BITCLEAR(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'bit_clear_' + datatype[para1] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/BITSET.py b/blocks/Xcos/blocks/BITSET.py index add13a72..06954e63 100644 --- a/blocks/Xcos/blocks/BITSET.py +++ b/blocks/Xcos/blocks/BITSET.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def BITSET(outroot, attribid, ordering, geometry, parameters): + +def BITSET(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'BITSET' datatype = ['', '', '', '32', '16', '8', '32', '16', '8'] @@ -9,7 +10,7 @@ def BITSET(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'bit_set_' + datatype[para1] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/BOUNCE.py b/blocks/Xcos/blocks/BOUNCE.py index 35ee114a..4e820b31 100644 --- a/blocks/Xcos/blocks/BOUNCE.py +++ b/blocks/Xcos/blocks/BOUNCE.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def BOUNCE(outroot, attribid, ordering, geometry, parameters): + +def BOUNCE(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'BOUNCE' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'bounce_ball', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/BOUNCEXY.py b/blocks/Xcos/blocks/BOUNCEXY.py index b41fd4ee..ea749629 100644 --- a/blocks/Xcos/blocks/BOUNCEXY.py +++ b/blocks/Xcos/blocks/BOUNCEXY.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def BOUNCEXY(outroot, attribid, ordering, geometry, parameters): + +def BOUNCEXY(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'BOUNCEXY' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'bouncexy', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/BPLATFORM.py b/blocks/Xcos/blocks/BPLATFORM.py index 5fc4ca6e..b5644e38 100644 --- a/blocks/Xcos/blocks/BPLATFORM.py +++ b/blocks/Xcos/blocks/BPLATFORM.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def BPLATFORM(outroot, attribid, ordering, geometry, parameters): + +def BPLATFORM(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'BPLATFORM' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'bplatform2', 'SCILAB', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/Bache.py b/blocks/Xcos/blocks/Bache.py index 2c72dc0d..307bb07a 100644 --- a/blocks/Xcos/blocks/Bache.py +++ b/blocks/Xcos/blocks/Bache.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Bache(outroot, attribid, ordering, geometry, parameters): + +def Bache(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Bache' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Bache', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/CANIMXY.py b/blocks/Xcos/blocks/CANIMXY.py index 29c98495..e09f4c4d 100644 --- a/blocks/Xcos/blocks/CANIMXY.py +++ b/blocks/Xcos/blocks/CANIMXY.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CANIMXY(outroot, attribid, ordering, geometry, parameters): + +def CANIMXY(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CANIMXY' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'canimxy', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CANIMXY3D.py b/blocks/Xcos/blocks/CANIMXY3D.py index 4a351b91..6308cbfd 100644 --- a/blocks/Xcos/blocks/CANIMXY3D.py +++ b/blocks/Xcos/blocks/CANIMXY3D.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CANIMXY3D(outroot, attribid, ordering, geometry, parameters): + +def CANIMXY3D(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CANIMXY3D' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'canimxy3d', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CBLOCK.py b/blocks/Xcos/blocks/CBLOCK.py index 8f4a2a11..9d721563 100644 --- a/blocks/Xcos/blocks/CBLOCK.py +++ b/blocks/Xcos/blocks/CBLOCK.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def CBLOCK(outroot, attribid, ordering, geometry, parameters): + +def CBLOCK(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CBLOCK' if parameters[1] == 'y': @@ -24,7 +25,7 @@ def CBLOCK(outroot, attribid, ordering, geometry, parameters): codeLines = code.split('\n') outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, parameters[0], simulation_func_type, func_name, BLOCKTYPE_C, dependsOnU=depends_u, diff --git a/blocks/Xcos/blocks/CBLOCK4.py b/blocks/Xcos/blocks/CBLOCK4.py index 53910485..e0017120 100644 --- a/blocks/Xcos/blocks/CBLOCK4.py +++ b/blocks/Xcos/blocks/CBLOCK4.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def CBLOCK4(outroot, attribid, ordering, geometry, parameters): + +def CBLOCK4(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CBLOCK4' if parameters[1] == 'y': @@ -24,7 +25,7 @@ def CBLOCK4(outroot, attribid, ordering, geometry, parameters): codeLines = code.split('\n') outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, parameters[0], simulation_func_type, func_name, BLOCKTYPE_C, dependsOnU=depends_u, diff --git a/blocks/Xcos/blocks/CCS.py b/blocks/Xcos/blocks/CCS.py index 55747258..753146a1 100644 --- a/blocks/Xcos/blocks/CCS.py +++ b/blocks/Xcos/blocks/CCS.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CCS(outroot, attribid, ordering, geometry, parameters): + +def CCS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CCS' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'CCS', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/CEVENTSCOPE.py b/blocks/Xcos/blocks/CEVENTSCOPE.py index fd7d3c6e..5bf2eb4e 100644 --- a/blocks/Xcos/blocks/CEVENTSCOPE.py +++ b/blocks/Xcos/blocks/CEVENTSCOPE.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CEVENTSCOPE(outroot, attribid, ordering, geometry, parameters): + +def CEVENTSCOPE(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CEVENTSCOPE' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cevscpe', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CFSCOPE.py b/blocks/Xcos/blocks/CFSCOPE.py index e227f468..074971b2 100644 --- a/blocks/Xcos/blocks/CFSCOPE.py +++ b/blocks/Xcos/blocks/CFSCOPE.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CFSCOPE(outroot, attribid, ordering, geometry, parameters): + +def CFSCOPE(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CFSCOPE' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cfscope', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/CLINDUMMY_f.py b/blocks/Xcos/blocks/CLINDUMMY_f.py index f74e6758..5cf5d6cf 100644 --- a/blocks/Xcos/blocks/CLINDUMMY_f.py +++ b/blocks/Xcos/blocks/CLINDUMMY_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLINDUMMY_f(outroot, attribid, ordering, geometry, parameters): + +def CLINDUMMY_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLINDUMMY_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cdummy', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/CLKFROM.py b/blocks/Xcos/blocks/CLKFROM.py index e2c0b463..15afdf94 100644 --- a/blocks/Xcos/blocks/CLKFROM.py +++ b/blocks/Xcos/blocks/CLKFROM.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLKFROM(outroot, attribid, ordering, geometry, parameters): + +def CLKFROM(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKFROM' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'clkfrom', 'DEFAULT', func_name, BLOCKTYPE_D, value='From') diff --git a/blocks/Xcos/blocks/CLKGOTO.py b/blocks/Xcos/blocks/CLKGOTO.py index c0ff8c39..5cff71d0 100644 --- a/blocks/Xcos/blocks/CLKGOTO.py +++ b/blocks/Xcos/blocks/CLKGOTO.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLKGOTO(outroot, attribid, ordering, geometry, parameters): + +def CLKGOTO(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKGOTO' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'clkgoto', 'DEFAULT', func_name, BLOCKTYPE_D, value='Goto') diff --git a/blocks/Xcos/blocks/CLKGotoTagVisibility.py b/blocks/Xcos/blocks/CLKGotoTagVisibility.py index 39fec9dd..adb19f14 100644 --- a/blocks/Xcos/blocks/CLKGotoTagVisibility.py +++ b/blocks/Xcos/blocks/CLKGotoTagVisibility.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLKGotoTagVisibility(outroot, attribid, ordering, geometry, parameters): + +def CLKGotoTagVisibility(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKGotoTagVisibility' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'clkgototagvisibility', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/CLKINV_f.py b/blocks/Xcos/blocks/CLKINV_f.py index c2e4ce5e..2a3eb86a 100644 --- a/blocks/Xcos/blocks/CLKINV_f.py +++ b/blocks/Xcos/blocks/CLKINV_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLKINV_f(outroot, attribid, ordering, geometry, parameters): + +def CLKINV_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKINV_f' outnode = addOutNode(outroot, BLOCK_EVENT_IN, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'input', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CLKIN_f.py b/blocks/Xcos/blocks/CLKIN_f.py index c6ee3e1c..61d6d6e4 100644 --- a/blocks/Xcos/blocks/CLKIN_f.py +++ b/blocks/Xcos/blocks/CLKIN_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLKIN_f(outroot, attribid, ordering, geometry, parameters): + +def CLKIN_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKIN_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'input', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CLKOUT_f.py b/blocks/Xcos/blocks/CLKOUT_f.py index e2970d50..6599b086 100644 --- a/blocks/Xcos/blocks/CLKOUT_f.py +++ b/blocks/Xcos/blocks/CLKOUT_f.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def CLKOUT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKOUT_f' diff --git a/blocks/Xcos/blocks/CLKSOMV_f.py b/blocks/Xcos/blocks/CLKSOMV_f.py index 8426250c..5a80d2e2 100644 --- a/blocks/Xcos/blocks/CLKSOMV_f.py +++ b/blocks/Xcos/blocks/CLKSOMV_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLKSOMV_f(outroot, attribid, ordering, geometry, parameters): + +def CLKSOMV_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKSOMV_f' outnode = addOutNode(outroot, BLOCK_ROUND, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'sum', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CLKSOM_f.py b/blocks/Xcos/blocks/CLKSOM_f.py index 4af22bc8..c6c0b264 100644 --- a/blocks/Xcos/blocks/CLKSOM_f.py +++ b/blocks/Xcos/blocks/CLKSOM_f.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def CLKSOM_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKSOM_f' diff --git a/blocks/Xcos/blocks/CLKSPLIT_f.py b/blocks/Xcos/blocks/CLKSPLIT_f.py index 859d37be..f75b09da 100644 --- a/blocks/Xcos/blocks/CLKSPLIT_f.py +++ b/blocks/Xcos/blocks/CLKSPLIT_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLKSPLIT_f(outroot, attribid, ordering, geometry, parameters): + +def CLKSPLIT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLKSPLIT_f' outnode = addOutNode(outroot, BLOCK_SPLIT, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'split', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CLOCK_c.py b/blocks/Xcos/blocks/CLOCK_c.py index 583787a9..e6e7db4a 100644 --- a/blocks/Xcos/blocks/CLOCK_c.py +++ b/blocks/Xcos/blocks/CLOCK_c.py @@ -3,11 +3,12 @@ from blocks.EVTDLY_c import EVTDLY_c from blocks.SplitBlock import SplitBlock from common.AAAAAA import * -def CLOCK_c(outroot, attribid, ordering, geometry, parameters): + +def CLOCK_c(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLOCK_c' block_id, port_id, link_id = generate_id(9, 12, 7) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H) diff --git a/blocks/Xcos/blocks/CLR.py b/blocks/Xcos/blocks/CLR.py index 87e20070..2c57e182 100644 --- a/blocks/Xcos/blocks/CLR.py +++ b/blocks/Xcos/blocks/CLR.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CLR(outroot, attribid, ordering, geometry, parameters): + +def CLR(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLR' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csslti4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/CLSS.py b/blocks/Xcos/blocks/CLSS.py index cb45cb23..23aeb5b1 100644 --- a/blocks/Xcos/blocks/CLSS.py +++ b/blocks/Xcos/blocks/CLSS.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def CLSS(outroot, attribid, ordering, geometry, parameters): + +def CLSS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CLSS' para4 = int(float(parameters[3])) @@ -11,7 +12,7 @@ def CLSS(outroot, attribid, ordering, geometry, parameters): depends_u = '1' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csslti4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU=depends_u, diff --git a/blocks/Xcos/blocks/CMAT3D.py b/blocks/Xcos/blocks/CMAT3D.py index 6f80aa07..e80f564d 100644 --- a/blocks/Xcos/blocks/CMAT3D.py +++ b/blocks/Xcos/blocks/CMAT3D.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CMAT3D(outroot, attribid, ordering, geometry, parameters): + +def CMAT3D(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CMAT3D' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cmat3d', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/CMATVIEW.py b/blocks/Xcos/blocks/CMATVIEW.py index a85815c7..25b00f74 100644 --- a/blocks/Xcos/blocks/CMATVIEW.py +++ b/blocks/Xcos/blocks/CMATVIEW.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CMATVIEW(outroot, attribid, ordering, geometry, parameters): + +def CMATVIEW(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CMATVIEW' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cmatview', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/CMSCOPE.py b/blocks/Xcos/blocks/CMSCOPE.py index c02118ec..b7455c95 100644 --- a/blocks/Xcos/blocks/CMSCOPE.py +++ b/blocks/Xcos/blocks/CMSCOPE.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CMSCOPE(outroot, attribid, ordering, geometry, parameters): + +def CMSCOPE(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CMSCOPE' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cmscope', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1', diff --git a/blocks/Xcos/blocks/CONST.py b/blocks/Xcos/blocks/CONST.py index b5b6d667..45e5dc4a 100644 --- a/blocks/Xcos/blocks/CONST.py +++ b/blocks/Xcos/blocks/CONST.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CONST(outroot, attribid, ordering, geometry, parameters): + +def CONST(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CONST' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cstblk4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CONSTRAINT2_c.py b/blocks/Xcos/blocks/CONSTRAINT2_c.py index 86a2d47e..013cd9dc 100644 --- a/blocks/Xcos/blocks/CONSTRAINT2_c.py +++ b/blocks/Xcos/blocks/CONSTRAINT2_c.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CONSTRAINT2_c(outroot, attribid, ordering, geometry, parameters): + +def CONSTRAINT2_c(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CONSTRAINT2_c' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'constraint_c', 'IMPLICIT_C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/CONSTRAINT_c.py b/blocks/Xcos/blocks/CONSTRAINT_c.py index a4f865f0..117cf921 100644 --- a/blocks/Xcos/blocks/CONSTRAINT_c.py +++ b/blocks/Xcos/blocks/CONSTRAINT_c.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CONSTRAINT_c(outroot, attribid, ordering, geometry, parameters): + +def CONSTRAINT_c(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CONSTRAINT_c' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'constraint_c', 'IMPLICIT_C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/CONST_f.py b/blocks/Xcos/blocks/CONST_f.py index ea30b826..757e2a60 100644 --- a/blocks/Xcos/blocks/CONST_f.py +++ b/blocks/Xcos/blocks/CONST_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CONST_f(outroot, attribid, ordering, geometry, parameters): + +def CONST_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CONST_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cstblk', 'TYPE_1', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CONST_m.py b/blocks/Xcos/blocks/CONST_m.py index 990d902c..357fc1a0 100644 --- a/blocks/Xcos/blocks/CONST_m.py +++ b/blocks/Xcos/blocks/CONST_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CONST_m(outroot, attribid, ordering, geometry, parameters): + +def CONST_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CONST_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cstblk4_m', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CONVERT.py b/blocks/Xcos/blocks/CONVERT.py index 643bd669..154ce6e4 100644 --- a/blocks/Xcos/blocks/CONVERT.py +++ b/blocks/Xcos/blocks/CONVERT.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CONVERT(outroot, attribid, ordering, geometry, parameters): + +def CONVERT(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CONVERT' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'convert', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/COSBLK_f.py b/blocks/Xcos/blocks/COSBLK_f.py index 590421a7..5cc9415a 100644 --- a/blocks/Xcos/blocks/COSBLK_f.py +++ b/blocks/Xcos/blocks/COSBLK_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def COSBLK_f(outroot, attribid, ordering, geometry, parameters): + +def COSBLK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'COSBLK_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cosblk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/CSCOPE.py b/blocks/Xcos/blocks/CSCOPE.py index 5c6d7220..aaeee9a8 100644 --- a/blocks/Xcos/blocks/CSCOPE.py +++ b/blocks/Xcos/blocks/CSCOPE.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CSCOPE(outroot, attribid, ordering, geometry, parameters): + +def CSCOPE(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CSCOPE' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cscope', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/CSCOPXY.py b/blocks/Xcos/blocks/CSCOPXY.py index f7ad12bb..e3e2ef40 100644 --- a/blocks/Xcos/blocks/CSCOPXY.py +++ b/blocks/Xcos/blocks/CSCOPXY.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CSCOPXY(outroot, attribid, ordering, geometry, parameters): + +def CSCOPXY(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CSCOPXY' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cscopxy', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CSCOPXY3D.py b/blocks/Xcos/blocks/CSCOPXY3D.py index 7a777653..5e1948b7 100644 --- a/blocks/Xcos/blocks/CSCOPXY3D.py +++ b/blocks/Xcos/blocks/CSCOPXY3D.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CSCOPXY3D(outroot, attribid, ordering, geometry, parameters): + +def CSCOPXY3D(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CSCOPXY3D' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cscopxy3d', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/CUMSUM.py b/blocks/Xcos/blocks/CUMSUM.py index 6261edb5..fca525c2 100644 --- a/blocks/Xcos/blocks/CUMSUM.py +++ b/blocks/Xcos/blocks/CUMSUM.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def CUMSUM(outroot, attribid, ordering, geometry, parameters): + +def CUMSUM(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CUMSUM' para1 = int(parameters[0]) @@ -21,7 +22,7 @@ def CUMSUM(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'cumsum' + datatype + '_' + sum outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/CURVE_c.py b/blocks/Xcos/blocks/CURVE_c.py index f919b266..3679e7f9 100644 --- a/blocks/Xcos/blocks/CURVE_c.py +++ b/blocks/Xcos/blocks/CURVE_c.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def CURVE_c(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CURVE_c' diff --git a/blocks/Xcos/blocks/CURV_f.py b/blocks/Xcos/blocks/CURV_f.py index 39f03506..371289cb 100644 --- a/blocks/Xcos/blocks/CURV_f.py +++ b/blocks/Xcos/blocks/CURV_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CURV_f(outroot, attribid, ordering, geometry, parameters): + +def CURV_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CURV_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'intplt', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/CVS.py b/blocks/Xcos/blocks/CVS.py index 294162b7..540d08a5 100644 --- a/blocks/Xcos/blocks/CVS.py +++ b/blocks/Xcos/blocks/CVS.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CVS(outroot, attribid, ordering, geometry, parameters): + +def CVS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CVS' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'CVS', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/Capacitor.py b/blocks/Xcos/blocks/Capacitor.py index 1aa94898..739857b7 100644 --- a/blocks/Xcos/blocks/Capacitor.py +++ b/blocks/Xcos/blocks/Capacitor.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Capacitor(outroot, attribid, ordering, geometry, parameters): + +def Capacitor(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Capacitor' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Capacitor', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/ConstantVoltage.py b/blocks/Xcos/blocks/ConstantVoltage.py index 4d08a720..9a932885 100644 --- a/blocks/Xcos/blocks/ConstantVoltage.py +++ b/blocks/Xcos/blocks/ConstantVoltage.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def ConstantVoltage(outroot, attribid, ordering, geometry, parameters): + +def ConstantVoltage(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ConstantVoltage' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'ConstantVoltage', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/Counter.py b/blocks/Xcos/blocks/Counter.py index 90efd46c..7909977c 100644 --- a/blocks/Xcos/blocks/Counter.py +++ b/blocks/Xcos/blocks/Counter.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Counter(outroot, attribid, ordering, geometry, parameters): + +def Counter(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Counter' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'counter', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/CurrentSensor.py b/blocks/Xcos/blocks/CurrentSensor.py index 1fc73d9a..220d6a4e 100644 --- a/blocks/Xcos/blocks/CurrentSensor.py +++ b/blocks/Xcos/blocks/CurrentSensor.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def CurrentSensor(outroot, attribid, ordering, geometry, parameters): + +def CurrentSensor(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'CurrentSensor' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'CurrentSensor', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DEADBAND.py b/blocks/Xcos/blocks/DEADBAND.py index 5b3c0815..5e1bc65c 100644 --- a/blocks/Xcos/blocks/DEADBAND.py +++ b/blocks/Xcos/blocks/DEADBAND.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DEADBAND(outroot, attribid, ordering, geometry, parameters): + +def DEADBAND(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DEADBAND' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'deadband', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DEBUG.py b/blocks/Xcos/blocks/DEBUG.py index c15fd52e..8c87628a 100644 --- a/blocks/Xcos/blocks/DEBUG.py +++ b/blocks/Xcos/blocks/DEBUG.py @@ -1,13 +1,14 @@ from common.AAAAAA import * -def DEBUG(outroot, attribid, ordering, geometry, parameters): + +def DEBUG(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DEBUG' code = parameters[0] codeLines = code.split('\n') outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, '%debug_scicos', 'DEBUG', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/DELAYV_f.py b/blocks/Xcos/blocks/DELAYV_f.py index a16e71f2..5bad49d3 100644 --- a/blocks/Xcos/blocks/DELAYV_f.py +++ b/blocks/Xcos/blocks/DELAYV_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DELAYV_f(outroot, attribid, ordering, geometry, parameters): + +def DELAYV_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DELAYV_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'delayv', 'TYPE_1', func_name, BLOCKTYPE_D, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DELAY_f.py b/blocks/Xcos/blocks/DELAY_f.py index 20637403..22683395 100644 --- a/blocks/Xcos/blocks/DELAY_f.py +++ b/blocks/Xcos/blocks/DELAY_f.py @@ -10,11 +10,11 @@ from common.AAAAAA import * # port_id = ['7a86d9c5:18e504d8baa:-7fae'] -def DELAY_f(outroot, attribid, ordering, geometry, parameters): +def DELAY_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DELAY_f' block_id, port_id, link_id = generate_id(6, 1, 0) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H) diff --git a/blocks/Xcos/blocks/DEMUX.py b/blocks/Xcos/blocks/DEMUX.py index ba32dc0b..e0e26837 100644 --- a/blocks/Xcos/blocks/DEMUX.py +++ b/blocks/Xcos/blocks/DEMUX.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DEMUX(outroot, attribid, ordering, geometry, parameters): + +def DEMUX(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DEMUX' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'multiplex', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DEMUX_f.py b/blocks/Xcos/blocks/DEMUX_f.py index a6418d0f..ce428ee3 100644 --- a/blocks/Xcos/blocks/DEMUX_f.py +++ b/blocks/Xcos/blocks/DEMUX_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DEMUX_f(outroot, attribid, ordering, geometry, parameters): + +def DEMUX_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DEMUX_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'demux', 'TYPE_1', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DERIV.py b/blocks/Xcos/blocks/DERIV.py index c2f33d91..8b824027 100644 --- a/blocks/Xcos/blocks/DERIV.py +++ b/blocks/Xcos/blocks/DERIV.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DERIV(outroot, attribid, ordering, geometry, parameters): + +def DERIV(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DERIV' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'deriv', 'C_OR_FORTRAN', func_name, BLOCKTYPE_X, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DFLIPFLOP.py b/blocks/Xcos/blocks/DFLIPFLOP.py index 86283167..8d125d59 100644 --- a/blocks/Xcos/blocks/DFLIPFLOP.py +++ b/blocks/Xcos/blocks/DFLIPFLOP.py @@ -12,11 +12,12 @@ from blocks.SPLIT_f import SPLIT_f from blocks.SELECT_m import SELECT_m from common.AAAAAA import * -def DFLIPFLOP(outroot, attribid, ordering, geometry, parameters): + +def DFLIPFLOP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DFLIPFLOP' block_id, port_id, link_id = generate_id(21, 52, 24) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DIFF_f.py b/blocks/Xcos/blocks/DIFF_f.py index ee4fe5e1..6b0f2f1c 100644 --- a/blocks/Xcos/blocks/DIFF_f.py +++ b/blocks/Xcos/blocks/DIFF_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DIFF_f(outroot, attribid, ordering, geometry, parameters): + +def DIFF_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DIFF_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'diffblk', 'OLDBLOCKS', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/DLATCH.py b/blocks/Xcos/blocks/DLATCH.py index b5e5fa14..305d53ba 100644 --- a/blocks/Xcos/blocks/DLATCH.py +++ b/blocks/Xcos/blocks/DLATCH.py @@ -7,11 +7,12 @@ from blocks.IN_f import IN_f from blocks.OUT_f import OUT_f from common.AAAAAA import * -def DLATCH(outroot, attribid, ordering, geometry, parameters): + +def DLATCH(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DLATCH' block_id, port_id, link_id = generate_id(12, 20, 9) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DLR.py b/blocks/Xcos/blocks/DLR.py index 175a399e..c007f0d1 100644 --- a/blocks/Xcos/blocks/DLR.py +++ b/blocks/Xcos/blocks/DLR.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def DLR(outroot, attribid, ordering, geometry, parameters): + +def DLR(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DLR' depends_on_flag = 0 @@ -38,7 +39,7 @@ def DLR(outroot, attribid, ordering, geometry, parameters): depends_on_flag = 1 outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'dsslti4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D, dependsOnU=depends_on_flag) diff --git a/blocks/Xcos/blocks/DLRADAPT_f.py b/blocks/Xcos/blocks/DLRADAPT_f.py index 6ca9ca0c..0932a96f 100644 --- a/blocks/Xcos/blocks/DLRADAPT_f.py +++ b/blocks/Xcos/blocks/DLRADAPT_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DLRADAPT_f(outroot, attribid, ordering, geometry, parameters): + +def DLRADAPT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DLRADAPT_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'dlradp', 'DEFAULT', func_name, BLOCKTYPE_D, dependsOnU='1') diff --git a/blocks/Xcos/blocks/DLSS.py b/blocks/Xcos/blocks/DLSS.py index 1bb9148b..ce9c2a6c 100644 --- a/blocks/Xcos/blocks/DLSS.py +++ b/blocks/Xcos/blocks/DLSS.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DLSS(outroot, attribid, ordering, geometry, parameters): + +def DLSS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DLSS' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'dsslti4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/DOLLAR.py b/blocks/Xcos/blocks/DOLLAR.py index 21663591..188c0953 100644 --- a/blocks/Xcos/blocks/DOLLAR.py +++ b/blocks/Xcos/blocks/DOLLAR.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DOLLAR(outroot, attribid, ordering, geometry, parameters): + +def DOLLAR(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DOLLAR' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'dollar4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/DOLLAR_f.py b/blocks/Xcos/blocks/DOLLAR_f.py index 02789587..010a46da 100644 --- a/blocks/Xcos/blocks/DOLLAR_f.py +++ b/blocks/Xcos/blocks/DOLLAR_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DOLLAR_f(outroot, attribid, ordering, geometry, parameters): + +def DOLLAR_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DOLLAR_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'dollar', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/DOLLAR_m.py b/blocks/Xcos/blocks/DOLLAR_m.py index 3dc7de1b..5e541bb5 100644 --- a/blocks/Xcos/blocks/DOLLAR_m.py +++ b/blocks/Xcos/blocks/DOLLAR_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def DOLLAR_m(outroot, attribid, ordering, geometry, parameters): + +def DOLLAR_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'DOLLAR_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'dollar4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/Diode.py b/blocks/Xcos/blocks/Diode.py index 76c3acb4..0ec6d31c 100644 --- a/blocks/Xcos/blocks/Diode.py +++ b/blocks/Xcos/blocks/Diode.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Diode(outroot, attribid, ordering, geometry, parameters): + +def Diode(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Diode' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Diode', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/EDGETRIGGER.py b/blocks/Xcos/blocks/EDGETRIGGER.py index 9786f2db..196039f8 100644 --- a/blocks/Xcos/blocks/EDGETRIGGER.py +++ b/blocks/Xcos/blocks/EDGETRIGGER.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def EDGETRIGGER(outroot, attribid, ordering, geometry, parameters): + +def EDGETRIGGER(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EDGETRIGGER' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'edgetrig', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/EDGE_TRIGGER.py b/blocks/Xcos/blocks/EDGE_TRIGGER.py index 84998ad6..9abc4497 100644 --- a/blocks/Xcos/blocks/EDGE_TRIGGER.py +++ b/blocks/Xcos/blocks/EDGE_TRIGGER.py @@ -4,11 +4,12 @@ from blocks.IFTHEL_f import IFTHEL_f from blocks.EDGETRIGGER import EDGETRIGGER from common.AAAAAA import * -def EDGE_TRIGGER(outroot, attribid, ordering, geometry, parameters): + +def EDGE_TRIGGER(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EDGE_TRIGGER' block_id, port_id, link_id = generate_id(6, 7, 4) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/ENDBLK.py b/blocks/Xcos/blocks/ENDBLK.py index 8599f2b8..a5e6633a 100644 --- a/blocks/Xcos/blocks/ENDBLK.py +++ b/blocks/Xcos/blocks/ENDBLK.py @@ -5,11 +5,11 @@ from common.AAAAAA import * # '-76454188:14e1ef4db88:-7d55'] -def ENDBLK(outroot, attribid, ordering, geometry, parameters): +def ENDBLK(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ENDBLK' block_id, port_id, link_id = generate_id(3, 0, 0) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H) diff --git a/blocks/Xcos/blocks/END_c.py b/blocks/Xcos/blocks/END_c.py index 2f0c2688..46ddef50 100644 --- a/blocks/Xcos/blocks/END_c.py +++ b/blocks/Xcos/blocks/END_c.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def END_c(outroot, attribid, ordering, geometry, parameters): + +def END_c(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'END_c' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'scicosexit', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/ESELECT_f.py b/blocks/Xcos/blocks/ESELECT_f.py index 01bc52e1..33e54dc8 100644 --- a/blocks/Xcos/blocks/ESELECT_f.py +++ b/blocks/Xcos/blocks/ESELECT_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def ESELECT_f(outroot, attribid, ordering, geometry, parameters): + +def ESELECT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ESELECT_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'eselect', 'ESELECT', func_name, BLOCKTYPE_L, dependsOnU='1') diff --git a/blocks/Xcos/blocks/EVTDLY_c.py b/blocks/Xcos/blocks/EVTDLY_c.py index ab9adc6f..f6e172bc 100644 --- a/blocks/Xcos/blocks/EVTDLY_c.py +++ b/blocks/Xcos/blocks/EVTDLY_c.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def EVTDLY_c(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EVTDLY_c' diff --git a/blocks/Xcos/blocks/EVTDLY_f.py b/blocks/Xcos/blocks/EVTDLY_f.py index 2dc6d271..d5073d1b 100644 --- a/blocks/Xcos/blocks/EVTDLY_f.py +++ b/blocks/Xcos/blocks/EVTDLY_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def EVTDLY_f(outroot, attribid, ordering, geometry, parameters): + +def EVTDLY_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EVTDLY_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'evtdly4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/EVTGEN_f.py b/blocks/Xcos/blocks/EVTGEN_f.py index a45565d6..572e6ef9 100644 --- a/blocks/Xcos/blocks/EVTGEN_f.py +++ b/blocks/Xcos/blocks/EVTGEN_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def EVTGEN_f(outroot, attribid, ordering, geometry, parameters): + +def EVTGEN_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EVTGEN_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'trash', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/EVTVARDLY.py b/blocks/Xcos/blocks/EVTVARDLY.py index 2ed811bf..0ecf38ef 100644 --- a/blocks/Xcos/blocks/EVTVARDLY.py +++ b/blocks/Xcos/blocks/EVTVARDLY.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def EVTVARDLY(outroot, attribid, ordering, geometry, parameters): + +def EVTVARDLY(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EVTVARDLY' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'evtvardly', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/EXPBLK_m.py b/blocks/Xcos/blocks/EXPBLK_m.py index 3d7f3b2a..2e9b2807 100644 --- a/blocks/Xcos/blocks/EXPBLK_m.py +++ b/blocks/Xcos/blocks/EXPBLK_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def EXPBLK_m(outroot, attribid, ordering, geometry, parameters): + +def EXPBLK_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EXPBLK_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'expblk_m', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/EXPRESSION.py b/blocks/Xcos/blocks/EXPRESSION.py index ef38ec4b..ef0d72d2 100644 --- a/blocks/Xcos/blocks/EXPRESSION.py +++ b/blocks/Xcos/blocks/EXPRESSION.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def EXPRESSION(outroot, attribid, ordering, geometry, parameters): + +def EXPRESSION(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EXPRESSION' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'evaluate_expr', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/EXTRACT.py b/blocks/Xcos/blocks/EXTRACT.py index a9e1bde6..22151a22 100644 --- a/blocks/Xcos/blocks/EXTRACT.py +++ b/blocks/Xcos/blocks/EXTRACT.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def EXTRACT(outroot, attribid, ordering, geometry, parameters): + +def EXTRACT(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EXTRACT' data_type = ['', 'extract', 'extractz'] @@ -8,7 +9,7 @@ def EXTRACT(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/EXTRACTBITS.py b/blocks/Xcos/blocks/EXTRACTBITS.py index 14d3c012..0766e963 100644 --- a/blocks/Xcos/blocks/EXTRACTBITS.py +++ b/blocks/Xcos/blocks/EXTRACTBITS.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def EXTRACTBITS(outroot, attribid, ordering, geometry, parameters): + +def EXTRACTBITS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EXTRACTBITS' d_type = ['', 'UH', 'LH', 'MSB', 'LSB', 'RB'] @@ -24,7 +25,7 @@ def EXTRACTBITS(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'extract_bit_' + bits_extract + bit_int outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/EXTRACTOR.py b/blocks/Xcos/blocks/EXTRACTOR.py index d8992b26..ca020255 100644 --- a/blocks/Xcos/blocks/EXTRACTOR.py +++ b/blocks/Xcos/blocks/EXTRACTOR.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def EXTRACTOR(outroot, attribid, ordering, geometry, parameters): + +def EXTRACTOR(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EXTRACTOR' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'extractor', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/EXTTRI.py b/blocks/Xcos/blocks/EXTTRI.py index 657683bc..8a89f4fa 100644 --- a/blocks/Xcos/blocks/EXTTRI.py +++ b/blocks/Xcos/blocks/EXTTRI.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def EXTTRI(outroot, attribid, ordering, geometry, parameters): + +def EXTTRI(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'EXTTRI' extration_type = ['', 'exttril', 'exttriu', 'extdiag'] @@ -11,7 +12,7 @@ def EXTTRI(outroot, attribid, ordering, geometry, parameters): simulation_func_name = extration_type[para2] + data_type[para1] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/Extract_Activation.py b/blocks/Xcos/blocks/Extract_Activation.py index 70c4999f..d8049c5e 100644 --- a/blocks/Xcos/blocks/Extract_Activation.py +++ b/blocks/Xcos/blocks/Extract_Activation.py @@ -4,11 +4,12 @@ from blocks.IN_f import IN_f from blocks.CLKOUTV_f import CLKOUTV_f from common.AAAAAA import * -def Extract_Activation(outroot, attribid, ordering, geometry, parameters): + +def Extract_Activation(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Extract_Activation' block_id, port_id, link_id = generate_id(6, 9, 4) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/FROM.py b/blocks/Xcos/blocks/FROM.py index 975c81fd..61f323f4 100644 --- a/blocks/Xcos/blocks/FROM.py +++ b/blocks/Xcos/blocks/FROM.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def FROM(outroot, attribid, ordering, geometry, parameters): + +def FROM(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'FROM' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'from', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/FROMMO.py b/blocks/Xcos/blocks/FROMMO.py index 7b63f8b9..3fc06975 100644 --- a/blocks/Xcos/blocks/FROMMO.py +++ b/blocks/Xcos/blocks/FROMMO.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def FROMMO(outroot, attribid, ordering, geometry, parameters): + +def FROMMO(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'FROMMO' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'frommo', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/FROMWSB.py b/blocks/Xcos/blocks/FROMWSB.py index 1eb4f4d3..dd801cee 100644 --- a/blocks/Xcos/blocks/FROMWSB.py +++ b/blocks/Xcos/blocks/FROMWSB.py @@ -11,11 +11,11 @@ from common.AAAAAA import * # link_id = ['5631d1e9:18ea7a6d774:-7fed', '5631d1e9:18ea7a6d774:-7fec'] -def FROMWSB(outroot, attribid, ordering, geometry, parameters): +def FROMWSB(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'FROMWSB' block_id, port_id, link_id = generate_id(4, 4, 2) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H) diff --git a/blocks/Xcos/blocks/FROMWS_c.py b/blocks/Xcos/blocks/FROMWS_c.py index 48edf3c2..5894dd51 100644 --- a/blocks/Xcos/blocks/FROMWS_c.py +++ b/blocks/Xcos/blocks/FROMWS_c.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def FROMWS_c(outroot, attribid, ordering, geometry, parameters): + +def FROMWS_c(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'FROMWS_c' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'fromws_c', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/Flowmeter.py b/blocks/Xcos/blocks/Flowmeter.py index 9f5f28af..076c3d69 100644 --- a/blocks/Xcos/blocks/Flowmeter.py +++ b/blocks/Xcos/blocks/Flowmeter.py @@ -1,11 +1,12 @@ from common.AAAAAA import * -def Flowmeter(outroot, attribid, ordering, geometry, parameters): + +def Flowmeter(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Flowmeter' parameters = ['1'] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Flowmeter', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/GAINBLK.py b/blocks/Xcos/blocks/GAINBLK.py index 14c07249..2034c8d8 100644 --- a/blocks/Xcos/blocks/GAINBLK.py +++ b/blocks/Xcos/blocks/GAINBLK.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GAINBLK(outroot, attribid, ordering, geometry, parameters): + +def GAINBLK(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GAINBLK' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'gainblk', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/GAINBLK_f.py b/blocks/Xcos/blocks/GAINBLK_f.py index 02259677..07860960 100644 --- a/blocks/Xcos/blocks/GAINBLK_f.py +++ b/blocks/Xcos/blocks/GAINBLK_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GAINBLK_f(outroot, attribid, ordering, geometry, parameters): + +def GAINBLK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GAINBLK_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'gain', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/GAIN_f.py b/blocks/Xcos/blocks/GAIN_f.py index a2ef3b18..83c41aac 100644 --- a/blocks/Xcos/blocks/GAIN_f.py +++ b/blocks/Xcos/blocks/GAIN_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GAIN_f(outroot, attribid, ordering, geometry, parameters): + +def GAIN_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GAIN_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'gain', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/GENERAL_f.py b/blocks/Xcos/blocks/GENERAL_f.py index 056c3ade..bd65cb5b 100644 --- a/blocks/Xcos/blocks/GENERAL_f.py +++ b/blocks/Xcos/blocks/GENERAL_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GENERAL_f(outroot, attribid, ordering, geometry, parameters): + +def GENERAL_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GENERAL_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'zcross', 'TYPE_1', func_name, BLOCKTYPE_Z, dependsOnU='1') diff --git a/blocks/Xcos/blocks/GENSIN_f.py b/blocks/Xcos/blocks/GENSIN_f.py index ffc60714..acb36fb8 100644 --- a/blocks/Xcos/blocks/GENSIN_f.py +++ b/blocks/Xcos/blocks/GENSIN_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GENSIN_f(outroot, attribid, ordering, geometry, parameters): + +def GENSIN_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GENSIN_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'gensin', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/GENSQR_f.py b/blocks/Xcos/blocks/GENSQR_f.py index f84cf2c3..62342394 100644 --- a/blocks/Xcos/blocks/GENSQR_f.py +++ b/blocks/Xcos/blocks/GENSQR_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GENSQR_f(outroot, attribid, ordering, geometry, parameters): + +def GENSQR_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GENSQR_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'gensqr', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/GOTO.py b/blocks/Xcos/blocks/GOTO.py index 9d93651f..a9bad292 100644 --- a/blocks/Xcos/blocks/GOTO.py +++ b/blocks/Xcos/blocks/GOTO.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GOTO(outroot, attribid, ordering, geometry, parameters): + +def GOTO(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GOTO' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'goto', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/GOTOMO.py b/blocks/Xcos/blocks/GOTOMO.py index 770c1884..9945b7be 100644 --- a/blocks/Xcos/blocks/GOTOMO.py +++ b/blocks/Xcos/blocks/GOTOMO.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GOTOMO(outroot, attribid, ordering, geometry, parameters): + +def GOTOMO(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GOTOMO' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'gotomo', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/GotoTagVisibility.py b/blocks/Xcos/blocks/GotoTagVisibility.py index ae48a6fe..68290943 100644 --- a/blocks/Xcos/blocks/GotoTagVisibility.py +++ b/blocks/Xcos/blocks/GotoTagVisibility.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GotoTagVisibility(outroot, attribid, ordering, geometry, parameters): + +def GotoTagVisibility(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GotoTagVisibility' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'gototagvisibility', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/GotoTagVisibilityMO.py b/blocks/Xcos/blocks/GotoTagVisibilityMO.py index cf979fdb..b046c887 100644 --- a/blocks/Xcos/blocks/GotoTagVisibilityMO.py +++ b/blocks/Xcos/blocks/GotoTagVisibilityMO.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def GotoTagVisibilityMO(outroot, attribid, ordering, geometry, parameters): + +def GotoTagVisibilityMO(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'GotoTagVisibilityMO' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'gototagvisibilitymo', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/Ground.py b/blocks/Xcos/blocks/Ground.py index c99bd56a..a490f70b 100644 --- a/blocks/Xcos/blocks/Ground.py +++ b/blocks/Xcos/blocks/Ground.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Ground(outroot, attribid, ordering, geometry, parameters): + +def Ground(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Ground' parameters = [""] outnode = addOutNode(outroot, BLOCK_GROUND, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Ground', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/Ground_g.py b/blocks/Xcos/blocks/Ground_g.py index 3ae6ab21..aa6c1bb1 100644 --- a/blocks/Xcos/blocks/Ground_g.py +++ b/blocks/Xcos/blocks/Ground_g.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Ground_g(outroot, attribid, ordering, geometry, parameters): + +def Ground_g(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Ground_g' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cstblk4_m', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/Gyrator.py b/blocks/Xcos/blocks/Gyrator.py index 7f870351..fa7d44c7 100644 --- a/blocks/Xcos/blocks/Gyrator.py +++ b/blocks/Xcos/blocks/Gyrator.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Gyrator(outroot, attribid, ordering, geometry, parameters): + +def Gyrator(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Gyrator' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Gyrator', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/HALT_f.py b/blocks/Xcos/blocks/HALT_f.py index a16aecb1..3dcb1c50 100644 --- a/blocks/Xcos/blocks/HALT_f.py +++ b/blocks/Xcos/blocks/HALT_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def HALT_f(outroot, attribid, ordering, geometry, parameters): + +def HALT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'HALT_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'hltblk', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/HYSTHERESIS.py b/blocks/Xcos/blocks/HYSTHERESIS.py index a127fade..ca57d44b 100644 --- a/blocks/Xcos/blocks/HYSTHERESIS.py +++ b/blocks/Xcos/blocks/HYSTHERESIS.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def HYSTHERESIS(outroot, attribid, ordering, geometry, parameters): + +def HYSTHERESIS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'HYSTHERESIS' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'hystheresis', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/IFTHEL_f.py b/blocks/Xcos/blocks/IFTHEL_f.py index 07a23945..1181ecf2 100644 --- a/blocks/Xcos/blocks/IFTHEL_f.py +++ b/blocks/Xcos/blocks/IFTHEL_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def IFTHEL_f(outroot, attribid, ordering, geometry, parameters): + +def IFTHEL_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'IFTHEL_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'ifthel', 'IFTHENELSE', func_name, BLOCKTYPE_L, dependsOnU='1') diff --git a/blocks/Xcos/blocks/IMPSPLIT_f.py b/blocks/Xcos/blocks/IMPSPLIT_f.py index b18706d3..dd530d8c 100644 --- a/blocks/Xcos/blocks/IMPSPLIT_f.py +++ b/blocks/Xcos/blocks/IMPSPLIT_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def IMPSPLIT_f(outroot, attribid, ordering, geometry, parameters): + +def IMPSPLIT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'IMPSPLIT_f' outnode = addOutNode(outroot, BLOCK_SPLIT, - attribid, ordering, 1, + attribid, ordering, parent, func_name, '', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/INIMPL_f.py b/blocks/Xcos/blocks/INIMPL_f.py index 8e4059c4..f4eb8f0c 100644 --- a/blocks/Xcos/blocks/INIMPL_f.py +++ b/blocks/Xcos/blocks/INIMPL_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def INIMPL_f(outroot, attribid, ordering, geometry, parameters): + +def INIMPL_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'INIMPL_f' outnode = addOutNode(outroot, BLOCK_IMPLICIT_IN, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'inimpl', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/INTEGRAL_f.py b/blocks/Xcos/blocks/INTEGRAL_f.py index 8ad58042..93d6c6dc 100644 --- a/blocks/Xcos/blocks/INTEGRAL_f.py +++ b/blocks/Xcos/blocks/INTEGRAL_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def INTEGRAL_f(outroot, attribid, ordering, geometry, parameters): + +def INTEGRAL_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'INTEGRAL_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'integr', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/INTEGRAL_m.py b/blocks/Xcos/blocks/INTEGRAL_m.py index c7fcca13..903a8d31 100644 --- a/blocks/Xcos/blocks/INTEGRAL_m.py +++ b/blocks/Xcos/blocks/INTEGRAL_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def INTEGRAL_m(outroot, attribid, ordering, geometry, parameters): + +def INTEGRAL_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'INTEGRAL_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'integral_func', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/INTMUL.py b/blocks/Xcos/blocks/INTMUL.py index 331d632c..3f8a6d83 100644 --- a/blocks/Xcos/blocks/INTMUL.py +++ b/blocks/Xcos/blocks/INTMUL.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def INTMUL(outroot, attribid, ordering, geometry, parameters): + +def INTMUL(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'INTMUL' datatype = ['', '', '', 'i32', 'i16', 'i8', 'ui32', 'ui16', 'ui8'] @@ -17,7 +18,7 @@ def INTMUL(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'matmul_' + datatype[para1] + overflow outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/INTRP2BLK_f.py b/blocks/Xcos/blocks/INTRP2BLK_f.py index f75ee6c5..beabb170 100644 --- a/blocks/Xcos/blocks/INTRP2BLK_f.py +++ b/blocks/Xcos/blocks/INTRP2BLK_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def INTRP2BLK_f(outroot, attribid, ordering, geometry, parameters): + +def INTRP2BLK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'INTRP2BLK_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'intrp2', 'TYPE_1', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/INTRPLBLK_f.py b/blocks/Xcos/blocks/INTRPLBLK_f.py index 85a7ddbf..1c3a1715 100644 --- a/blocks/Xcos/blocks/INTRPLBLK_f.py +++ b/blocks/Xcos/blocks/INTRPLBLK_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def INTRPLBLK_f(outroot, attribid, ordering, geometry, parameters): + +def INTRPLBLK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'INTRPLBLK_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'intrpl', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/INVBLK.py b/blocks/Xcos/blocks/INVBLK.py index 41bc0aff..ae3cc396 100644 --- a/blocks/Xcos/blocks/INVBLK.py +++ b/blocks/Xcos/blocks/INVBLK.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def INVBLK(outroot, attribid, ordering, geometry, parameters): + +def INVBLK(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'INVBLK' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'invblk4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/IN_f.py b/blocks/Xcos/blocks/IN_f.py index 3951ae6c..a5183dc0 100644 --- a/blocks/Xcos/blocks/IN_f.py +++ b/blocks/Xcos/blocks/IN_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def IN_f(outroot, attribid, ordering, geometry, parameters): + +def IN_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'IN_f' outnode = addOutNode(outroot, BLOCK_EXPLICIT_IN, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'input', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/ISELECT_m.py b/blocks/Xcos/blocks/ISELECT_m.py index ecd1061d..7415a7ec 100644 --- a/blocks/Xcos/blocks/ISELECT_m.py +++ b/blocks/Xcos/blocks/ISELECT_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def ISELECT_m(outroot, attribid, ordering, geometry, parameters): + +def ISELECT_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ISELECT_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'selector_m', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/IdealTransformer.py b/blocks/Xcos/blocks/IdealTransformer.py index 713fd05a..f278798a 100644 --- a/blocks/Xcos/blocks/IdealTransformer.py +++ b/blocks/Xcos/blocks/IdealTransformer.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def IdealTransformer(outroot, attribid, ordering, geometry, parameters): + +def IdealTransformer(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'IdealTransformer' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'IdealTransformer', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/Inductor.py b/blocks/Xcos/blocks/Inductor.py index 4bceb434..65f0ce19 100644 --- a/blocks/Xcos/blocks/Inductor.py +++ b/blocks/Xcos/blocks/Inductor.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Inductor(outroot, attribid, ordering, geometry, parameters): + +def Inductor(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Inductor' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Inductor', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/JKFLIPFLOP.py b/blocks/Xcos/blocks/JKFLIPFLOP.py index b71ef74f..865c8a87 100644 --- a/blocks/Xcos/blocks/JKFLIPFLOP.py +++ b/blocks/Xcos/blocks/JKFLIPFLOP.py @@ -7,11 +7,12 @@ from blocks.IN_f import IN_f from blocks.OUT_f import OUT_f from common.AAAAAA import * -def JKFLIPFLOP(outroot, attribid, ordering, geometry, parameters): + +def JKFLIPFLOP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'JKFLIPFLOP' block_id, port_id, link_id = generate_id(13, 24, 11) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H, dependsOnU='1') diff --git a/blocks/Xcos/blocks/LOGBLK_f.py b/blocks/Xcos/blocks/LOGBLK_f.py index 539e9b38..341d94ee 100644 --- a/blocks/Xcos/blocks/LOGBLK_f.py +++ b/blocks/Xcos/blocks/LOGBLK_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def LOGBLK_f(outroot, attribid, ordering, geometry, parameters): + +def LOGBLK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'LOGBLK_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'logblk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/LOGIC.py b/blocks/Xcos/blocks/LOGIC.py index 961fef73..25f56346 100644 --- a/blocks/Xcos/blocks/LOGIC.py +++ b/blocks/Xcos/blocks/LOGIC.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def LOGIC(outroot, attribid, ordering, geometry, parameters): + +def LOGIC(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'LOGIC' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'logic', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/LOGICAL_OP.py b/blocks/Xcos/blocks/LOGICAL_OP.py index a4759fd1..fe55504f 100644 --- a/blocks/Xcos/blocks/LOGICAL_OP.py +++ b/blocks/Xcos/blocks/LOGICAL_OP.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def LOGICAL_OP(outroot, attribid, ordering, geometry, parameters): + +def LOGICAL_OP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'LOGICAL_OP' d_type = ['', '', '', 'i32', 'i16', 'i8', 'ui32', 'ui16', 'ui8'] @@ -15,7 +16,7 @@ def LOGICAL_OP(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'logicalop' + datatype outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/LOOKUP_f.py b/blocks/Xcos/blocks/LOOKUP_f.py index 52156529..cc5e4a9d 100644 --- a/blocks/Xcos/blocks/LOOKUP_f.py +++ b/blocks/Xcos/blocks/LOOKUP_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def LOOKUP_f(outroot, attribid, ordering, geometry, parameters): + +def LOOKUP_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'LOOKUP_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'lookup', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATBKSL.py b/blocks/Xcos/blocks/MATBKSL.py index 413f0b68..437658fc 100644 --- a/blocks/Xcos/blocks/MATBKSL.py +++ b/blocks/Xcos/blocks/MATBKSL.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATBKSL(outroot, attribid, ordering, geometry, parameters): + +def MATBKSL(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATBKSL' data_type = ['', 'mat_bksl', 'matz_bksl'] @@ -8,7 +9,7 @@ def MATBKSL(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATCATH.py b/blocks/Xcos/blocks/MATCATH.py index e19bd70e..41f15ab6 100644 --- a/blocks/Xcos/blocks/MATCATH.py +++ b/blocks/Xcos/blocks/MATCATH.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def MATCATH(outroot, attribid, ordering, geometry, parameters): + +def MATCATH(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATCATH' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'mat_cath', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATCATV.py b/blocks/Xcos/blocks/MATCATV.py index f20c18c8..b58cd006 100644 --- a/blocks/Xcos/blocks/MATCATV.py +++ b/blocks/Xcos/blocks/MATCATV.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def MATCATV(outroot, attribid, ordering, geometry, parameters): + +def MATCATV(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATCATV' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'mat_catv', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATDET.py b/blocks/Xcos/blocks/MATDET.py index 957ba2f8..631fbe38 100644 --- a/blocks/Xcos/blocks/MATDET.py +++ b/blocks/Xcos/blocks/MATDET.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATDET(outroot, attribid, ordering, geometry, parameters): + +def MATDET(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATDET' data_type = ['', 'mat_det', 'matz_det'] @@ -8,7 +9,7 @@ def MATDET(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATDIAG.py b/blocks/Xcos/blocks/MATDIAG.py index 5a73476e..2f224d12 100644 --- a/blocks/Xcos/blocks/MATDIAG.py +++ b/blocks/Xcos/blocks/MATDIAG.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATDIAG(outroot, attribid, ordering, geometry, parameters): + +def MATDIAG(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATDIAG' data_type = ['', 'mat_diag', 'matz_diag'] @@ -8,7 +9,7 @@ def MATDIAG(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATDIV.py b/blocks/Xcos/blocks/MATDIV.py index 721af4a9..ce977481 100644 --- a/blocks/Xcos/blocks/MATDIV.py +++ b/blocks/Xcos/blocks/MATDIV.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATDIV(outroot, attribid, ordering, geometry, parameters): + +def MATDIV(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATDIV' data_type = ['', 'mat_div', 'matz_div'] @@ -8,7 +9,7 @@ def MATDIV(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATEIG.py b/blocks/Xcos/blocks/MATEIG.py index 94e0215c..49957b33 100644 --- a/blocks/Xcos/blocks/MATEIG.py +++ b/blocks/Xcos/blocks/MATEIG.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATEIG(outroot, attribid, ordering, geometry, parameters): + +def MATEIG(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATEIG' data_type = ['', 'mat_', 'matz_'] @@ -11,7 +12,7 @@ def MATEIG(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[para1] + decomposition_type[para2] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATEXPM.py b/blocks/Xcos/blocks/MATEXPM.py index 3a4a2c69..52322903 100644 --- a/blocks/Xcos/blocks/MATEXPM.py +++ b/blocks/Xcos/blocks/MATEXPM.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATEXPM(outroot, attribid, ordering, geometry, parameters): + +def MATEXPM(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATEXPM' data_type = ['', 'mat_expm', 'matz_expm'] @@ -8,7 +9,7 @@ def MATEXPM(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATINV.py b/blocks/Xcos/blocks/MATINV.py index 9cdc858a..8da86a0e 100644 --- a/blocks/Xcos/blocks/MATINV.py +++ b/blocks/Xcos/blocks/MATINV.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATINV(outroot, attribid, ordering, geometry, parameters): + +def MATINV(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATINV' data_type = ['', 'mat_inv', 'matz_inv'] @@ -8,7 +9,7 @@ def MATINV(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATLU.py b/blocks/Xcos/blocks/MATLU.py index 97156b38..9c8dfae8 100644 --- a/blocks/Xcos/blocks/MATLU.py +++ b/blocks/Xcos/blocks/MATLU.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATLU(outroot, attribid, ordering, geometry, parameters): + +def MATLU(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATLU' data_type = ['', 'mat_lu', 'matz_lu'] @@ -8,7 +9,7 @@ def MATLU(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATMAGPHI.py b/blocks/Xcos/blocks/MATMAGPHI.py index e27ee042..464f1cfb 100644 --- a/blocks/Xcos/blocks/MATMAGPHI.py +++ b/blocks/Xcos/blocks/MATMAGPHI.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATMAGPHI(outroot, attribid, ordering, geometry, parameters): + +def MATMAGPHI(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATMAGPHI' data_type = ['', 'matz_abs', 'matz_absc'] @@ -8,7 +9,7 @@ def MATMAGPHI(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATMUL.py b/blocks/Xcos/blocks/MATMUL.py index 723008d8..69eb1f1f 100644 --- a/blocks/Xcos/blocks/MATMUL.py +++ b/blocks/Xcos/blocks/MATMUL.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATMUL(outroot, attribid, ordering, geometry, parameters): + +def MATMUL(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATMUL' data_type = ['', 'matmul_m', 'matzmul_m', @@ -39,7 +40,7 @@ def MATMUL(outroot, attribid, ordering, geometry, parameters): simulation_func_name = '' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATPINV.py b/blocks/Xcos/blocks/MATPINV.py index df227be5..28577bd3 100644 --- a/blocks/Xcos/blocks/MATPINV.py +++ b/blocks/Xcos/blocks/MATPINV.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATPINV(outroot, attribid, ordering, geometry, parameters): + +def MATPINV(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATPINV' data_type = ['', 'mat_pinv', 'matz_pinv'] @@ -8,7 +9,7 @@ def MATPINV(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATRESH.py b/blocks/Xcos/blocks/MATRESH.py index a4025300..377992dd 100644 --- a/blocks/Xcos/blocks/MATRESH.py +++ b/blocks/Xcos/blocks/MATRESH.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATRESH(outroot, attribid, ordering, geometry, parameters): + +def MATRESH(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATRESH' data_type = ['', 'mat_reshape', 'matz_reshape'] @@ -8,7 +9,7 @@ def MATRESH(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATSING.py b/blocks/Xcos/blocks/MATSING.py index 58e685b7..5ad4be6a 100644 --- a/blocks/Xcos/blocks/MATSING.py +++ b/blocks/Xcos/blocks/MATSING.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATSING(outroot, attribid, ordering, geometry, parameters): + +def MATSING(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATSING' data_type = ['', 'mat_', 'matz_'] @@ -11,7 +12,7 @@ def MATSING(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[para1] + decomposition_type[para2] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATSUM.py b/blocks/Xcos/blocks/MATSUM.py index 54ead934..8d628a89 100644 --- a/blocks/Xcos/blocks/MATSUM.py +++ b/blocks/Xcos/blocks/MATSUM.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATSUM(outroot, attribid, ordering, geometry, parameters): + +def MATSUM(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATSUM' data_type = ['', 'mat_', 'matz_'] @@ -11,7 +12,7 @@ def MATSUM(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[para1] + sum_along[para2] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATTRAN.py b/blocks/Xcos/blocks/MATTRAN.py index e64dad9a..45481c46 100644 --- a/blocks/Xcos/blocks/MATTRAN.py +++ b/blocks/Xcos/blocks/MATTRAN.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATTRAN(outroot, attribid, ordering, geometry, parameters): + +def MATTRAN(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATTRAN' data_type = ['', 'mattran_m', 'matztran_m'] @@ -14,7 +15,7 @@ def MATTRAN(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[para1] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATZCONJ.py b/blocks/Xcos/blocks/MATZCONJ.py index 25bc56c6..8db6729a 100644 --- a/blocks/Xcos/blocks/MATZCONJ.py +++ b/blocks/Xcos/blocks/MATZCONJ.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def MATZCONJ(outroot, attribid, ordering, geometry, parameters): + +def MATZCONJ(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATZCONJ' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'matz_conj', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MATZREIM.py b/blocks/Xcos/blocks/MATZREIM.py index 05692e98..8783c44d 100644 --- a/blocks/Xcos/blocks/MATZREIM.py +++ b/blocks/Xcos/blocks/MATZREIM.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def MATZREIM(outroot, attribid, ordering, geometry, parameters): + +def MATZREIM(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MATZREIM' data_type = ['', 'matz_reim', 'matz_reimc'] @@ -8,7 +9,7 @@ def MATZREIM(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MAXMIN.py b/blocks/Xcos/blocks/MAXMIN.py index 2086410c..0dcd22dc 100644 --- a/blocks/Xcos/blocks/MAXMIN.py +++ b/blocks/Xcos/blocks/MAXMIN.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def MAXMIN(outroot, attribid, ordering, geometry, parameters): + +def MAXMIN(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MAXMIN' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'minmax', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MAX_f.py b/blocks/Xcos/blocks/MAX_f.py index 926a03bc..f4bea0e5 100644 --- a/blocks/Xcos/blocks/MAX_f.py +++ b/blocks/Xcos/blocks/MAX_f.py @@ -1,11 +1,12 @@ from common.AAAAAA import * -def MAX_f(outroot, attribid, ordering, geometry, parameters): + +def MAX_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MAX_f' parameters = [' '] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'maxblk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MBLOCK.py b/blocks/Xcos/blocks/MBLOCK.py index 37f1e872..7226d173 100644 --- a/blocks/Xcos/blocks/MBLOCK.py +++ b/blocks/Xcos/blocks/MBLOCK.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def MBLOCK(outroot, attribid, ordering, geometry, parameters): + +def MBLOCK(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MBLOCK' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Ball_Platform', 'MODELICA', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/MCLOCK_f.py b/blocks/Xcos/blocks/MCLOCK_f.py index 1323ad95..9b28070e 100644 --- a/blocks/Xcos/blocks/MCLOCK_f.py +++ b/blocks/Xcos/blocks/MCLOCK_f.py @@ -24,11 +24,11 @@ from common.AAAAAA import * # ] -def MCLOCK_f(outroot, attribid, ordering, geometry, parameters): +def MCLOCK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MCLOCK_f' block_id, port_id, link_id = generate_id(8, 15, 7) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H, dependsOnU="0", dependsOnT="0") diff --git a/blocks/Xcos/blocks/MFCLCK_f.py b/blocks/Xcos/blocks/MFCLCK_f.py index 26fbfc3e..461ec32a 100644 --- a/blocks/Xcos/blocks/MFCLCK_f.py +++ b/blocks/Xcos/blocks/MFCLCK_f.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def MFCLCK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MFCLCK_f' diff --git a/blocks/Xcos/blocks/MIN_f.py b/blocks/Xcos/blocks/MIN_f.py index beed5117..5ca836bc 100644 --- a/blocks/Xcos/blocks/MIN_f.py +++ b/blocks/Xcos/blocks/MIN_f.py @@ -1,11 +1,12 @@ from common.AAAAAA import * -def MIN_f(outroot, attribid, ordering, geometry, parameters): + +def MIN_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MIN_f' parameters = ['-1'] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'minblk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MUX.py b/blocks/Xcos/blocks/MUX.py index b454f5e7..c300d976 100644 --- a/blocks/Xcos/blocks/MUX.py +++ b/blocks/Xcos/blocks/MUX.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def MUX(outroot, attribid, ordering, geometry, parameters): + +def MUX(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MUX' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'multiplex', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/MUX_f.py b/blocks/Xcos/blocks/MUX_f.py index 13981e0f..8531370e 100644 --- a/blocks/Xcos/blocks/MUX_f.py +++ b/blocks/Xcos/blocks/MUX_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def MUX_f(outroot, attribid, ordering, geometry, parameters): + +def MUX_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'MUX_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'mux', 'TYPE_1', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/M_SWITCH.py b/blocks/Xcos/blocks/M_SWITCH.py index 61432aba..a9463e0d 100644 --- a/blocks/Xcos/blocks/M_SWITCH.py +++ b/blocks/Xcos/blocks/M_SWITCH.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def M_SWITCH(outroot, attribid, ordering, geometry, parameters): + +def M_SWITCH(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'M_SWITCH' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'mswitch', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/M_freq.py b/blocks/Xcos/blocks/M_freq.py index 7bc914c6..2d7a2036 100644 --- a/blocks/Xcos/blocks/M_freq.py +++ b/blocks/Xcos/blocks/M_freq.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def M_freq(outroot, attribid, ordering, geometry, parameters): + +def M_freq(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'M_freq' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'm_frequ', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/Modulo_Count.py b/blocks/Xcos/blocks/Modulo_Count.py index 91f754fd..4786cbda 100644 --- a/blocks/Xcos/blocks/Modulo_Count.py +++ b/blocks/Xcos/blocks/Modulo_Count.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Modulo_Count(outroot, attribid, ordering, geometry, parameters): + +def Modulo_Count(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Modulo_Count' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'modulo_count', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/NEGTOPOS_f.py b/blocks/Xcos/blocks/NEGTOPOS_f.py index 49202251..bdf924b6 100644 --- a/blocks/Xcos/blocks/NEGTOPOS_f.py +++ b/blocks/Xcos/blocks/NEGTOPOS_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def NEGTOPOS_f(outroot, attribid, ordering, geometry, parameters): + +def NEGTOPOS_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'NEGTOPOS_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'zcross', 'TYPE_1', func_name, BLOCKTYPE_Z, dependsOnU='1') diff --git a/blocks/Xcos/blocks/NMOS.py b/blocks/Xcos/blocks/NMOS.py index e8f8ad4f..073c42ec 100644 --- a/blocks/Xcos/blocks/NMOS.py +++ b/blocks/Xcos/blocks/NMOS.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def NMOS(outroot, attribid, ordering, geometry, parameters): + +def NMOS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'NMOS' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'NMOS', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/NPN.py b/blocks/Xcos/blocks/NPN.py index ed2a398f..df69cccf 100644 --- a/blocks/Xcos/blocks/NPN.py +++ b/blocks/Xcos/blocks/NPN.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def NPN(outroot, attribid, ordering, geometry, parameters): + +def NPN(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'NPN' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'NPN', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/NRMSOM_f.py b/blocks/Xcos/blocks/NRMSOM_f.py index a98fa971..4f27b7cd 100644 --- a/blocks/Xcos/blocks/NRMSOM_f.py +++ b/blocks/Xcos/blocks/NRMSOM_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def NRMSOM_f(outroot, attribid, ordering, geometry, parameters): + +def NRMSOM_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'NRMSOM_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'junk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/OUTIMPL_f.py b/blocks/Xcos/blocks/OUTIMPL_f.py index 4f7ffeb7..84567c73 100644 --- a/blocks/Xcos/blocks/OUTIMPL_f.py +++ b/blocks/Xcos/blocks/OUTIMPL_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def OUTIMPL_f(outroot, attribid, ordering, geometry, parameters): + +def OUTIMPL_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'OUTIMPL_f' outnode = addOutNode(outroot, BLOCK_IMPLICIT_OUT, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'outimpl', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/OUT_f.py b/blocks/Xcos/blocks/OUT_f.py index 17e5905d..3c3a7c52 100644 --- a/blocks/Xcos/blocks/OUT_f.py +++ b/blocks/Xcos/blocks/OUT_f.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def OUT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'OUT_f' diff --git a/blocks/Xcos/blocks/OpAmp.py b/blocks/Xcos/blocks/OpAmp.py index 7ee30155..44a81966 100644 --- a/blocks/Xcos/blocks/OpAmp.py +++ b/blocks/Xcos/blocks/OpAmp.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def OpAmp(outroot, attribid, ordering, geometry, parameters): + +def OpAmp(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'OpAmp' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'OpAmp', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/PDE.py b/blocks/Xcos/blocks/PDE.py index a54b56cc..53ba4590 100644 --- a/blocks/Xcos/blocks/PDE.py +++ b/blocks/Xcos/blocks/PDE.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def PDE(outroot, attribid, ordering, geometry, parameters): + +def PDE(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PDE' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cscope', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/PID.py b/blocks/Xcos/blocks/PID.py index a0c1f60d..8bbaa0b1 100644 --- a/blocks/Xcos/blocks/PID.py +++ b/blocks/Xcos/blocks/PID.py @@ -7,11 +7,12 @@ from blocks.OUT_f import OUT_f from blocks.IN_f import IN_f from common.AAAAAA import * -def PID(outroot, attribid, ordering, geometry, parameters): + +def PID(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PID' block_id, port_id, link_id = generate_id(12, 24, 11) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H) diff --git a/blocks/Xcos/blocks/PMOS.py b/blocks/Xcos/blocks/PMOS.py index afbf5923..d96e09a5 100644 --- a/blocks/Xcos/blocks/PMOS.py +++ b/blocks/Xcos/blocks/PMOS.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def PMOS(outroot, attribid, ordering, geometry, parameters): + +def PMOS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PMOS' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'PMOS', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/PNP.py b/blocks/Xcos/blocks/PNP.py index 35def2af..903429ab 100644 --- a/blocks/Xcos/blocks/PNP.py +++ b/blocks/Xcos/blocks/PNP.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def PNP(outroot, attribid, ordering, geometry, parameters): + +def PNP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PNP' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'PNP', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/POSTONEG_f.py b/blocks/Xcos/blocks/POSTONEG_f.py index 45eb1b45..aa2228cd 100644 --- a/blocks/Xcos/blocks/POSTONEG_f.py +++ b/blocks/Xcos/blocks/POSTONEG_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def POSTONEG_f(outroot, attribid, ordering, geometry, parameters): + +def POSTONEG_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'POSTONEG_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'zcross', 'TYPE_1', func_name, BLOCKTYPE_Z, dependsOnU='1') diff --git a/blocks/Xcos/blocks/POWBLK_f.py b/blocks/Xcos/blocks/POWBLK_f.py index 9f1caef7..4b2ee0a2 100644 --- a/blocks/Xcos/blocks/POWBLK_f.py +++ b/blocks/Xcos/blocks/POWBLK_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def POWBLK_f(outroot, attribid, ordering, geometry, parameters): + +def POWBLK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'POWBLK_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'powblk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/PRODUCT.py b/blocks/Xcos/blocks/PRODUCT.py index 4eec6213..53cd8566 100644 --- a/blocks/Xcos/blocks/PRODUCT.py +++ b/blocks/Xcos/blocks/PRODUCT.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def PRODUCT(outroot, attribid, ordering, geometry, parameters): + +def PRODUCT(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PRODUCT' outnode = addOutNode(outroot, BLOCK_PRODUCT, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'product', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/PROD_f.py b/blocks/Xcos/blocks/PROD_f.py index 2120d611..3c142637 100644 --- a/blocks/Xcos/blocks/PROD_f.py +++ b/blocks/Xcos/blocks/PROD_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def PROD_f(outroot, attribid, ordering, geometry, parameters): + +def PROD_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PROD_f' outnode = addOutNode(outroot, BLOCK_ROUND, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'prod', 'TYPE_2', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/PULSE_SC.py b/blocks/Xcos/blocks/PULSE_SC.py index dc3503e4..e4a75079 100644 --- a/blocks/Xcos/blocks/PULSE_SC.py +++ b/blocks/Xcos/blocks/PULSE_SC.py @@ -21,11 +21,11 @@ from common.AAAAAA import * # '5631d1e9:18ea7a6d774:-7fbf'] -def PULSE_SC(outroot, attribid, ordering, geometry, parameters): +def PULSE_SC(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PULSE_SC' block_id, port_id, link_id = generate_id(8, 10, 5) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H) diff --git a/blocks/Xcos/blocks/PerteDP.py b/blocks/Xcos/blocks/PerteDP.py index 34953287..021498f2 100644 --- a/blocks/Xcos/blocks/PerteDP.py +++ b/blocks/Xcos/blocks/PerteDP.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def PerteDP(outroot, attribid, ordering, geometry, parameters): + +def PerteDP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PerteDP' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'PerteDP', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/PotentialSensor.py b/blocks/Xcos/blocks/PotentialSensor.py index f07c249c..2a0f6db2 100644 --- a/blocks/Xcos/blocks/PotentialSensor.py +++ b/blocks/Xcos/blocks/PotentialSensor.py @@ -1,11 +1,12 @@ from common.AAAAAA import * -def PotentialSensor(outroot, attribid, ordering, geometry, parameters): + +def PotentialSensor(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PotentialSensor' parameters = [''] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'PotentialSensor', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/PuitsP.py b/blocks/Xcos/blocks/PuitsP.py index 956d602f..064a0e7b 100644 --- a/blocks/Xcos/blocks/PuitsP.py +++ b/blocks/Xcos/blocks/PuitsP.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def PuitsP(outroot, attribid, ordering, geometry, parameters): + +def PuitsP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'PuitsP' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Puits', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/QUANT_f.py b/blocks/Xcos/blocks/QUANT_f.py index 068f67a6..76d20c9e 100644 --- a/blocks/Xcos/blocks/QUANT_f.py +++ b/blocks/Xcos/blocks/QUANT_f.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def QUANT_f(outroot, attribid, ordering, geometry, parameters): + +def QUANT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'QUANT_f' data_type = ['', 'qzrnd', 'qztrn', 'qzflr', 'qzcel'] @@ -8,7 +9,7 @@ def QUANT_f(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[1])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/RAMP.py b/blocks/Xcos/blocks/RAMP.py index 0efa370b..73371e13 100644 --- a/blocks/Xcos/blocks/RAMP.py +++ b/blocks/Xcos/blocks/RAMP.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def RAMP(outroot, attribid, ordering, geometry, parameters): + +def RAMP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'RAMP' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'ramp', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/RAND_m.py b/blocks/Xcos/blocks/RAND_m.py index 14051c02..68df7e53 100644 --- a/blocks/Xcos/blocks/RAND_m.py +++ b/blocks/Xcos/blocks/RAND_m.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def RAND_m(outroot, attribid, ordering, geometry, parameters): + +def RAND_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'RAND_m' data_type = ['', 'rndblk_m', 'rndblkz_m'] @@ -8,7 +9,7 @@ def RAND_m(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/RATELIMITER.py b/blocks/Xcos/blocks/RATELIMITER.py index 0ef4f9ac..7ef476fe 100644 --- a/blocks/Xcos/blocks/RATELIMITER.py +++ b/blocks/Xcos/blocks/RATELIMITER.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def RATELIMITER(outroot, attribid, ordering, geometry, parameters): + +def RATELIMITER(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'RATELIMITER' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'ratelimiter', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/READAU_f.py b/blocks/Xcos/blocks/READAU_f.py index 54cbccb4..3d3d60c0 100644 --- a/blocks/Xcos/blocks/READAU_f.py +++ b/blocks/Xcos/blocks/READAU_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def READAU_f(outroot, attribid, ordering, geometry, parameters): + +def READAU_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'READAU_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'readau', 'TYPE_2', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/READC_f.py b/blocks/Xcos/blocks/READC_f.py index c3ea4a5c..797cff8f 100644 --- a/blocks/Xcos/blocks/READC_f.py +++ b/blocks/Xcos/blocks/READC_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def READC_f(outroot, attribid, ordering, geometry, parameters): + +def READC_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'READC_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'readc', 'TYPE_2', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/REGISTER.py b/blocks/Xcos/blocks/REGISTER.py index 3efb002b..0de5976b 100644 --- a/blocks/Xcos/blocks/REGISTER.py +++ b/blocks/Xcos/blocks/REGISTER.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def REGISTER(outroot, attribid, ordering, geometry, parameters): + +def REGISTER(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'REGISTER' data_type = ['', '', '', '_i32', '_i16', '_i8', '_ui32', '_ui16', '_ui8'] @@ -13,7 +14,7 @@ def REGISTER(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'delay4' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/REGISTER_f.py b/blocks/Xcos/blocks/REGISTER_f.py index 727fb548..7dc4ea40 100644 --- a/blocks/Xcos/blocks/REGISTER_f.py +++ b/blocks/Xcos/blocks/REGISTER_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def REGISTER_f(outroot, attribid, ordering, geometry, parameters): + +def REGISTER_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'REGISTER_f' outnode = addOutNode(outroot, BLOCK_EXPLICIT_OUT, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'output', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/RELATIONALOP.py b/blocks/Xcos/blocks/RELATIONALOP.py index 2341907d..1f4f3a5c 100644 --- a/blocks/Xcos/blocks/RELATIONALOP.py +++ b/blocks/Xcos/blocks/RELATIONALOP.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def RELATIONALOP(outroot, attribid, ordering, geometry, parameters): + +def RELATIONALOP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'RELATIONALOP' data_type = ['', '', '', '_i32', '_i16', '_i8', '_ui32', '_ui16', '_ui8'] @@ -13,7 +14,7 @@ def RELATIONALOP(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'relational_op' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/RELAY_f.py b/blocks/Xcos/blocks/RELAY_f.py index 26abaa42..b9392073 100644 --- a/blocks/Xcos/blocks/RELAY_f.py +++ b/blocks/Xcos/blocks/RELAY_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def RELAY_f(outroot, attribid, ordering, geometry, parameters): + +def RELAY_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'RELAY_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'relay', 'TYPE_2', func_name, BLOCKTYPE_C, dependsOnU='1', diff --git a/blocks/Xcos/blocks/RFILE_f.py b/blocks/Xcos/blocks/RFILE_f.py index cda6b14c..4fff5458 100644 --- a/blocks/Xcos/blocks/RFILE_f.py +++ b/blocks/Xcos/blocks/RFILE_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def RFILE_f(outroot, attribid, ordering, geometry, parameters): + +def RFILE_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'RFILE_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'readf', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/RICC.py b/blocks/Xcos/blocks/RICC.py index 47250000..587253b2 100644 --- a/blocks/Xcos/blocks/RICC.py +++ b/blocks/Xcos/blocks/RICC.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def RICC(outroot, attribid, ordering, geometry, parameters): + +def RICC(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'RICC' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'ricc_m', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/ROOTCOEF.py b/blocks/Xcos/blocks/ROOTCOEF.py index e741bc72..20bef5c2 100644 --- a/blocks/Xcos/blocks/ROOTCOEF.py +++ b/blocks/Xcos/blocks/ROOTCOEF.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def ROOTCOEF(outroot, attribid, ordering, geometry, parameters): + +def ROOTCOEF(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ROOTCOEF' data_type = ['', 'root_coef', 'rootz_coef'] @@ -8,7 +9,7 @@ def ROOTCOEF(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/Resistor.py b/blocks/Xcos/blocks/Resistor.py index 261a1c58..9baae37e 100644 --- a/blocks/Xcos/blocks/Resistor.py +++ b/blocks/Xcos/blocks/Resistor.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Resistor(outroot, attribid, ordering, geometry, parameters): + +def Resistor(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Resistor' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'resistor', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SAMPHOLD_m.py b/blocks/Xcos/blocks/SAMPHOLD_m.py index 4de7f76a..0b3246e5 100644 --- a/blocks/Xcos/blocks/SAMPHOLD_m.py +++ b/blocks/Xcos/blocks/SAMPHOLD_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SAMPHOLD_m(outroot, attribid, ordering, geometry, parameters): + +def SAMPHOLD_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SAMPHOLD_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'samphold4_m', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SATURATION.py b/blocks/Xcos/blocks/SATURATION.py index bb28e63c..0996b45c 100644 --- a/blocks/Xcos/blocks/SATURATION.py +++ b/blocks/Xcos/blocks/SATURATION.py @@ -3,11 +3,11 @@ from common.AAAAAA import * # block_id = ['4a338342:14e1ed0625e:-7c24#identifier'] -def SATURATION(outroot, attribid, ordering, geometry, parameters): +def SATURATION(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SATURATION' block_id, port_id, link_id = generate_id(1, 0, 0) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'satur', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SAWTOOTH_f.py b/blocks/Xcos/blocks/SAWTOOTH_f.py index 691d6439..6796bd35 100644 --- a/blocks/Xcos/blocks/SAWTOOTH_f.py +++ b/blocks/Xcos/blocks/SAWTOOTH_f.py @@ -1,11 +1,12 @@ from common.AAAAAA import * -def SAWTOOTH_f(outroot, attribid, ordering, geometry, parameters): + +def SAWTOOTH_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SAWTOOTH_f' parameters = [' '] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'sawtth', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/SCALAR2VECTOR.py b/blocks/Xcos/blocks/SCALAR2VECTOR.py index f6d01d3c..e3fb2a1d 100644 --- a/blocks/Xcos/blocks/SCALAR2VECTOR.py +++ b/blocks/Xcos/blocks/SCALAR2VECTOR.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SCALAR2VECTOR(outroot, attribid, ordering, geometry, parameters): + +def SCALAR2VECTOR(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SCALAR2VECTOR' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'scalar2vector', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SELECT_m.py b/blocks/Xcos/blocks/SELECT_m.py index 7236b447..e1006de2 100644 --- a/blocks/Xcos/blocks/SELECT_m.py +++ b/blocks/Xcos/blocks/SELECT_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SELECT_m(outroot, attribid, ordering, geometry, parameters): + +def SELECT_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SELECT_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'selector_m', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SELF_SWITCH.py b/blocks/Xcos/blocks/SELF_SWITCH.py index 66de5384..d8602d3d 100644 --- a/blocks/Xcos/blocks/SELF_SWITCH.py +++ b/blocks/Xcos/blocks/SELF_SWITCH.py @@ -4,7 +4,8 @@ from blocks.CONST_m import CONST_m from blocks.SWITCH_f import SWITCH_f from common.AAAAAA import * -def SELF_SWITCH(outroot, attribid, ordering, geometry, parameters): + +def SELF_SWITCH(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SELF_SWITCH' if parameters[0] == 'on': style = func_name + '_ON' @@ -12,7 +13,7 @@ def SELF_SWITCH(outroot, attribid, ordering, geometry, parameters): style = func_name + '_OFF' block_id, port_id, link_id = generate_id(6, 6, 3) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', style, BLOCKTYPE_H) diff --git a/blocks/Xcos/blocks/SHIFT.py b/blocks/Xcos/blocks/SHIFT.py index 7581dfc4..36378aeb 100644 --- a/blocks/Xcos/blocks/SHIFT.py +++ b/blocks/Xcos/blocks/SHIFT.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def SHIFT(outroot, attribid, ordering, geometry, parameters): + +def SHIFT(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SHIFT' data_type = ['', '', '', @@ -21,7 +22,7 @@ def SHIFT(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'shift_32_LA' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SIGNUM.py b/blocks/Xcos/blocks/SIGNUM.py index 900bc073..d76e7b0e 100644 --- a/blocks/Xcos/blocks/SIGNUM.py +++ b/blocks/Xcos/blocks/SIGNUM.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SIGNUM(outroot, attribid, ordering, geometry, parameters): + +def SIGNUM(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SIGNUM' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'signum', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SINBLK_f.py b/blocks/Xcos/blocks/SINBLK_f.py index 02b739b1..8826d975 100644 --- a/blocks/Xcos/blocks/SINBLK_f.py +++ b/blocks/Xcos/blocks/SINBLK_f.py @@ -1,11 +1,12 @@ from common.AAAAAA import * -def SINBLK_f(outroot, attribid, ordering, geometry, parameters): + +def SINBLK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SINBLK_f' parameters = [' '] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'sinblk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SOM_f.py b/blocks/Xcos/blocks/SOM_f.py index 387a709b..1038b78e 100644 --- a/blocks/Xcos/blocks/SOM_f.py +++ b/blocks/Xcos/blocks/SOM_f.py @@ -1,11 +1,12 @@ from common.AAAAAA import * -def SOM_f(outroot, attribid, ordering, geometry, parameters): + +def SOM_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SOM_f' parameters = ['1', '[1;1;1]'] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'sum', 'TYPE_2', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SPLIT_f.py b/blocks/Xcos/blocks/SPLIT_f.py index 5c3d751d..64d02336 100644 --- a/blocks/Xcos/blocks/SPLIT_f.py +++ b/blocks/Xcos/blocks/SPLIT_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SPLIT_f(outroot, attribid, ordering, geometry, parameters): + +def SPLIT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SPLIT_f' outnode = addOutNode(outroot, BLOCK_SPLIT, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'lsplit', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/SQRT.py b/blocks/Xcos/blocks/SQRT.py index da7bbccf..668988ab 100644 --- a/blocks/Xcos/blocks/SQRT.py +++ b/blocks/Xcos/blocks/SQRT.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def SQRT(outroot, attribid, ordering, geometry, parameters): + +def SQRT(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SQRT' data_type = ['', 'mat_sqrt', 'matz_sqrt'] @@ -8,7 +9,7 @@ def SQRT(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SRFLIPFLOP.py b/blocks/Xcos/blocks/SRFLIPFLOP.py index 702b413b..2aad4e29 100644 --- a/blocks/Xcos/blocks/SRFLIPFLOP.py +++ b/blocks/Xcos/blocks/SRFLIPFLOP.py @@ -5,11 +5,12 @@ from blocks.OUT_f import OUT_f from blocks.IN_f import IN_f from common.AAAAAA import * -def SRFLIPFLOP(outroot, attribid, ordering, geometry, parameters): + +def SRFLIPFLOP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SRFLIPFLOP' block_id, port_id, link_id = generate_id(9, 15, 7) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H, dependsOnU='1') diff --git a/blocks/Xcos/blocks/STEP.py b/blocks/Xcos/blocks/STEP.py index e5ee2acf..8a77e1d5 100644 --- a/blocks/Xcos/blocks/STEP.py +++ b/blocks/Xcos/blocks/STEP.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def STEP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'STEP' diff --git a/blocks/Xcos/blocks/STEP_FUNCTION.py b/blocks/Xcos/blocks/STEP_FUNCTION.py index 6991f52f..5666b685 100644 --- a/blocks/Xcos/blocks/STEP_FUNCTION.py +++ b/blocks/Xcos/blocks/STEP_FUNCTION.py @@ -16,11 +16,11 @@ from common.AAAAAA import * # '-6f1a4b5d:18f04c0dca9:-7fea', '-6f1a4b5d:18f04c0dca9:-7fe9'] -def STEP_FUNCTION(outroot, attribid, ordering, geometry, parameters): +def STEP_FUNCTION(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'STEP_FUNCTION' block_id, port_id, link_id = generate_id(9, 8, 4) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='0', dependsOnT='0') diff --git a/blocks/Xcos/blocks/SUBMAT.py b/blocks/Xcos/blocks/SUBMAT.py index 662670f9..fb8635b5 100644 --- a/blocks/Xcos/blocks/SUBMAT.py +++ b/blocks/Xcos/blocks/SUBMAT.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def SUBMAT(outroot, attribid, ordering, geometry, parameters): + +def SUBMAT(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SUBMAT' data_type = ['', 'submat', 'submatz'] @@ -8,7 +9,7 @@ def SUBMAT(outroot, attribid, ordering, geometry, parameters): simulation_func_name = data_type[int(parameters[0])] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SUMMATION.py b/blocks/Xcos/blocks/SUMMATION.py index 04d36618..fcf2002b 100644 --- a/blocks/Xcos/blocks/SUMMATION.py +++ b/blocks/Xcos/blocks/SUMMATION.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def SUMMATION(outroot, attribid, ordering, geometry, parameters): + +def SUMMATION(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SUMMATION' data_type = ['', '', '_z', '_i32', '_i16', '_i8', '_ui32', '_ui16', '_ui8'] @@ -15,7 +16,7 @@ def SUMMATION(outroot, attribid, ordering, geometry, parameters): simulation_func_name = 'summation' + data_type[para1] + overflow[para3] outnode = addOutNode(outroot, BLOCK_SUMMATION, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SUM_f.py b/blocks/Xcos/blocks/SUM_f.py index 64230dc7..014df8a6 100644 --- a/blocks/Xcos/blocks/SUM_f.py +++ b/blocks/Xcos/blocks/SUM_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SUM_f(outroot, attribid, ordering, geometry, parameters): + +def SUM_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SUM_f' outnode = addOutNode(outroot, BLOCK_ROUND, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'plusblk', 'TYPE_2', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SUPER_f.py b/blocks/Xcos/blocks/SUPER_f.py index f29902ff..ad162c6d 100644 --- a/blocks/Xcos/blocks/SUPER_f.py +++ b/blocks/Xcos/blocks/SUPER_f.py @@ -6,11 +6,11 @@ from common.AAAAAA import * # '-64ce6d85:145ef6f2b4f:-7f54'] -def SUPER_f(outroot, attribid, ordering, geometry, parameters): +def SUPER_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SUPER_f' block_id, port_id, link_id = generate_id(3, 0, 0) outnode = addOutNode(outroot, BLOCK_SUPER, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cscope', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/SWITCH2_m.py b/blocks/Xcos/blocks/SWITCH2_m.py index 78da12a4..b87483ff 100644 --- a/blocks/Xcos/blocks/SWITCH2_m.py +++ b/blocks/Xcos/blocks/SWITCH2_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SWITCH2_m(outroot, attribid, ordering, geometry, parameters): + +def SWITCH2_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SWITCH2_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'switch2_m', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SWITCH_f.py b/blocks/Xcos/blocks/SWITCH_f.py index e7b3248f..7f97dd9d 100644 --- a/blocks/Xcos/blocks/SWITCH_f.py +++ b/blocks/Xcos/blocks/SWITCH_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SWITCH_f(outroot, attribid, ordering, geometry, parameters): + +def SWITCH_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SWITCH_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'switchn', 'TYPE_2', func_name, BLOCKTYPE_C, dependsOnU='1', diff --git a/blocks/Xcos/blocks/SampleCLK.py b/blocks/Xcos/blocks/SampleCLK.py index c1706990..9fc393a8 100644 --- a/blocks/Xcos/blocks/SampleCLK.py +++ b/blocks/Xcos/blocks/SampleCLK.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SampleCLK(outroot, attribid, ordering, geometry, parameters): + +def SampleCLK(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SampleCLK' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'sampleclk', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/Sigbuilder.py b/blocks/Xcos/blocks/Sigbuilder.py index 879936e1..6f7a0abe 100644 --- a/blocks/Xcos/blocks/Sigbuilder.py +++ b/blocks/Xcos/blocks/Sigbuilder.py @@ -17,11 +17,11 @@ from common.AAAAAA import * # ] -def Sigbuilder(outroot, attribid, ordering, geometry, parameters): +def Sigbuilder(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Sigbuilder' block_id, port_id, link_id = generate_id(6, 8, 4) outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_H, dependsOnU="0", dependsOnT="0") diff --git a/blocks/Xcos/blocks/SineVoltage.py b/blocks/Xcos/blocks/SineVoltage.py index 2df6dc22..3753930a 100644 --- a/blocks/Xcos/blocks/SineVoltage.py +++ b/blocks/Xcos/blocks/SineVoltage.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SineVoltage(outroot, attribid, ordering, geometry, parameters): + +def SineVoltage(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SineVoltage' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'SineVoltage', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SourceP.py b/blocks/Xcos/blocks/SourceP.py index 3572d478..9bd2bdc8 100644 --- a/blocks/Xcos/blocks/SourceP.py +++ b/blocks/Xcos/blocks/SourceP.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def SourceP(outroot, attribid, ordering, geometry, parameters): + +def SourceP(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'SourceP' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Source', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/SplitBlock.py b/blocks/Xcos/blocks/SplitBlock.py index 53df94b6..aea0bda5 100644 --- a/blocks/Xcos/blocks/SplitBlock.py +++ b/blocks/Xcos/blocks/SplitBlock.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def SplitBlock(outroot, attribid, ordering, geometry, parent=1): func_name = 'CLKSPLIT_f' outnode = addOutNode(outroot, BLOCK_SPLIT, diff --git a/blocks/Xcos/blocks/Switch.py b/blocks/Xcos/blocks/Switch.py index 10fbda37..75f0a719 100644 --- a/blocks/Xcos/blocks/Switch.py +++ b/blocks/Xcos/blocks/Switch.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def Switch(outroot, attribid, ordering, geometry, parameters): + +def Switch(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'Switch' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'Switch', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/TANBLK_f.py b/blocks/Xcos/blocks/TANBLK_f.py index 9ce12297..da3fd611 100644 --- a/blocks/Xcos/blocks/TANBLK_f.py +++ b/blocks/Xcos/blocks/TANBLK_f.py @@ -1,11 +1,12 @@ from common.AAAAAA import * -def TANBLK_f(outroot, attribid, ordering, geometry, parameters): + +def TANBLK_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TANBLK_f' parameters = ['-1'] outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'tanblk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/TCLSS.py b/blocks/Xcos/blocks/TCLSS.py index 7de7c97b..e8bb3b49 100644 --- a/blocks/Xcos/blocks/TCLSS.py +++ b/blocks/Xcos/blocks/TCLSS.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def TCLSS(outroot, attribid, ordering, geometry, parameters): + +def TCLSS(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TCLSS' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'tcslti4', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/TEXT_f.py b/blocks/Xcos/blocks/TEXT_f.py index e4b375c0..92b25842 100644 --- a/blocks/Xcos/blocks/TEXT_f.py +++ b/blocks/Xcos/blocks/TEXT_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def TEXT_f(outroot, attribid, ordering, geometry, parameters): + +def TEXT_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TEXT_f' outnode = addOutNode(outroot, BLOCK_TEXT, - attribid, ordering, 1, + attribid, ordering, parent, func_name, None, None, func_name, None, value=parameters[0]) diff --git a/blocks/Xcos/blocks/TIME_DELAY.py b/blocks/Xcos/blocks/TIME_DELAY.py index 3bb850f8..438c5f3c 100644 --- a/blocks/Xcos/blocks/TIME_DELAY.py +++ b/blocks/Xcos/blocks/TIME_DELAY.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def TIME_DELAY(outroot, attribid, ordering, geometry, parameters): + +def TIME_DELAY(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TIME_DELAY' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'time_delay', 'C_OR_FORTRAN', func_name, BLOCKTYPE_X, dependsOnT='1') diff --git a/blocks/Xcos/blocks/TIME_f.py b/blocks/Xcos/blocks/TIME_f.py index c6c4f8d0..8c003127 100644 --- a/blocks/Xcos/blocks/TIME_f.py +++ b/blocks/Xcos/blocks/TIME_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def TIME_f(outroot, attribid, ordering, geometry, parameters): + +def TIME_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TIME_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'timblk', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnT='1') diff --git a/blocks/Xcos/blocks/TKSCALE.py b/blocks/Xcos/blocks/TKSCALE.py index d353e414..ba1fcded 100644 --- a/blocks/Xcos/blocks/TKSCALE.py +++ b/blocks/Xcos/blocks/TKSCALE.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def TKSCALE(outroot, attribid, ordering, geometry, parameters): + +def TKSCALE(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TKSCALE' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'tkscaleblk', 'SCILAB', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/TOWS_c.py b/blocks/Xcos/blocks/TOWS_c.py index e542c426..1d7e3a22 100644 --- a/blocks/Xcos/blocks/TOWS_c.py +++ b/blocks/Xcos/blocks/TOWS_c.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def TOWS_c(outroot, attribid, ordering, geometry, parameters): + +def TOWS_c(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TOWS_c' para3 = int(parameters[2]) @@ -11,7 +12,7 @@ def TOWS_c(outroot, attribid, ordering, geometry, parameters): b_type = BLOCKTYPE_D outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'tows_c', 'C_OR_FORTRAN', func_name, b_type) diff --git a/blocks/Xcos/blocks/TRASH_f.py b/blocks/Xcos/blocks/TRASH_f.py index 020eb6d7..24c423af 100644 --- a/blocks/Xcos/blocks/TRASH_f.py +++ b/blocks/Xcos/blocks/TRASH_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def TRASH_f(outroot, attribid, ordering, geometry, parameters): + +def TRASH_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TRASH_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'trash', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/TrigFun.py b/blocks/Xcos/blocks/TrigFun.py index 62c2aceb..4e78b478 100644 --- a/blocks/Xcos/blocks/TrigFun.py +++ b/blocks/Xcos/blocks/TrigFun.py @@ -1,12 +1,13 @@ from common.AAAAAA import * -def TrigFun(outroot, attribid, ordering, geometry, parameters): + +def TrigFun(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'TrigFun' simulation_func_name = str(parameters[0]) + '_blk' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, simulation_func_name, 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/VARIABLE_DELAY.py b/blocks/Xcos/blocks/VARIABLE_DELAY.py index f291b8de..310e6d4d 100644 --- a/blocks/Xcos/blocks/VARIABLE_DELAY.py +++ b/blocks/Xcos/blocks/VARIABLE_DELAY.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def VARIABLE_DELAY(outroot, attribid, ordering, geometry, parameters): + +def VARIABLE_DELAY(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'VARIABLE_DELAY' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'variable_delay', 'C_OR_FORTRAN', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/VVsourceAC.py b/blocks/Xcos/blocks/VVsourceAC.py index b7c683bc..601ec838 100644 --- a/blocks/Xcos/blocks/VVsourceAC.py +++ b/blocks/Xcos/blocks/VVsourceAC.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def VVsourceAC(outroot, attribid, ordering, geometry, parameters): + +def VVsourceAC(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'VVsourceAC' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'VVsourceAC', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/VanneReglante.py b/blocks/Xcos/blocks/VanneReglante.py index 162d1dea..c1c3a25e 100644 --- a/blocks/Xcos/blocks/VanneReglante.py +++ b/blocks/Xcos/blocks/VanneReglante.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def VanneReglante(outroot, attribid, ordering, geometry, parameters): + +def VanneReglante(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'VanneReglante' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'VanneReglante', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/VariableResistor.py b/blocks/Xcos/blocks/VariableResistor.py index 25633d8b..e6d06790 100644 --- a/blocks/Xcos/blocks/VariableResistor.py +++ b/blocks/Xcos/blocks/VariableResistor.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def VariableResistor(outroot, attribid, ordering, geometry, parameters): + +def VariableResistor(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'VariableResistor' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'VariableResistor', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/VirtualCLK0.py b/blocks/Xcos/blocks/VirtualCLK0.py index 499ff2c2..3f0ab6d7 100644 --- a/blocks/Xcos/blocks/VirtualCLK0.py +++ b/blocks/Xcos/blocks/VirtualCLK0.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def VirtualCLK0(outroot, attribid, ordering, geometry, parameters): + +def VirtualCLK0(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'VirtualCLK0' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'vrtclk0', 'DEFAULT', func_name, BLOCKTYPE_D) diff --git a/blocks/Xcos/blocks/VoltageSensor.py b/blocks/Xcos/blocks/VoltageSensor.py index e9329685..81151a48 100644 --- a/blocks/Xcos/blocks/VoltageSensor.py +++ b/blocks/Xcos/blocks/VoltageSensor.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def VoltageSensor(outroot, attribid, ordering, geometry, parameters): + +def VoltageSensor(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'VoltageSensor' outnode = addOutNode(outroot, BLOCK_VOLTAGESENSOR, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'VoltageSensor', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/VsourceAC.py b/blocks/Xcos/blocks/VsourceAC.py index afe9ebab..92b59f5a 100644 --- a/blocks/Xcos/blocks/VsourceAC.py +++ b/blocks/Xcos/blocks/VsourceAC.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def VsourceAC(outroot, attribid, ordering, geometry, parameters): + +def VsourceAC(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'VsourceAC' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'VsourceAC', 'DEFAULT', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/WRITEAU_f.py b/blocks/Xcos/blocks/WRITEAU_f.py index 9106023b..6fb7cfd7 100644 --- a/blocks/Xcos/blocks/WRITEAU_f.py +++ b/blocks/Xcos/blocks/WRITEAU_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def WRITEAU_f(outroot, attribid, ordering, geometry, parameters): + +def WRITEAU_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'WRITEAU_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'writeau', 'TYPE_2', func_name, BLOCKTYPE_D, dependsOnU='1') diff --git a/blocks/Xcos/blocks/WRITEC_f.py b/blocks/Xcos/blocks/WRITEC_f.py index d71fe687..d46b5abc 100644 --- a/blocks/Xcos/blocks/WRITEC_f.py +++ b/blocks/Xcos/blocks/WRITEC_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def WRITEC_f(outroot, attribid, ordering, geometry, parameters): + +def WRITEC_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'WRITEC_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'writec', 'TYPE_2', func_name, BLOCKTYPE_D, dependsOnU='1') diff --git a/blocks/Xcos/blocks/ZCROSS_f.py b/blocks/Xcos/blocks/ZCROSS_f.py index 9daef9e0..98a6b8ac 100644 --- a/blocks/Xcos/blocks/ZCROSS_f.py +++ b/blocks/Xcos/blocks/ZCROSS_f.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def ZCROSS_f(outroot, attribid, ordering, geometry, parameters): + +def ZCROSS_f(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'ZCROSS_f' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'zcross', 'TYPE_1', func_name, BLOCKTYPE_Z, dependsOnU='1') diff --git a/blocks/Xcos/blocks/c_block.py b/blocks/Xcos/blocks/c_block.py index 5f283020..98c46c98 100644 --- a/blocks/Xcos/blocks/c_block.py +++ b/blocks/Xcos/blocks/c_block.py @@ -1,13 +1,14 @@ from common.AAAAAA import * -def c_block(outroot, attribid, ordering, geometry, parameters): + +def c_block(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'c_block' code = parameters[3] codeLines = code.split('\n') outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, parameters[3], 'DYNAMIC_C_1', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/fortran_block.py b/blocks/Xcos/blocks/fortran_block.py index 3dbbf6bc..f8d25d78 100644 --- a/blocks/Xcos/blocks/fortran_block.py +++ b/blocks/Xcos/blocks/fortran_block.py @@ -1,13 +1,14 @@ from common.AAAAAA import * -def fortran_block(outroot, attribid, ordering, geometry, parameters): + +def fortran_block(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'fortran_block' code = parameters[3] codeLines = code.split('\n') outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, parameters[3], 'DYNAMIC_FORTRAN_1', func_name, BLOCKTYPE_C, dependsOnU='1') diff --git a/blocks/Xcos/blocks/freq_div.py b/blocks/Xcos/blocks/freq_div.py index 4c511e6a..134e1a34 100644 --- a/blocks/Xcos/blocks/freq_div.py +++ b/blocks/Xcos/blocks/freq_div.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def freq_div(outroot, attribid, ordering, geometry, parameters): + +def freq_div(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'freq_div' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'csuper', 'DEFAULT', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/blocks/generic_block3.py b/blocks/Xcos/blocks/generic_block3.py index b3fb4aa2..a0cfc151 100644 --- a/blocks/Xcos/blocks/generic_block3.py +++ b/blocks/Xcos/blocks/generic_block3.py @@ -1,6 +1,7 @@ from common.AAAAAA import * -def generic_block3(outroot, attribid, ordering, geometry, parameters): + +def generic_block3(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'generic_block3' if parameters[17] == 'y': @@ -14,7 +15,7 @@ def generic_block3(outroot, attribid, ordering, geometry, parameters): depends_t = '0' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, parameters[0], 'C_OR_FORTRAN', func_name, BLOCKTYPE_C, dependsOnU=depends_u, diff --git a/blocks/Xcos/blocks/scifunc_block_m.py b/blocks/Xcos/blocks/scifunc_block_m.py index a4ff0468..ce216724 100644 --- a/blocks/Xcos/blocks/scifunc_block_m.py +++ b/blocks/Xcos/blocks/scifunc_block_m.py @@ -1,10 +1,11 @@ from common.AAAAAA import * -def scifunc_block_m(outroot, attribid, ordering, geometry, parameters): + +def scifunc_block_m(outroot, attribid, ordering, geometry, parameters, parent=1): func_name = 'scifunc_block_m' outnode = addOutNode(outroot, BLOCK_BASIC, - attribid, ordering, 1, + attribid, ordering, parent, func_name, 'cscope', 'C_OR_FORTRAN', func_name, BLOCKTYPE_C) diff --git a/blocks/Xcos/links/CommandControlLink.py b/blocks/Xcos/links/CommandControlLink.py index 71c3fad2..92a30bec 100644 --- a/blocks/Xcos/links/CommandControlLink.py +++ b/blocks/Xcos/links/CommandControlLink.py @@ -1,15 +1,20 @@ from common.AAAAAA import * -def CommandControlLink(outroot, attribid, sourceVertex, targetVertex): + +def CommandControlLink(outroot, attribid, sourceVertex, targetVertex, waypoints, parent=1): func_name = 'CommandControlLink' outnode = addNode(outroot, func_name, **{'id': attribid}, - parent=1, source=sourceVertex, target=targetVertex, + parent=parent, source=sourceVertex, target=targetVertex, style=func_name, value='') mxGeoNode = addNode(outnode, 'mxGeometry', **{'as': 'geometry'}) addNode(mxGeoNode, 'mxPoint', **{'as': 'sourcePoint', 'x': "0.0", 'y': "0.0"}) - addNode(mxGeoNode, 'Array', **{'as': 'points'}) + arrayNode = addNode(mxGeoNode, 'Array', **{'as': 'points'}) + + for point in waypoints: + addNode(arrayNode, 'mxPoint', **{'x': point['x'], 'y': point['y']}) + addNode(mxGeoNode, 'mxPoint', **{'as': 'targetPoint', 'x': "0.0", 'y': "0.0"}) return outnode diff --git a/blocks/Xcos/links/ExplicitLink.py b/blocks/Xcos/links/ExplicitLink.py index aec37268..a9a468c7 100644 --- a/blocks/Xcos/links/ExplicitLink.py +++ b/blocks/Xcos/links/ExplicitLink.py @@ -1,15 +1,15 @@ from common.AAAAAA import * -def ExplicitLink(outroot, attribid, sourceVertex, targetVertex, waypoints): + +def ExplicitLink(outroot, attribid, sourceVertex, targetVertex, waypoints, parent=1): func_name = 'ExplicitLink' outnode = addNode(outroot, func_name, **{'id': attribid}, - parent=1, source=sourceVertex, target=targetVertex, + parent=parent, source=sourceVertex, target=targetVertex, style=func_name, value='') mxGeoNode = addNode(outnode, 'mxGeometry', **{'as': 'geometry'}) addNode(mxGeoNode, 'mxPoint', **{'as': 'sourcePoint', 'x': "0.0", 'y': "0.0"}) - arrayNode = addNode(mxGeoNode, 'Array', **{'as': 'points'}) for point in waypoints: diff --git a/blocks/Xcos/links/ImplicitLink.py b/blocks/Xcos/links/ImplicitLink.py index 867c56e4..0629ee34 100644 --- a/blocks/Xcos/links/ImplicitLink.py +++ b/blocks/Xcos/links/ImplicitLink.py @@ -1,14 +1,20 @@ from common.AAAAAA import * -def ImplicitLink(outroot, attribid, sourceVertex, targetVertex): + +def ImplicitLink(outroot, attribid, sourceVertex, targetVertex, waypoints, parent=1): func_name = 'ImplicitLink' outnode = addNode(outroot, func_name, **{'id': attribid}, - parent=1, source=sourceVertex, target=targetVertex, + parent=parent, source=sourceVertex, target=targetVertex, style=func_name, value='') mxGeoNode = addNode(outnode, 'mxGeometry', **{'as': 'geometry'}) addNode(mxGeoNode, 'mxPoint', **{'as': 'sourcePoint', 'x': "0.0", 'y': "0.0"}) + arrayNode = addNode(mxGeoNode, 'Array', **{'as': 'points'}) + + for point in waypoints: + addNode(arrayNode, 'mxPoint', **{'x': point['x'], 'y': point['y']}) + addNode(mxGeoNode, 'mxPoint', **{'as': 'targetPoint', 'x': "0.0", 'y': "0.0"}) return outnode diff --git a/blocks/Xcos/ports/CommandPort.py b/blocks/Xcos/ports/CommandPort.py index 7155f3b7..882277b9 100644 --- a/blocks/Xcos/ports/CommandPort.py +++ b/blocks/Xcos/ports/CommandPort.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def CommandPort(outroot, attribid, parentattribid, ordering, geometry, value='', forSplitBlock=False): func_name = 'CommandPort' diff --git a/blocks/Xcos/ports/ControlPort.py b/blocks/Xcos/ports/ControlPort.py index cf09d8cf..474bbe4a 100644 --- a/blocks/Xcos/ports/ControlPort.py +++ b/blocks/Xcos/ports/ControlPort.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def ControlPort(outroot, attribid, parentattribid, ordering, geometry, value='', forSplitBlock=False): func_name = 'ControlPort' diff --git a/blocks/Xcos/ports/ExplicitInputPort.py b/blocks/Xcos/ports/ExplicitInputPort.py index 3db9ca20..40dc2d78 100644 --- a/blocks/Xcos/ports/ExplicitInputPort.py +++ b/blocks/Xcos/ports/ExplicitInputPort.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def ExplicitInputPort(outroot, attribid, parentattribid, ordering, geometry, addDataLines=False, value='', forSplitBlock=False): func_name = 'ExplicitInputPort' diff --git a/blocks/Xcos/ports/ExplicitOutputPort.py b/blocks/Xcos/ports/ExplicitOutputPort.py index f9a3bed0..27214f3b 100644 --- a/blocks/Xcos/ports/ExplicitOutputPort.py +++ b/blocks/Xcos/ports/ExplicitOutputPort.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def ExplicitOutputPort(outroot, attribid, parentattribid, ordering, geometry, addDataLines=False, value='', forSplitBlock=False): func_name = 'ExplicitOutputPort' diff --git a/blocks/Xcos/ports/ImplicitInputPort.py b/blocks/Xcos/ports/ImplicitInputPort.py index fae1f19d..d40c10f3 100644 --- a/blocks/Xcos/ports/ImplicitInputPort.py +++ b/blocks/Xcos/ports/ImplicitInputPort.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def ImplicitInputPort(outroot, attribid, parentattribid, ordering, geometry, addDataLines=False, value='', forSplitBlock=False): func_name = 'ImplicitInputPort' diff --git a/blocks/Xcos/ports/ImplicitOutputPort.py b/blocks/Xcos/ports/ImplicitOutputPort.py index 14a394d5..0f3d83e6 100644 --- a/blocks/Xcos/ports/ImplicitOutputPort.py +++ b/blocks/Xcos/ports/ImplicitOutputPort.py @@ -1,5 +1,6 @@ from common.AAAAAA import * + def ImplicitOutputPort(outroot, attribid, parentattribid, ordering, geometry, addDataLines=False, value='', forSplitBlock=False): func_name = 'ImplicitOutputPort' |