Update Xcos Toolbox Skeleton : 18/10018/2
Bruno JOFRET [Thu, 13 Dec 2012 08:40:01 +0000 (09:40 +0100)]
- Clean Interface functions: remove deprecated jobs
- Add Scilab simulation function and associated block
- Fill missing demo with example

Change-Id: I8c7e2611a565149e4c77b305f19b30ba2e00ebe8

21 files changed:
scilab/contrib/Makefile.am
scilab/contrib/Makefile.in
scilab/contrib/toolbox_skeleton.iss
scilab/contrib/xcos_toolbox_skeleton/demos/allSum.dem.sce [new file with mode: 0644]
scilab/contrib/xcos_toolbox_skeleton/demos/xcos_toolbox_skeleton.dem.gateway.sce
scilab/contrib/xcos_toolbox_skeleton/etc/xcos_toolbox_skeleton.start
scilab/contrib/xcos_toolbox_skeleton/examples/AllSum.zcos [new file with mode: 0644]
scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_MUT_STYLE.gif
scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_SUM_c.gif
scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_SUM_sci.gif [new file with mode: 0644]
scilab/contrib/xcos_toolbox_skeleton/images/svg/TBX_MUT_STYLE.svg
scilab/contrib/xcos_toolbox_skeleton/images/svg/TBX_SUM_c.svg
scilab/contrib/xcos_toolbox_skeleton/images/svg/TBX_SUM_sci.svg [new file with mode: 0644]
scilab/contrib/xcos_toolbox_skeleton/macros/TBX_MUT_STYLE.sci
scilab/contrib/xcos_toolbox_skeleton/macros/TBX_SUM_c.sci
scilab/contrib/xcos_toolbox_skeleton/macros/TBX_SUM_sci.sci [new file with mode: 0644]
scilab/contrib/xcos_toolbox_skeleton/macros/TBX_SUM_sim.sci [new file with mode: 0644]
scilab/contrib/xcos_toolbox_skeleton/macros/buildmacros.sce
scilab/modules/modules_manager/tests/unit_tests/xcos_toolbox_skeleton.macosx.dia.ref
scilab/modules/modules_manager/tests/unit_tests/xcos_toolbox_skeleton.unix.dia.ref
scilab/modules/modules_manager/tests/unit_tests/xcos_toolbox_skeleton.win.dia.ref

index 3fe4387..3bd296b 100644 (file)
@@ -66,10 +66,12 @@ xcos_toolbox_skeleton/builder.sce \
 xcos_toolbox_skeleton/changelog.txt \
 xcos_toolbox_skeleton/cleaner.sce \
 xcos_toolbox_skeleton/demos/xcos_toolbox_skeleton.dem.gateway.sce \
+xcos_toolbox_skeleton/demos/allSum.dem.sce \
 xcos_toolbox_skeleton/DESCRIPTION \
 xcos_toolbox_skeleton/DESCRIPTION-FUNCTIONS \
 xcos_toolbox_skeleton/etc/xcos_toolbox_skeleton.quit \
 xcos_toolbox_skeleton/etc/xcos_toolbox_skeleton.start \
+xcos_toolbox_skeleton/examples/AllSum.zcos \
 xcos_toolbox_skeleton/help/builder_help.sce \
 xcos_toolbox_skeleton/help/cleaner_help.sce \
 xcos_toolbox_skeleton/help/en_US/build_help.sce \
@@ -78,13 +80,17 @@ xcos_toolbox_skeleton/help/en_US/tbx_sum.xml \
 xcos_toolbox_skeleton/help/fr_FR/build_help.sce \
 xcos_toolbox_skeleton/images/gif/TBX_MUT_STYLE.gif \
 xcos_toolbox_skeleton/images/gif/TBX_SUM_c.gif \
+xcos_toolbox_skeleton/images/gif/TBX_SUM_sci.gif \
 xcos_toolbox_skeleton/images/svg/TBX_MUT_STYLE.svg \
 xcos_toolbox_skeleton/images/svg/TBX_SUM_c.svg \
+xcos_toolbox_skeleton/images/svg/TBX_SUM_sci.svg \
 xcos_toolbox_skeleton/license.txt \
 xcos_toolbox_skeleton/macros/buildmacros.sce \
 xcos_toolbox_skeleton/macros/cleanmacros.sce \
 xcos_toolbox_skeleton/macros/TBX_MUT_STYLE.sci \
 xcos_toolbox_skeleton/macros/TBX_SUM_c.sci \
+xcos_toolbox_skeleton/macros/TBX_SUM_sci.sci \
+xcos_toolbox_skeleton/macros/TBX_SUM_sim.sci \
 xcos_toolbox_skeleton/sci_gateway/builder_gateway.sce \
 xcos_toolbox_skeleton/sci_gateway/c/builder_gateway_c.sce \
 xcos_toolbox_skeleton/sci_gateway/c/sci_tbx_sum.c \
index a2a13ab..c243275 100644 (file)
@@ -404,10 +404,12 @@ xcos_toolbox_skeleton/builder.sce \
 xcos_toolbox_skeleton/changelog.txt \
 xcos_toolbox_skeleton/cleaner.sce \
 xcos_toolbox_skeleton/demos/xcos_toolbox_skeleton.dem.gateway.sce \
+xcos_toolbox_skeleton/demos/allSum.dem.sce \
 xcos_toolbox_skeleton/DESCRIPTION \
 xcos_toolbox_skeleton/DESCRIPTION-FUNCTIONS \
 xcos_toolbox_skeleton/etc/xcos_toolbox_skeleton.quit \
 xcos_toolbox_skeleton/etc/xcos_toolbox_skeleton.start \
+xcos_toolbox_skeleton/examples/AllSum.zcos \
 xcos_toolbox_skeleton/help/builder_help.sce \
 xcos_toolbox_skeleton/help/cleaner_help.sce \
 xcos_toolbox_skeleton/help/en_US/build_help.sce \
@@ -416,13 +418,17 @@ xcos_toolbox_skeleton/help/en_US/tbx_sum.xml \
 xcos_toolbox_skeleton/help/fr_FR/build_help.sce \
 xcos_toolbox_skeleton/images/gif/TBX_MUT_STYLE.gif \
 xcos_toolbox_skeleton/images/gif/TBX_SUM_c.gif \
+xcos_toolbox_skeleton/images/gif/TBX_SUM_sci.gif \
 xcos_toolbox_skeleton/images/svg/TBX_MUT_STYLE.svg \
 xcos_toolbox_skeleton/images/svg/TBX_SUM_c.svg \
+xcos_toolbox_skeleton/images/svg/TBX_SUM_sci.svg \
 xcos_toolbox_skeleton/license.txt \
 xcos_toolbox_skeleton/macros/buildmacros.sce \
 xcos_toolbox_skeleton/macros/cleanmacros.sce \
 xcos_toolbox_skeleton/macros/TBX_MUT_STYLE.sci \
 xcos_toolbox_skeleton/macros/TBX_SUM_c.sci \
+xcos_toolbox_skeleton/macros/TBX_SUM_sci.sci \
+xcos_toolbox_skeleton/macros/TBX_SUM_sim.sci \
 xcos_toolbox_skeleton/sci_gateway/builder_gateway.sce \
 xcos_toolbox_skeleton/sci_gateway/c/builder_gateway_c.sce \
 xcos_toolbox_skeleton/sci_gateway/c/sci_tbx_sum.c \
index 222bcb5..9d93763 100644 (file)
@@ -57,9 +57,10 @@ Source: contrib\{#XCOS_TOOLBOX_SKELETON}\DESCRIPTION-FUNCTIONS; DestDir: {app}\c
 Source: contrib\{#XCOS_TOOLBOX_SKELETON}\license.txt; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
 Source: contrib\{#XCOS_TOOLBOX_SKELETON}\builder.sce; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
 Source: contrib\{#XCOS_TOOLBOX_SKELETON}\changelog.txt; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
-Source: contrib\{#XCOS_TOOLBOX_SKELETON}\demos\{#XCOS_TOOLBOX_SKELETON}.dem.gateway.sce; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}\demos; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
+Source: contrib\{#XCOS_TOOLBOX_SKELETON}\demos\*.*; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}\demos; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
 Source: contrib\{#XCOS_TOOLBOX_SKELETON}\etc\{#XCOS_TOOLBOX_SKELETON}.quit; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}\etc; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
 Source: contrib\{#XCOS_TOOLBOX_SKELETON}\etc\{#XCOS_TOOLBOX_SKELETON}.start; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}\etc; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
+Source: contrib\{#XCOS_TOOLBOX_SKELETON}\examples\*.*; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}\examples; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
 Source: contrib\{#XCOS_TOOLBOX_SKELETON}\help\builder_help.sce; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}\help; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
 Source: contrib\{#XCOS_TOOLBOX_SKELETON}\help\en_US\*.xml; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}\help\en_US; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
 Source: contrib\{#XCOS_TOOLBOX_SKELETON}\help\en_US\build_help.sce; DestDir: {app}\contrib\{#XCOS_TOOLBOX_SKELETON}\help\en_US; Flags: recursesubdirs; Components: {#COMPN_TOOLBOX_SKELETON} and {#COMPN_XCOS}
diff --git a/scilab/contrib/xcos_toolbox_skeleton/demos/allSum.dem.sce b/scilab/contrib/xcos_toolbox_skeleton/demos/allSum.dem.sce
new file mode 100644 (file)
index 0000000..9cc9803
--- /dev/null
@@ -0,0 +1,5 @@
+//
+// This file is released under the 3-clause BSD license. See COPYING-BSD.
+
+demopath = get_absolute_file_path("allSum.dem.sce");
+xcos(demopath+filesep()+".."+filesep()+"examples"+filesep()+"AllSum.zcos")
\ No newline at end of file
index 5d5e57a..921443b 100644 (file)
@@ -4,9 +4,9 @@
 function subdemolist = demo_gateway()
 
   demopath = get_absolute_file_path("xcos_toolbox_skeleton.dem.gateway.sce");
-  subdemolist = []; // add demos here
+  subdemolist = ["All Sum functions overview", "allSum.dem.sce"]; // add demos here
   subdemolist(:,2) = demopath + subdemolist(:,2);
+
 endfunction
 
 subdemolist = demo_gateway();
index d30e955..9ac4b01 100644 (file)
@@ -17,7 +17,7 @@ function xcos_skeletonlib = startModule()
     // and xcos features required
     error(gettext('Scilab 5.3.2 or more is required.'));
   end
-// =============================================================================  
+// =============================================================================
 // force to load some libraries (dependancies)
   loadScicos();
 // =============================================================================
@@ -36,12 +36,12 @@ function xcos_skeletonlib = startModule()
   mprintf("\tLoad palette\n");
   pal = xcosPal("Xcos toolbox blocks");
 
-  blocks = ["TBX_SUM_c" "TBX_MUT_STYLE"];
+  blocks = ["TBX_SUM_c" "TBX_MUT_STYLE" "TBX_SUM_sci"];
   for i=1:size(blocks, "*")
     h5  = ls(root_tlbx + "/images/h5/"  + blocks(i) + "." + ["sod" "h5"]);
     gif = ls(root_tlbx + "/images/gif/" + blocks(i) + "." + ["png" "jpg" "gif"]);
     svg = ls(root_tlbx + "/images/svg/" + blocks(i) + "." + ["png" "jpg" "gif" "svg"]);
-    
+
     pal = xcosPalAddBlock(pal, h5(1), gif(1), svg(1));
   end
 
diff --git a/scilab/contrib/xcos_toolbox_skeleton/examples/AllSum.zcos b/scilab/contrib/xcos_toolbox_skeleton/examples/AllSum.zcos
new file mode 100644 (file)
index 0000000..15ad066
Binary files /dev/null and b/scilab/contrib/xcos_toolbox_skeleton/examples/AllSum.zcos differ
index 31885bd..21c7959 100644 (file)
Binary files a/scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_MUT_STYLE.gif and b/scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_MUT_STYLE.gif differ
index 31885bd..959469d 100644 (file)
Binary files a/scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_SUM_c.gif and b/scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_SUM_c.gif differ
diff --git a/scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_SUM_sci.gif b/scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_SUM_sci.gif
new file mode 100644 (file)
index 0000000..83a4ed8
Binary files /dev/null and b/scilab/contrib/xcos_toolbox_skeleton/images/gif/TBX_SUM_sci.gif differ
index ae264a0..e55da82 100644 (file)
@@ -1,52 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
           'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
-<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; stroke:black; text-rendering:auto; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:&apos;Dialog&apos;; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" width="40" height="40" xmlns="http://www.w3.org/2000/svg"
+<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; stroke:black; text-rendering:auto; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:&apos;Dialog&apos;; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" width="610" height="460" xmlns="http://www.w3.org/2000/svg"
 ><!--Generated by Scilab with Batik SVG Generator--><defs id="genericDefs"
   /><g
-  ><g style="fill:white; text-rendering:geometricPrecision; shape-rendering:crispEdges; stroke:white;"
-    ><rect x="0" width="40" height="40" y="0" style="stroke:none;"
-      /><path style="stroke:none;" d="M39.6 0.4 L39.6 39.6 L0.4 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 0.4 L39.6 39.6 L0.4 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 39.6 L0.4 39.6 L0.4 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 39.6 L0.4 39.6 L0.4 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 0.4 L39.6 0.4 L39.6 39.6 Z"
-      /><path style="stroke:none;" d="M39.6 0.4 L39.6 39.6 L39.6 39.6 Z"
-      /><path style="stroke:none;" d="M0.4 0.4 L0.4 0.4 L0.4 39.6 Z"
-      /><path style="stroke:none;" d="M0.4 0.4 L0.4 39.6 L0.4 39.6 Z"
-      /><path style="stroke:none;" d="M39.6 0.4 L0.4 0.4 L39.6 0.4 Z"
-      /><path style="stroke:none;" d="M0.4 0.4 L0.4 0.4 L39.6 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 39.6 L0.4 39.6 L39.6 39.6 Z"
-      /><path style="stroke:none;" d="M0.4 39.6 L0.4 39.6 L39.6 39.6 Z"
-    /></g
-    ><g style="fill:white; text-rendering:geometricPrecision; shape-rendering:crispEdges; stroke:white;"
-    ><path style="stroke:none;" d="M0.4 39.6 L39.6 39.6 L39.6 0.4 Z"
-      /><path d="M0.4 39.6 L39.6 39.6" style="fill:none; stroke:black;"
-      /><path d="M39.6 39.6 L39.6 0.4" style="fill:none; stroke:black;"
-      /><path style="stroke:none;" d="M0.4 39.6 L39.6 0.4 L0.4 0.4 Z"
-      /><path d="M39.6 0.4 L0.4 0.4" style="fill:none; stroke:black;"
-      /><path d="M0.4 0.4 L0.4 39.6" style="fill:none; stroke:black;"
-      /><path d="M39.6 76 L207.6 20 L39.6 -36 Z" style="fill:black; stroke:none;"
-      /><path d="M39.6 76 L207.6 20" style="fill:none; stroke:black;"
-      /><path d="M207.6 20 L39.6 -36" style="fill:none; stroke:black;"
-      /><path d="M39.6 -36 L39.6 76" style="fill:none; stroke:black;"
-      /><path d="M-167.6 64.24 L0.4 8.24 L-167.6 -47.76 Z" style="fill:black; stroke:none;"
-      /><path d="M-167.6 64.24 L0.4 8.24" style="fill:none; stroke:black;"
-      /><path d="M0.4 8.24 L-167.6 -47.76" style="fill:none; stroke:black;"
-      /><path d="M-167.6 -47.76 L-167.6 64.24" style="fill:none; stroke:black;"
-      /><path d="M-167.6 72.08 L0.4 16.08 L-167.6 -39.92 Z" style="fill:black; stroke:none;"
-      /><path d="M-167.6 72.08 L0.4 16.08" style="fill:none; stroke:black;"
-      /><path d="M0.4 16.08 L-167.6 -39.92" style="fill:none; stroke:black;"
-      /><path d="M-167.6 -39.92 L-167.6 72.08" style="fill:none; stroke:black;"
-      /><path d="M-167.6 79.92 L0.4 23.92 L-167.6 -32.08 Z" style="fill:black; stroke:none;"
-      /><path d="M-167.6 79.92 L0.4 23.92" style="fill:none; stroke:black;"
-      /><path d="M0.4 23.92 L-167.6 -32.08" style="fill:none; stroke:black;"
-      /><path d="M-167.6 -32.08 L-167.6 79.92" style="fill:none; stroke:black;"
-      /><path d="M-167.6 87.76 L0.4 31.76 L-167.6 -24.24 Z" style="fill:black; stroke:none;"
-      /><path d="M-167.6 87.76 L0.4 31.76" style="fill:none; stroke:black;"
-      /><path d="M0.4 31.76 L-167.6 -24.24" style="fill:none; stroke:black;"
-      /><path d="M-167.6 -24.24 L-167.6 87.76" style="fill:none; stroke:black;"
-      /><path d="M2 2.125 L8.1719 2.125 L8.1719 2.9688 L5.5781 2.9688 L5.5781 9.4219 L4.5938 9.4219 L4.5938 2.9688 L2 2.9688 L2 2.125 ZM9 5.9375 L9 8.6094 L10.5781 8.6094 Q11.375 8.6094 11.7578 8.2812 Q12.1406 7.9531 12.1406 7.2656 Q12.1406 6.5938 11.7578 6.2656 Q11.375 5.9375 10.5781 5.9375 L9 5.9375 ZM9 2.9375 L9 5.1406 L10.4531 5.1406 Q11.1875 5.1406 11.5391 4.8672 Q11.8906 4.5938 11.8906 4.0469 Q11.8906 3.4844 11.5391 3.2109 Q11.1875 2.9375 10.4531 2.9375 L9 2.9375 ZM8.0156 2.125 L10.5312 2.125 Q11.6562 2.125 12.2656 2.5938 Q12.875 3.0625 12.875 3.9375 Q12.875 4.6094 12.5625 5 Q12.25 5.3906 11.6562 5.4844 Q12.375 5.6406 12.7812 6.1406 Q13.1875 6.6406 13.1875 7.375 Q13.1875 8.3594 12.5234 8.8906 Q11.8594 9.4219 10.625 9.4219 L8.0156 9.4219 L8.0156 2.125 ZM14.6562 2.125 L15.7188 2.125 L17.5312 4.8438 L19.3594 2.125 L20.4062 2.125 L18.0625 5.625 L20.5625 9.4219 L19.5156 9.4219 L17.4531 6.3281 L15.3906 9.4219 L14.3281 9.4219 L16.9375 5.5312 L14.6562 2.125 ZM25.125 11.0781 L25.125 11.7812 L19.9375 11.7812 L19.9375 11.0781 L25.125 11.0781 ZM30.3906 2.375 L30.3906 3.3281 Q29.8281 3.0625 29.3281 2.9297 Q28.8281 2.7969 28.3594 2.7969 Q27.5625 2.7969 27.125 3.1094 Q26.6875 3.4219 26.6875 4 Q26.6875 4.4844 26.9766 4.7344 Q27.2656 4.9844 28.0781 5.125 L28.6719 5.25 Q29.7656 5.4688 30.2969 5.9922 Q30.8281 6.5156 30.8281 7.4062 Q30.8281 8.4688 30.1172 9.0156 Q29.4062 9.5625 28.0312 9.5625 Q27.5156 9.5625 26.9297 9.4453 Q26.3438 9.3281 25.7188 9.0938 L25.7188 8.0781 Q26.3281 8.4219 26.8984 8.5938 Q27.4688 8.7656 28.0312 8.7656 Q28.875 8.7656 29.3359 8.4297 Q29.7969 8.0938 29.7969 7.4844 Q29.7969 6.9531 29.4688 6.6484 Q29.1406 6.3438 28.375 6.1875 L27.7812 6.0781 Q26.6719 5.8594 26.1797 5.3906 Q25.6875 4.9219 25.6875 4.0781 Q25.6875 3.1094 26.3672 2.5547 Q27.0469 2 28.25 2 Q28.7656 2 29.2969 2.0938 Q29.8281 2.1875 30.3906 2.375 ZM32.9062 2.125 L33.8906 2.125 L33.8906 6.5625 Q33.8906 7.7344 34.3125 8.25 Q34.7344 8.7656 35.6875 8.7656 Q36.6406 8.7656 37.0625 8.25 Q37.4844 7.7344 37.4844 6.5625 L37.4844 2.125 L38.4844 2.125 L38.4844 6.6875 Q38.4844 8.1094 37.7812 8.8359 Q37.0781 9.5625 35.6875 9.5625 Q34.3125 9.5625 33.6094 8.8359 Q32.9062 8.1094 32.9062 6.6875 L32.9062 2.125 ZM41.0156 2.125 L42.4844 2.125 L44.3438 7.0938 L46.2188 2.125 L47.6875 2.125 L47.6875 9.4219 L46.7188 9.4219 L46.7188 3.0156 L44.8438 8.0156 L43.8438 8.0156 L41.9688 3.0156 L41.9688 9.4219 L41.0156 9.4219 L41.0156 2.125 ZM54.125 11.0781 L54.125 11.7812 L48.9375 11.7812 L48.9375 11.0781 L54.125 11.0781 ZM58.9062 4.1562 L58.9062 5 Q58.5312 4.7969 58.1484 4.6875 Q57.7656 4.5781 57.375 4.5781 Q56.5 4.5781 56.0156 5.1328 Q55.5312 5.6875 55.5312 6.6875 Q55.5312 7.6875 56.0156 8.2422 Q56.5 8.7969 57.375 8.7969 Q57.7656 8.7969 58.1484 8.6953 Q58.5312 8.5938 58.9062 8.375 L58.9062 9.2188 Q58.5312 9.3906 58.1328 9.4766 Q57.7344 9.5625 57.2812 9.5625 Q56.0312 9.5625 55.3047 8.7891 Q54.5781 8.0156 54.5781 6.6875 Q54.5781 5.3594 55.3125 4.5938 Q56.0469 3.8281 57.3281 3.8281 Q57.75 3.8281 58.1406 3.9062 Q58.5312 3.9844 58.9062 4.1562 Z" style="fill:black; text-rendering:optimizeSpeed; stroke:none;" transform="translate(-10.5,13)"
+  ><g style="fill:white; text-rendering:optimizeLegibility; stroke:white;"
+    ><rect x="0" width="610" height="460" y="0" style="stroke:none;"
     /></g
   ></g
 ></svg
index 6b0a23a..e55da82 100644 (file)
@@ -1,44 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
           'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
-<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; stroke:black; text-rendering:auto; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:&apos;Dialog&apos;; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" width="40" height="40" xmlns="http://www.w3.org/2000/svg"
+<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; stroke:black; text-rendering:auto; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:&apos;Dialog&apos;; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" width="610" height="460" xmlns="http://www.w3.org/2000/svg"
 ><!--Generated by Scilab with Batik SVG Generator--><defs id="genericDefs"
   /><g
-  ><g style="fill:white; text-rendering:geometricPrecision; shape-rendering:crispEdges; stroke:white;"
-    ><rect x="0" width="40" height="40" y="0" style="stroke:none;"
-      /><path style="stroke:none;" d="M39.6 0.4 L39.6 39.6 L0.4 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 0.4 L39.6 39.6 L0.4 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 39.6 L0.4 39.6 L0.4 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 39.6 L0.4 39.6 L0.4 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 0.4 L39.6 0.4 L39.6 39.6 Z"
-      /><path style="stroke:none;" d="M39.6 0.4 L39.6 39.6 L39.6 39.6 Z"
-      /><path style="stroke:none;" d="M0.4 0.4 L0.4 0.4 L0.4 39.6 Z"
-      /><path style="stroke:none;" d="M0.4 0.4 L0.4 39.6 L0.4 39.6 Z"
-      /><path style="stroke:none;" d="M39.6 0.4 L0.4 0.4 L39.6 0.4 Z"
-      /><path style="stroke:none;" d="M0.4 0.4 L0.4 0.4 L39.6 0.4 Z"
-      /><path style="stroke:none;" d="M39.6 39.6 L0.4 39.6 L39.6 39.6 Z"
-      /><path style="stroke:none;" d="M0.4 39.6 L0.4 39.6 L39.6 39.6 Z"
-    /></g
-    ><g style="fill:white; text-rendering:geometricPrecision; shape-rendering:crispEdges; stroke:white;"
-    ><path style="stroke:none;" d="M0.4 39.6 L39.6 39.6 L39.6 0.4 Z"
-      /><path d="M0.4 39.6 L39.6 39.6" style="fill:none; stroke:black;"
-      /><path d="M39.6 39.6 L39.6 0.4" style="fill:none; stroke:black;"
-      /><path style="stroke:none;" d="M0.4 39.6 L39.6 0.4 L0.4 0.4 Z"
-      /><path d="M39.6 0.4 L0.4 0.4" style="fill:none; stroke:black;"
-      /><path d="M0.4 0.4 L0.4 39.6" style="fill:none; stroke:black;"
-      /><path d="M39.6 76 L207.6 20 L39.6 -36 Z" style="fill:black; stroke:none;"
-      /><path d="M39.6 76 L207.6 20" style="fill:none; stroke:black;"
-      /><path d="M207.6 20 L39.6 -36" style="fill:none; stroke:black;"
-      /><path d="M39.6 -36 L39.6 76" style="fill:none; stroke:black;"
-      /><path d="M-167.6 69.4667 L0.4 13.4667 L-167.6 -42.5333 Z" style="fill:black; stroke:none;"
-      /><path d="M-167.6 69.4667 L0.4 13.4667" style="fill:none; stroke:black;"
-      /><path d="M0.4 13.4667 L-167.6 -42.5333" style="fill:none; stroke:black;"
-      /><path d="M-167.6 -42.5333 L-167.6 69.4667" style="fill:none; stroke:black;"
-      /><path d="M-167.6 82.5333 L0.4 26.5333 L-167.6 -29.4667 Z" style="fill:black; stroke:none;"
-      /><path d="M-167.6 82.5333 L0.4 26.5333" style="fill:none; stroke:black;"
-      /><path d="M0.4 26.5333 L-167.6 -29.4667" style="fill:none; stroke:black;"
-      /><path d="M-167.6 -29.4667 L-167.6 82.5333" style="fill:none; stroke:black;"
-      /><path d="M2 2.125 L8.1719 2.125 L8.1719 2.9688 L5.5781 2.9688 L5.5781 9.4219 L4.5938 9.4219 L4.5938 2.9688 L2 2.9688 L2 2.125 ZM9 5.9375 L9 8.6094 L10.5781 8.6094 Q11.375 8.6094 11.7578 8.2812 Q12.1406 7.9531 12.1406 7.2656 Q12.1406 6.5938 11.7578 6.2656 Q11.375 5.9375 10.5781 5.9375 L9 5.9375 ZM9 2.9375 L9 5.1406 L10.4531 5.1406 Q11.1875 5.1406 11.5391 4.8672 Q11.8906 4.5938 11.8906 4.0469 Q11.8906 3.4844 11.5391 3.2109 Q11.1875 2.9375 10.4531 2.9375 L9 2.9375 ZM8.0156 2.125 L10.5312 2.125 Q11.6562 2.125 12.2656 2.5938 Q12.875 3.0625 12.875 3.9375 Q12.875 4.6094 12.5625 5 Q12.25 5.3906 11.6562 5.4844 Q12.375 5.6406 12.7812 6.1406 Q13.1875 6.6406 13.1875 7.375 Q13.1875 8.3594 12.5234 8.8906 Q11.8594 9.4219 10.625 9.4219 L8.0156 9.4219 L8.0156 2.125 ZM14.6562 2.125 L15.7188 2.125 L17.5312 4.8438 L19.3594 2.125 L20.4062 2.125 L18.0625 5.625 L20.5625 9.4219 L19.5156 9.4219 L17.4531 6.3281 L15.3906 9.4219 L14.3281 9.4219 L16.9375 5.5312 L14.6562 2.125 ZM25.125 11.0781 L25.125 11.7812 L19.9375 11.7812 L19.9375 11.0781 L25.125 11.0781 ZM30.3906 2.375 L30.3906 3.3281 Q29.8281 3.0625 29.3281 2.9297 Q28.8281 2.7969 28.3594 2.7969 Q27.5625 2.7969 27.125 3.1094 Q26.6875 3.4219 26.6875 4 Q26.6875 4.4844 26.9766 4.7344 Q27.2656 4.9844 28.0781 5.125 L28.6719 5.25 Q29.7656 5.4688 30.2969 5.9922 Q30.8281 6.5156 30.8281 7.4062 Q30.8281 8.4688 30.1172 9.0156 Q29.4062 9.5625 28.0312 9.5625 Q27.5156 9.5625 26.9297 9.4453 Q26.3438 9.3281 25.7188 9.0938 L25.7188 8.0781 Q26.3281 8.4219 26.8984 8.5938 Q27.4688 8.7656 28.0312 8.7656 Q28.875 8.7656 29.3359 8.4297 Q29.7969 8.0938 29.7969 7.4844 Q29.7969 6.9531 29.4688 6.6484 Q29.1406 6.3438 28.375 6.1875 L27.7812 6.0781 Q26.6719 5.8594 26.1797 5.3906 Q25.6875 4.9219 25.6875 4.0781 Q25.6875 3.1094 26.3672 2.5547 Q27.0469 2 28.25 2 Q28.7656 2 29.2969 2.0938 Q29.8281 2.1875 30.3906 2.375 ZM32.9062 2.125 L33.8906 2.125 L33.8906 6.5625 Q33.8906 7.7344 34.3125 8.25 Q34.7344 8.7656 35.6875 8.7656 Q36.6406 8.7656 37.0625 8.25 Q37.4844 7.7344 37.4844 6.5625 L37.4844 2.125 L38.4844 2.125 L38.4844 6.6875 Q38.4844 8.1094 37.7812 8.8359 Q37.0781 9.5625 35.6875 9.5625 Q34.3125 9.5625 33.6094 8.8359 Q32.9062 8.1094 32.9062 6.6875 L32.9062 2.125 ZM41.0156 2.125 L42.4844 2.125 L44.3438 7.0938 L46.2188 2.125 L47.6875 2.125 L47.6875 9.4219 L46.7188 9.4219 L46.7188 3.0156 L44.8438 8.0156 L43.8438 8.0156 L41.9688 3.0156 L41.9688 9.4219 L41.0156 9.4219 L41.0156 2.125 ZM54.125 11.0781 L54.125 11.7812 L48.9375 11.7812 L48.9375 11.0781 L54.125 11.0781 ZM58.9062 4.1562 L58.9062 5 Q58.5312 4.7969 58.1484 4.6875 Q57.7656 4.5781 57.375 4.5781 Q56.5 4.5781 56.0156 5.1328 Q55.5312 5.6875 55.5312 6.6875 Q55.5312 7.6875 56.0156 8.2422 Q56.5 8.7969 57.375 8.7969 Q57.7656 8.7969 58.1484 8.6953 Q58.5312 8.5938 58.9062 8.375 L58.9062 9.2188 Q58.5312 9.3906 58.1328 9.4766 Q57.7344 9.5625 57.2812 9.5625 Q56.0312 9.5625 55.3047 8.7891 Q54.5781 8.0156 54.5781 6.6875 Q54.5781 5.3594 55.3125 4.5938 Q56.0469 3.8281 57.3281 3.8281 Q57.75 3.8281 58.1406 3.9062 Q58.5312 3.9844 58.9062 4.1562 Z" style="fill:black; text-rendering:optimizeSpeed; stroke:none;" transform="translate(-10.5,13)"
+  ><g style="fill:white; text-rendering:optimizeLegibility; stroke:white;"
+    ><rect x="0" width="610" height="460" y="0" style="stroke:none;"
     /></g
   ></g
 ></svg
diff --git a/scilab/contrib/xcos_toolbox_skeleton/images/svg/TBX_SUM_sci.svg b/scilab/contrib/xcos_toolbox_skeleton/images/svg/TBX_SUM_sci.svg
new file mode 100644 (file)
index 0000000..e55da82
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN'
+          'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
+<svg xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-opacity:1; color-rendering:auto; color-interpolation:auto; stroke:black; text-rendering:auto; stroke-linecap:square; stroke-miterlimit:10; stroke-opacity:1; shape-rendering:auto; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:&apos;Dialog&apos;; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;" width="610" height="460" xmlns="http://www.w3.org/2000/svg"
+><!--Generated by Scilab with Batik SVG Generator--><defs id="genericDefs"
+  /><g
+  ><g style="fill:white; text-rendering:optimizeLegibility; stroke:white;"
+    ><rect x="0" width="610" height="460" y="0" style="stroke:none;"
+    /></g
+  ></g
+></svg
+>
index 2375a99..b7a937e 100644 (file)
@@ -6,18 +6,10 @@
 function [x,y,typ]=TBX_MUT_STYLE(job,arg1,arg2)
   x=[];y=[];typ=[]
   select job
-   case 'plot' then
-    standard_draw(arg1)
-   case 'getinputs' then
-    [x,y,typ]=standard_inputs(arg1)
-   case 'getoutputs' then
-    [x,y,typ]=standard_outputs(arg1)
-   case 'getorigin' then
-    [x,y]=standard_origin(arg1)
    case 'set' then
     x=arg1;
     model = x.model;
-    graphics = x.graphics;    
+    graphics = x.graphics;
 
     // no parameters yet, just change the style of the block and the ports
     hexa = [string(1:9) "A" "B" "C" "D" "E" "F"];
@@ -43,15 +35,14 @@ function [x,y,typ]=TBX_MUT_STYLE(job,arg1,arg2)
     // one output with a single "double" element
     model.out=1
     model.outtyp=1
-    
+
     model.blocktype='c'
     model.dep_ut=[%f %f]
 
     exprs=string([]);
-    gr_i=['txt=[''TBX_SUM_c''];';
-          'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
-
-    x=standard_define([2 2],model,exprs,gr_i)
+    gr_i=[]
+    x=standard_define([2 2],model,exprs,gr_i);
+    x.graphics.style="BIGSOM_f";
   end
 endfunction
 
index d20a137..80b9a9d 100644 (file)
@@ -6,14 +6,6 @@
 function [x,y,typ]=TBX_SUM_c(job,arg1,arg2)
   x=[];y=[];typ=[]
   select job
-   case 'plot' then
-    standard_draw(arg1)
-   case 'getinputs' then
-    [x,y,typ]=standard_inputs(arg1)
-   case 'getoutputs' then
-    [x,y,typ]=standard_outputs(arg1)
-   case 'getorigin' then
-    [x,y]=standard_origin(arg1)
    case 'set' then
     x=arg1;
     // no parameters yet
@@ -26,15 +18,15 @@ function [x,y,typ]=TBX_SUM_c(job,arg1,arg2)
     // one output with a single "double" element
     model.out=1
     model.outtyp=1
-    
+
     model.blocktype='c'
     model.dep_ut=[%f %f]
 
     exprs=string([]);
-    gr_i=['txt=[''TBX_SUM_c''];';
-          'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
+    gr_i=[]
 
-    x=standard_define([2 2],model,exprs,gr_i)
+    x=standard_define([4 4],model,exprs,gr_i)
+    x.graphics.style="blockWithLabel;displayedLabel=TBX_SUM_c"
   end
 endfunction
 
diff --git a/scilab/contrib/xcos_toolbox_skeleton/macros/TBX_SUM_sci.sci b/scilab/contrib/xcos_toolbox_skeleton/macros/TBX_SUM_sci.sci
new file mode 100644 (file)
index 0000000..3c013c4
--- /dev/null
@@ -0,0 +1,31 @@
+//
+// This file is part of the Xcos skeleton toolbox
+//
+// see license.txt for more licensing information
+
+function [x,y,typ]=TBX_SUM_sci(job,arg1,arg2)
+  x=[];y=[];typ=[]
+  select job
+   case 'set' then
+    x=arg1;
+    // no parameters yet
+   case 'define' then
+    model=scicos_model()
+    model.sim=list('TBX_SUM_sim',5)
+    // one inputs with a variable size "double" element
+    model.in=[-1]
+    model.intyp=[1]
+    // one output with a single "double" element
+    model.out=1
+    model.outtyp=1
+
+    model.blocktype='c'
+    model.dep_ut=[%t %f]
+
+    exprs=string([]);
+    gr_i=[]
+    x=standard_define([4 4],model,exprs,gr_i)
+    x.graphics.style=["blockWithLabel;displayedLabel=TBX_SUM_sci"]
+  end
+endfunction
+
diff --git a/scilab/contrib/xcos_toolbox_skeleton/macros/TBX_SUM_sim.sci b/scilab/contrib/xcos_toolbox_skeleton/macros/TBX_SUM_sim.sci
new file mode 100644 (file)
index 0000000..c5922a1
--- /dev/null
@@ -0,0 +1,49 @@
+//
+// This file is part of the Xcos skeleton toolbox
+//
+// see license.txt for more licensing information
+
+
+function block=TBX_SUM_sim(block,flag)
+    function verboseMessage(debugMessage)
+        disp("[verboseMessage] time = "+string(scicos_time())+"] {"+block.label+"} SUM Simulation: "+debugMessage);
+    endfunction
+    
+    select flag
+     case -5 // Error
+      verboseMessage("Calling with flag Error(-5)")
+
+     case 0 // Derivative State Update
+      verboseMessage("Calling with flag DerivativeStare(0)")
+
+     case 1 // Output Update
+      verboseMessage("Calling with flag OutputUpdate(1)")
+      outptr = block.outptr;
+      inptr = block.inptr;
+      outptr(1) = sum(inptr(1));
+      block.outptr = outptr;
+
+
+     case 2 // State Update
+      verboseMessage("Calling with flag StateUpdate(2)")
+
+     case 3 // OutputEventTiming
+      verboseMessage("Calling with flag OutputEventTiming(3)")
+
+     case 4 // Initialization
+      verboseMessage("Calling with flag Initialization(4)")
+
+     case 5 // Ending
+      verboseMessage("Calling with flag Ending(5)")
+
+     case 6 // Re-Initialisation
+      verboseMessage("Calling with flag ReInitialization(6)")
+
+     case 9 // ZeroCrossing
+      verboseMessage("Calling with flag ZeroCrossing(9)")
+
+    else // Unknown flag
+      verboseMessage("Calling with unknonw flag("+string(flag)+")")
+
+    end
+endfunction
index 660dbac..c8f079f 100644 (file)
@@ -3,7 +3,7 @@
 function buildmacros()
   macros_path = get_absolute_file_path("buildmacros.sce");
   tbx_build_macros(TOOLBOX_NAME, macros_path);
-  blocks = ["TBX_SUM_c" "TBX_MUT_STYLE"];
+  blocks = ["TBX_SUM_c" "TBX_MUT_STYLE", "TBX_SUM_sci"];
   tbx_build_blocks(toolbox_dir, blocks);
 endfunction
 
index 05e4e43..3449782 100644 (file)
@@ -16,8 +16,10 @@ assert_checkequal(status, 1);
 exec("TMPDIR/xcos_toolbox_skeleton/builder.sce");
 Building macros...
 -- Creation of [xcos_toolbox_skeletonlib] (Macros) --
-genlib: Processing file: TBX_SUM_c.sci
+genlib: Processing file: TBX_SUM_sci.sci
 genlib: Processing file: TBX_MUT_STYLE.sci
+genlib: Processing file: TBX_SUM_c.sci
+genlib: Processing file: TBX_SUM_sim.sci
 genlib: Regenerate names and lib
 Building blocks...
 Building sources...
index 70d42ab..3449782 100644 (file)
@@ -16,8 +16,10 @@ assert_checkequal(status, 1);
 exec("TMPDIR/xcos_toolbox_skeleton/builder.sce");
 Building macros...
 -- Creation of [xcos_toolbox_skeletonlib] (Macros) --
+genlib: Processing file: TBX_SUM_sci.sci
 genlib: Processing file: TBX_MUT_STYLE.sci
 genlib: Processing file: TBX_SUM_c.sci
+genlib: Processing file: TBX_SUM_sim.sci
 genlib: Regenerate names and lib
 Building blocks...
 Building sources...
index 4afe9a9..a0bb21c 100644 (file)
@@ -16,8 +16,10 @@ assert_checkequal(status, 1);
 exec("TMPDIR/xcos_toolbox_skeleton/builder.sce");
 Building macros...
 -- Creation of [xcos_toolbox_skeletonlib] (Macros) --
-genlib: Processing file: TBX_SUM_c.sci
+genlib: Processing file: TBX_SUM_sci.sci
 genlib: Processing file: TBX_MUT_STYLE.sci
+genlib: Processing file: TBX_SUM_c.sci
+genlib: Processing file: TBX_SUM_sim.sci
 genlib: Regenerate names and lib
 Building blocks...
 Building sources...