Xcos MVC: deprecate all Adapters' toString (use overload) 26/15426/8
Paul Bignier [Fri, 24 Oct 2014 15:23:51 +0000 (17:23 +0200)]
 * No overload was defined for Annotations and Links
 * Scicos objects' fields can now be retrieved thanks to "getfield(1, object)"
 * dia.ref has been re-generated accordingly to the changes

Change-Id: I47d12d22fa9f1d8788d9a622c0c8247bd61bbadc

16 files changed:
scilab/modules/data_structures/sci_gateway/cpp/sci_getfield.cpp
scilab/modules/scicos/macros/scicos_scicos/%Block_p.sci
scilab/modules/scicos/macros/scicos_scicos/%Link_p.sci [new file with mode: 0644]
scilab/modules/scicos/macros/scicos_scicos/%Text_p.sci [new file with mode: 0644]
scilab/modules/scicos/macros/scicos_scicos/%graphics_p.sci
scilab/modules/scicos/macros/scicos_scicos/%model_p.sci
scilab/modules/scicos/src/cpp/view_scilab/BaseAdapter.hxx
scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.cpp
scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.hxx
scilab/modules/scicos/tests/unit_tests/model/Annotation.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Block.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Block_copy_list.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Diagram.dia.ref
scilab/modules/scicos/tests/unit_tests/model/Link.dia.ref
scilab/modules/scicos/tests/unit_tests/model/SuperBlock.dia.ref
scilab/modules/string/macros/sci2exp.sci

index ea67e61..61867f6 100644 (file)
 /*--------------------------------------------------------------------------*/
 #include "data_structures_gw.hxx"
 #include "function.hxx"
+#include "double.hxx"
 #include "string.hxx"
 #include "list.hxx"
 #include "mlist.hxx"
 #include "tlist.hxx"
 #include "struct.hxx"
+#include "user.hxx"
 
 extern "C"
 {
@@ -28,6 +30,7 @@ extern "C"
 }
 
 static types::Function::ReturnValue sci_getfieldStruct(types::typed_list &in, int _iRetCount, types::typed_list &out);
+static types::Function::ReturnValue sci_getfieldUserType(types::typed_list &in, int _iRetCount, types::typed_list &out);
 
 /*-----------------------------------------------------------------------------------*/
 types::Function::ReturnValue sci_getfield(types::typed_list &in, int _iRetCount, types::typed_list &out)
@@ -44,6 +47,12 @@ types::Function::ReturnValue sci_getfield(types::typed_list &in, int _iRetCount,
         return sci_getfieldStruct(in, _iRetCount, out);
     }
 
+    //special case for UserType
+    if (in[1]->isUserType())
+    {
+        return sci_getfieldUserType(in, _iRetCount, out);
+    }
+
     types::InternalType* pIndex = in[0];
     if (in[1]->isList() == false && in[1]->isMList() == false && in[1]->isTList() == false)
     {
@@ -156,3 +165,37 @@ static types::Function::ReturnValue sci_getfieldStruct(types::typed_list &in, in
     return types::Function::OK;
 }
 /*-----------------------------------------------------------------------------------*/
+
+static types::Function::ReturnValue sci_getfieldUserType(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+    types::UserType* pUT = in[1]->getAs<types::UserType>();
+
+    if (in[0]->isDouble())
+    {
+        types::Double* pIndex = in[0]->getAs<types::Double>();
+
+        if (pIndex->get(0) == 1)
+        {
+            types::InternalType* properties = pUT->extract(&in);
+
+            if (!properties->isString())
+            {
+                Scierror(999, _("%s: Could not read the argument #%d properties.\n"), "getfield", 2);
+                return types::Function::Error;
+            }
+            out.push_back(properties->getAs<types::String>());
+            return types::Function::OK;
+        }
+        else
+        {
+            Scierror(999, _("%s:  Wrong value for input argument #%d: %d expected.\n"), "getfield", 1, 1);
+            return types::Function::Error;
+        }
+    }
+    else
+    {
+        Scierror(999, _("%s:  Wrong type for input argument #%d: Integer expected.\n"), "getfield", 1);
+        return types::Function::Error;
+    }
+}
+/*-----------------------------------------------------------------------------------*/
index d279b28..ff52f86 100644 (file)
@@ -23,22 +23,23 @@ function %Block_p(block)
     mprintf("GUI     : " + block.gui + "\n")
     mprintf("Graphics: \n")
     txt = graphics2txt(block.graphics);
-    for i = 1:size(txt, 'r')
+    for i = 1:size(txt, "r")
         mprintf("          %s\n", txt(i))
     end
     mprintf("Model   : " + "\n")
     txt = model2txt(block.model);
-    for i = 1:size(txt, 'r')
+    for i = 1:size(txt, "r")
         mprintf("          %s\n", txt(i))
     end
 endfunction
 
 function txt=graphics2txt(graphics)
     fn=getfield(1,graphics)
+
     txt=[]
     for k=2:size(fn,"*")
         txt=[txt
-        sci2exp(graphics(fn(k)),fn(k))]
+        sci2exp(eval("graphics."+fn(k)),fn(k))]
     end
 endfunction
 
@@ -49,13 +50,15 @@ function txt=model2txt(model)
     else
         txt=sim+" type: 0"
     end
+
     fn=getfield(1,model)
+
     for k=3:size(fn,"*")
-        if fn(k)=="rpar" & type(model(fn(k)))==15 then
+        if fn(k)=="rpar" & (typeof(model(fn(k)))=="list" | typeof(model(fn(k)))=="diagram") then
             txt=[txt;fn(k)+" : SuperBlock"];
         else
             txt=[txt
-            sci2exp(model(fn(k)),fn(k))];
+            sci2exp(eval("model."+fn(k)),fn(k))];
         end
     end
 endfunction
diff --git a/scilab/modules/scicos/macros/scicos_scicos/%Link_p.sci b/scilab/modules/scicos/macros/scicos_scicos/%Link_p.sci
new file mode 100644 (file)
index 0000000..25d437e
--- /dev/null
@@ -0,0 +1,39 @@
+//  Scicos
+//
+//  Copyright (C) 2014 - Scilab Enterprises - Paul Bignier
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// See the file ../license.txt
+//
+
+function %Link_p(l)
+
+    mprintf("Link    :\n");
+
+    fn = getfield(1, l);
+
+    for i=1:size(fn,"*")
+        field = string(eval("l."+fn(i)));
+
+        fieldSize = size(field, "*");
+        if fieldSize == 0 then
+            mprintf("          %s: %s\n", fn(i), "[]")
+        else
+            mprintf("          %s: %s\n", fn(i), strcat(field, " "))
+        end
+    end
+
+endfunction
diff --git a/scilab/modules/scicos/macros/scicos_scicos/%Text_p.sci b/scilab/modules/scicos/macros/scicos_scicos/%Text_p.sci
new file mode 100644 (file)
index 0000000..309aefc
--- /dev/null
@@ -0,0 +1,42 @@
+//  Scicos
+//
+//  Copyright (C) 2014 - Scilab Enterprises - Paul Bignier
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// See the file ../license.txt
+//
+
+function %Text_p(annotation)
+
+    mprintf("GUI     : " + annotation.gui + "\n")
+
+    mprintf("Graphics: \n")
+    txt = graphics2txt(annotation.graphics);
+
+    for i = 1:size(txt, "r")
+        mprintf("          %s\n", txt(i))
+    end
+
+endfunction
+
+function txt = graphics2txt(graphics)
+    fn = getfield(1, graphics);
+
+    txt = [];
+    for k=2:size(fn,"*")
+        txt = [txt; sci2exp(graphics(fn(k)), fn(k))];
+    end
+endfunction
index b203596..1f0f1fc 100644 (file)
@@ -20,9 +20,9 @@
 //
 
 function %graphics_p(graphics)
-    fn=getfield(1,graphics)
+    fn = getfield(1, graphics);
 
     for k=2:size(fn,"*")
-        mprintf("%s\n", sci2exp(graphics(fn(k)),fn(k)))
+        mprintf("%s\n", sci2exp(eval("graphics."+fn(k)), fn(k)))
     end
 endfunction
index d99abc3..9401cdf 100644 (file)
@@ -34,9 +34,10 @@ function %model_p(model)
     mprintf("%s\n", txt)
 
     fn=getfield(1,model)
+
     if size(fn, "*") > 4 then // Rule out the Annotations
-        if or(fn == "rpar") && typeof(model("rpar")) == "diagram" then // Do nothing if model("rpar") is already a mlist
-            rpar = diagram2mlist(model("rpar"));
+        if or(fn == "rpar") && typeof(model.rpar) == "diagram" then // Do nothing if model("rpar") is already a mlist
+            rpar = diagram2mlist(model.rpar);
             // Define a new model omitting 'rpar' because writing 'model.rpar=l' triggers cloning.
             newModel = scicos_model( sim=model.sim,in=model.in,in2=model.in2,intyp=model.intyp,out=model.out,out2=model.out2,outtyp=model.outtyp,evtin=model.evtin,evtout=model.evtout,state=model.state,dstate=model.dstate,odstate=model.odstate,ipar=model.ipar,opar=model.opar,blocktype=model.blocktype,firing=model.firing,dep_ut=model.dep_ut,label=model.label,nzcross=model.nzcross,nmode=model.nmode,equations=model.equations,uid=model.uid );
             newModel.rpar = rpar;
@@ -48,7 +49,7 @@ function %model_p(model)
         end
     end
     for k=3:size(fn,"*")
-        mprintf("%s\n", sci2exp(model(fn(k)),fn(k)))
+        mprintf("%s\n", sci2exp(eval("model."+fn(k)),fn(k)))
     end
 endfunction
 
index 7b05411..cadef5c 100644 (file)
@@ -19,6 +19,7 @@
 #include <sstream>
 #include <memory>
 
+#include "double.hxx"
 #include "user.hxx"
 #include "internal.hxx"
 #include "tlist.hxx"
@@ -253,7 +254,6 @@ public:
     virtual std::wstring getShortTypeStr() = 0;
 
 private:
-
     types::InternalType* clone()
     {
         return new Adaptor(*static_cast<Adaptor*>(this));
@@ -303,7 +303,33 @@ private:
         }
         else
         {
-            // TO DO : management other type for arguments like a scalar or matrix of double
+            if ((*_pArgs)[0]->isDouble())
+            {
+                types::Double* index = (*_pArgs)[0]->getAs<types::Double>();
+
+                if (index->get(0) == 1)
+                {
+                    // When _pArgs is '1', return the list of the property names of the Adaptor
+
+                    // Sort the properties before extracting them
+                    typename property<Adaptor>::props_t properties = property<Adaptor>::fields;
+                    std::sort(properties.begin(), properties.end(), property<Adaptor>::original_index_cmp);
+
+                    // Allocate the return
+                    types::String* pOut = new types::String(1, properties.size());
+
+                    int i = 0;
+                    for (typename property<Adaptor>::props_t_it it = properties.begin(); it != properties.end(); ++it, ++i)
+                    {
+                        pOut->set(i, it->name.data());
+                    }
+                    return pOut;
+                }
+            }
+            else
+            {
+                // TO DO : management other type for arguments like a scalar or matrix of double
+            }
         }
 
         return NULL;
@@ -344,12 +370,13 @@ private:
 
     bool hasToString()
     {
-        // allow scilab to call toString of this class
-        return true;
+        // Do not allow scilab to call toString of this class
+        return false;
     }
 
     bool toString(std::wostringstream& ostr)
     {
+        // Deprecated, use the overload instead
         typename property<Adaptor>::props_t properties = property<Adaptor>::fields;
         std::sort(properties.begin(), properties.end(), property<Adaptor>::original_index_cmp);
 
index 3b41839..af342a6 100644 (file)
@@ -39,11 +39,6 @@ const std::wstring orig(L"orig");
 const std::wstring sz(L"sz");
 const std::wstring exprs(L"exprs");
 
-const std::wstring Model(L"model");
-const std::wstring sim(L"sim");
-const std::wstring rpar(L"rpar");
-const std::wstring ipar(L"ipar");
-
 struct graphics
 {
     static types::InternalType* get(const TextAdapter& adaptor, const Controller& controller)
@@ -192,35 +187,6 @@ struct graphics
     }
 };
 
-struct model
-{
-
-    static types::InternalType* get(const TextAdapter& /*adaptor*/, const Controller& /*controller*/)
-    {
-        // Return an empty "model"-typed mlist because this field isn't used.
-        types::MList* o = new types::MList();
-        types::String* MListFields = new types::String(1, 4);
-
-        MListFields->set(0, Model.c_str());
-        MListFields->set(1, sim.c_str());
-        MListFields->set(2, rpar.c_str());
-        MListFields->set(3, ipar.c_str());
-
-        o->set(0, MListFields);
-        // 'sim' field needs to be defined for the console display.
-        o->set(1, types::Double::Empty());
-        o->set(2, types::Double::Empty());
-        o->set(3, types::Double::Empty());
-        return o;
-    }
-
-    static bool set(TextAdapter& /*adaptor*/, types::InternalType* /*v*/, Controller& /*controller*/)
-    {
-        // Everything should be right as the properties mapped using this adapter do not perform anything
-        return true;
-    }
-};
-
 struct dummy_property
 {
 
@@ -248,7 +214,7 @@ TextAdapter::TextAdapter(std::shared_ptr<org_scilab_modules_scicos::model::Annot
     {
         property<TextAdapter>::fields.reserve(4);
         property<TextAdapter>::add_property(Graphics, &graphics::get, &graphics::set);
-        property<TextAdapter>::add_property(Model, &model::get, &model::set);
+        property<TextAdapter>::add_property(L"model", &dummy_property::get, &dummy_property::set);
         property<TextAdapter>::add_property(L"void", &dummy_property::get, &dummy_property::set);
         property<TextAdapter>::add_property(L"gui", &dummy_property::get, &dummy_property::set);
     }
index 63c935d..be90de5 100644 (file)
 #include <string>
 #include <memory>
 
-#include "BaseAdapter.hxx"
+#include "internal.hxx"
 
+#include "utilities.hxx"
+#include "BaseAdapter.hxx"
 #include "model/Annotation.hxx"
 
 namespace org_scilab_modules_scicos
index 4b58d83..017fa39 100644 (file)
@@ -28,6 +28,11 @@ propertyUpdated( 1 , ANNOTATION , DESCRIPTION ) : NO_CHANGES
 propertyUpdated( 1 , ANNOTATION , FONT ) : NO_CHANGES
 propertyUpdated( 1 , ANNOTATION , FONT_SIZE ) : NO_CHANGES
 o  = 
+GUI     : 
+Graphics: 
+          orig = [0,0]
+          sz = [2,1]
+          exprs = ["Text";"2";"1"]
 o.graphics
  ans  =
 orig = [0,0]
@@ -35,9 +40,7 @@ sz = [2,1]
 exprs = ["Text";"2";"1"]
 o.model
  ans  =
- type: 0
-rpar = []
-ipar = []
+    []
 o.void
  ans  =
     []
@@ -60,6 +63,11 @@ propertyUpdated( 2 , ANNOTATION , FONT ) : SUCCESS
 propertyUpdated( 2 , ANNOTATION , FONT_SIZE ) : SUCCESS
 objectDeleted( 1 , ANNOTATION )
 o  = 
+GUI     : 
+Graphics: 
+          orig = [0,0]
+          sz = [3,4]
+          exprs = ["newText";"3";"4"]
 close;
 o.graphics
  ans  =
@@ -68,9 +76,7 @@ sz = [3,4]
 exprs = ["newText";"3";"4"]
 o.model
  ans  =
- type: 0
-rpar = []
-ipar = []
+    []
 o.void
  ans  =
     []
index 9956d14..8f7ba8c 100644 (file)
@@ -55,6 +55,50 @@ propertyUpdated( 1 , BLOCK , NMODE ) : NO_CHANGES
 propertyUpdated( 1 , BLOCK , UID ) : NO_CHANGES
 propertyUpdated( 1 , BLOCK , INTERFACE_FUNCTION ) : SUCCESS
 o  = 
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[1;1]"
+          pin = [0;0]
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [1;1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 o.graphics
  ans  =
 orig = [0,0]
@@ -228,6 +272,50 @@ propertyUpdated( 1 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 4 , PORT )
 objectDeleted( 1 , BLOCK )
 o  = 
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[1;1]"
+          pin = [0;0]
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [1;1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 o.graphics
  ans  =
 orig = [0,0]
@@ -394,6 +482,50 @@ propertyUpdated( 5 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 8 , PORT )
 objectDeleted( 5 , BLOCK )
 o  = 
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[-1;-1]"
+          pin = [0;0]
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [-1;-1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 o.graphics
  ans  =
 orig = [0,0]
@@ -564,6 +696,50 @@ propertyUpdated( 9 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 12 , PORT )
 objectDeleted( 9 , BLOCK )
 o  = 
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[-1;1;1]"
+          pin = [0;0;0]
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E";"E"]
+          out_implicit = "E"
+          in_style = ["";"";""]
+          out_style = ""
+          in_label = ["";"";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1;-1]
+          in2 = [1;1;1]
+          intyp = [1;1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [-1;1;1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 o.graphics
  ans  =
 orig = [0,0]
@@ -670,6 +846,50 @@ propertyUpdated( 13 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 16 , PORT )
 objectDeleted( 13 , BLOCK )
 o  = 
+GUI     : CSCOPE
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = ["1 3 5 7 9 11 13 15";"-1";"[]";"[600;400]";"-15";"15";"30";"20";"0";""]
+          pin = 0
+          pout = []
+          pein = 0
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = "E"
+          out_implicit = []
+          in_style = ""
+          out_style = 
+          in_label = ""
+          out_label = 
+          style = ""
+Model   : 
+          cscope type: 4
+          in = -1
+          in2 = 1
+          intyp = 1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [0;-15;15;30]
+          ipar = [-1;1;20;1;3;5;7;9;11;13;15;-1;-1;600;400]
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 o.graphics
  ans  =
 orig = [0,0]
@@ -827,6 +1047,50 @@ propertyUpdated( 18 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 20 , PORT )
 objectDeleted( 18 , BLOCK )
 o  = 
+GUI     : CSCOPE
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = ["1 3 5 7 9 11 13 15";"-1";"[]";"[600;400]";"-15";"15";"30";"20";"0";""]
+          pin = 0
+          pout = []
+          pein = 0
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = "E"
+          out_implicit = []
+          in_style = ""
+          out_style = 
+          in_label = ""
+          out_label = 
+          style = ""
+Model   : 
+          cscope type: 4
+          in = -1
+          in2 = 1
+          intyp = 1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [0;-15;15;30]
+          ipar = [-1;1;20;1;3;5;7;9;11;13;15;-1;-1;600;400]
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 // Test 'opar' and 'odstate'
 o = LOGIC("define")
 objectCreated( 24 , BLOCK )
@@ -898,6 +1162,50 @@ propertyUpdated( 21 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 23 , PORT )
 objectDeleted( 21 , BLOCK )
 o  = 
+GUI     : LOGIC
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = ["[0;0;0;1]";"0"]
+          pin = [0;0]
+          pout = 0
+          pein = 0
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          logic type: 4
+          in = [1;1]
+          in2 = [1;1]
+          intyp = [5;5]
+          out = 1
+          out2 = 1
+          outtyp = 5
+          evtin = 1
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = []
+          ipar = []
+          opar = list(int8([0;0;0;1]))
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 o.model.opar
  ans  =
        ans(1)
@@ -1078,6 +1386,50 @@ propertyUpdated( 24 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 28 , PORT )
 objectDeleted( 24 , BLOCK )
 o  = 
+GUI     : VsourceAC
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = ["220";"50"]
+          pin = 0
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = "I"
+          out_implicit = "I"
+          in_style = ""
+          out_style = ""
+          in_label = ""
+          out_label = ""
+          style = ""
+Model   : 
+          VsourceAC type: 0
+          in = 1
+          in2 = 1
+          intyp = 1
+          out = 1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [220;50]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = tlist(["modelica","model","inputs","outputs","parameters"],"VsourceAC","p","n",list(["VA";"f"],list(220,50)))
+          uid = ""
 o.model.equations
  ans  =
        ans(1)
@@ -1231,6 +1583,50 @@ propertyUpdated( 29 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 31 , PORT )
 objectDeleted( 29 , BLOCK )
 o  = 
+GUI     : MBLOCK
+Graphics: 
+          orig = [0,0]
+          sz = [3,2]
+          flip = %t
+          theta = 0
+          exprs = tlist(["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],"""u1""","""I""","[""y1"";""y2""]","[""I"";""E""]","[""R"";""L""]",list("0.1","0.0001"),"[0;0]","generic",[])
+          pin = 0
+          pout = [0;0]
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = "I"
+          out_implicit = ["I";"E"]
+          in_style = ""
+          out_style = ["";""]
+          in_label = ""
+          out_label = ["";""]
+          style = ""
+Model   : 
+          generic type: 30004
+          in = 1
+          in2 = 1
+          intyp = 1
+          out = [1;1]
+          out2 = [1;1]
+          outtyp = [1;1]
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [0.1;0.0001]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%f,%t]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = tlist(["modelica","model","inputs","outputs","parameters"],"generic","u1",["y1";"y2"],list(["R";"L"],list(0.1,0.0001)))
+          uid = ""
 o.graphics
  ans  =
 orig = [0,0]
index 60fd017..9036943 100644 (file)
@@ -58,11 +58,99 @@ l = list(Sum);
 // Copy the list content (no duplicate)
 Sum2 = l(1)
 Sum2  = 
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[1;1]"
+          pin = [0;0]
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [1;1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 // The following action should not delete the Block in the model
 clear Sum
 // Sum2's refCount must have been affected by "clear Sum"
 Sum2
 Sum2  = (2)
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[1;1]"
+          pin = [0;0]
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [1;1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 // Delete the original block in the model
 clear
 propertyUpdated( 1 , BLOCK , INPUTS ) : SUCCESS
index 290baa3..fd76d4d 100644 (file)
@@ -17,6 +17,16 @@ propertyUpdated( 1 , DIAGRAM , CONTEXT ) : NO_CHANGES
 propertyUpdated( 1 , DIAGRAM , CHILDREN ) : NO_CHANGES
 propertyUpdated( 1 , DIAGRAM , VERSION_NUMBER ) : NO_CHANGES
 scs_m  = 
+wpar = []
+title = ["Untitled";""]
+tol = [0.000001,0.000001,1.0000D-10,100001,0,1,0]
+tf = 100000
+context = []
+void1 = []
+options = tlist("scsopt")
+void2 = []
+void3 = []
+doc = list()
 scs_m.props
  ans  =
 wpar = []
@@ -237,13 +247,174 @@ propertyUpdated( 15 , LINK , SOURCE_PORT ) : NO_CHANGES
 propertyUpdated( 15 , LINK , DESTINATION_PORT ) : NO_CHANGES
 propertyUpdated( 16 , DIAGRAM , VERSION_NUMBER ) : NO_CHANGES
 scs_m  = 
+wpar = []
+title = ["Untitled";""]
+tol = [0.000001,0.000001,1.0000D-10,100001,0,1,0]
+tf = 100000
+context = []
+void1 = []
+options = tlist("scsopt")
+void2 = []
+void3 = []
+doc = list()
+1     BIGSOM_f
+2     CSCOPE
+3     CSCOPE
 scs_m.objs
  ans  =
        ans(1)
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[1;1]"
+          pin = [0;0]
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [1;1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(2)
+GUI     : CSCOPE
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = ["1 3 5 7 9 11 13 15";"-1";"[]";"[600;400]";"-15";"15";"30";"20";"0";""]
+          pin = 0
+          pout = []
+          pein = 0
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = "E"
+          out_implicit = []
+          in_style = ""
+          out_style = 
+          in_label = ""
+          out_label = 
+          style = ""
+Model   : 
+          cscope type: 4
+          in = -1
+          in2 = 1
+          intyp = 1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [0;-15;15;30]
+          ipar = [-1;1;20;1;3;5;7;9;11;13;15;-1;-1;600;400]
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(3)
+GUI     : CSCOPE
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = ["1 3 5 7 9 11 13 15";"-1";"[]";"[600;400]";"-15";"15";"30";"20";"0";""]
+          pin = 0
+          pout = []
+          pein = 0
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = "E"
+          out_implicit = []
+          in_style = ""
+          out_style = 
+          in_label = ""
+          out_label = 
+          style = ""
+Model   : 
+          cscope type: 4
+          in = -1
+          in2 = 1
+          intyp = 1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [0;-15;15;30]
+          ipar = [-1;1;20;1;3;5;7;9;11;13;15;-1;-1;600;400]
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(4)
+Link    :
+          xx: []
+          yy: []
+          id: 
+          thick: 0 0
+          ct: 1 1
+          from: 0 0 0
+          to: 0 0 1
        ans(5)
+Link    :
+          xx: []
+          yy: []
+          id: 
+          thick: 0 0
+          ct: 1 -1
+          from: 0 0 0
+          to: 0 0 1
 // Link output port #1 of block #1 with input port #1 of block #2 thanks to lnk1
 scs_m.objs(4).from = [1 1 0]; // Link block #1
 propertyUpdated( 7 , PORT , CONNECTED_SIGNALS ) : SUCCESS
@@ -626,8 +797,104 @@ propertyUpdated( 23 , LINK , DESTINATION_PORT ) : SUCCESS
 scs_m.objs
  ans  =
        ans(1)
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[1;1]"
+          pin = [0;0]
+          pout = 3
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [1;1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(2)
+GUI     : CSCOPE
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = ["1 3 5 7 9 11 13 15";"-1";"[]";"[600;400]";"-15";"15";"30";"20";"0";""]
+          pin = [3;0]
+          pout = []
+          pein = 0
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = []
+          in_style = ["";""]
+          out_style = 
+          in_label = ["";""]
+          out_label = 
+          style = ""
+Model   : 
+          cscope type: 4
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [0;-15;15;30]
+          ipar = [-1;1;20;1;3;5;7;9;11;13;15;-1;-1;600;400]
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(3)
+Link    :
+          xx: []
+          yy: []
+          id: 
+          thick: 0 0
+          ct: 1 1
+          from: 1 1 0
+          to: 2 1 1
 scs_m.objs(3).from
  ans  =
     1.    1.    0.
@@ -890,8 +1157,104 @@ propertyUpdated( 26 , LINK , DESTINATION_PORT ) : SUCCESS
 scs_m.objs
  ans  =
        ans(1)
+Link    :
+          xx: []
+          yy: []
+          id: 
+          thick: 0 0
+          ct: 1 1
+          from: 2 1 0
+          to: 3 1 1
        ans(2)
+GUI     : BIGSOM_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,3]
+          flip = %t
+          theta = 0
+          exprs = "[1;1]"
+          pin = [0;0]
+          pout = 1
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = "E"
+          in_style = ["";""]
+          out_style = ""
+          in_label = ["";""]
+          out_label = ""
+          style = ""
+Model   : 
+          sum type: 2
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = -1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [1;1]
+          ipar = []
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(3)
+GUI     : CSCOPE
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = ["1 3 5 7 9 11 13 15";"-1";"[]";"[600;400]";"-15";"15";"30";"20";"0";""]
+          pin = [1;0]
+          pout = []
+          pein = 0
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = ["E";"E"]
+          out_implicit = []
+          in_style = ["";""]
+          out_style = 
+          in_label = ["";""]
+          out_label = 
+          style = ""
+Model   : 
+          cscope type: 4
+          in = [-1;-1]
+          in2 = [1;1]
+          intyp = [1;1]
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [0;-15;15;30]
+          ipar = [-1;1;20;1;3;5;7;9;11;13;15;-1;-1;600;400]
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%t,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 // Check that the linking has been done
 // Sum (#2 in diagram) is linked to Scope1 (#3) through lnk (#1)
 scs_m.objs(1).from
@@ -916,41 +1279,6 @@ scs_m.objs(3).model.in
   - 1.
 // Check that all the model items are freed
 clear
-propertyUpdated( 11 , BLOCK , INPUTS ) : SUCCESS
-propertyUpdated( 11 , BLOCK , OUTPUTS ) : NO_CHANGES
-propertyUpdated( 11 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
-propertyUpdated( 11 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-objectDeleted( 12 , PORT )
-propertyUpdated( 11 , BLOCK , INPUTS ) : NO_CHANGES
-propertyUpdated( 11 , BLOCK , OUTPUTS ) : NO_CHANGES
-propertyUpdated( 11 , BLOCK , EVENT_INPUTS ) : SUCCESS
-propertyUpdated( 11 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-objectDeleted( 13 , PORT )
-propertyUpdated( 11 , BLOCK , INPUTS ) : NO_CHANGES
-propertyUpdated( 11 , BLOCK , OUTPUTS ) : NO_CHANGES
-propertyUpdated( 11 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
-propertyUpdated( 11 , BLOCK , EVENT_OUTPUTS ) : SUCCESS
-propertyUpdated( 15 , LINK , DESTINATION_PORT ) : SUCCESS
-objectDeleted( 18 , PORT )
-objectDeleted( 11 , BLOCK )
-propertyUpdated( 8 , BLOCK , INPUTS ) : SUCCESS
-propertyUpdated( 8 , BLOCK , OUTPUTS ) : NO_CHANGES
-propertyUpdated( 8 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
-propertyUpdated( 8 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-objectDeleted( 9 , PORT )
-propertyUpdated( 8 , BLOCK , INPUTS ) : SUCCESS
-propertyUpdated( 8 , BLOCK , OUTPUTS ) : NO_CHANGES
-propertyUpdated( 8 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
-propertyUpdated( 8 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-objectDeleted( 17 , PORT )
-propertyUpdated( 8 , BLOCK , INPUTS ) : NO_CHANGES
-propertyUpdated( 8 , BLOCK , OUTPUTS ) : NO_CHANGES
-propertyUpdated( 8 , BLOCK , EVENT_INPUTS ) : SUCCESS
-propertyUpdated( 8 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-propertyUpdated( 15 , LINK , SOURCE_PORT ) : SUCCESS
-objectDeleted( 10 , PORT )
-objectDeleted( 8 , BLOCK )
-objectDeleted( 14 , LINK )
 propertyUpdated( 4 , BLOCK , INPUTS ) : SUCCESS
 propertyUpdated( 4 , BLOCK , OUTPUTS ) : NO_CHANGES
 propertyUpdated( 4 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
@@ -1007,5 +1335,40 @@ propertyUpdated( 35 , LINK , SOURCE_PORT ) : SUCCESS
 objectDeleted( 34 , PORT )
 objectDeleted( 31 , BLOCK )
 objectDeleted( 25 , DIAGRAM )
+propertyUpdated( 10 , PORT , CONNECTED_SIGNALS ) : SUCCESS
+propertyUpdated( 18 , PORT , CONNECTED_SIGNALS ) : SUCCESS
 objectDeleted( 15 , LINK )
+objectDeleted( 14 , LINK )
+propertyUpdated( 11 , BLOCK , INPUTS ) : SUCCESS
+propertyUpdated( 11 , BLOCK , OUTPUTS ) : NO_CHANGES
+propertyUpdated( 11 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
+propertyUpdated( 11 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 12 , PORT )
+propertyUpdated( 11 , BLOCK , INPUTS ) : NO_CHANGES
+propertyUpdated( 11 , BLOCK , OUTPUTS ) : NO_CHANGES
+propertyUpdated( 11 , BLOCK , EVENT_INPUTS ) : SUCCESS
+propertyUpdated( 11 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 13 , PORT )
+propertyUpdated( 11 , BLOCK , INPUTS ) : NO_CHANGES
+propertyUpdated( 11 , BLOCK , OUTPUTS ) : NO_CHANGES
+propertyUpdated( 11 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
+propertyUpdated( 11 , BLOCK , EVENT_OUTPUTS ) : SUCCESS
+objectDeleted( 18 , PORT )
+objectDeleted( 11 , BLOCK )
+propertyUpdated( 8 , BLOCK , INPUTS ) : SUCCESS
+propertyUpdated( 8 , BLOCK , OUTPUTS ) : NO_CHANGES
+propertyUpdated( 8 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
+propertyUpdated( 8 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 9 , PORT )
+propertyUpdated( 8 , BLOCK , INPUTS ) : SUCCESS
+propertyUpdated( 8 , BLOCK , OUTPUTS ) : NO_CHANGES
+propertyUpdated( 8 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
+propertyUpdated( 8 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 17 , PORT )
+propertyUpdated( 8 , BLOCK , INPUTS ) : NO_CHANGES
+propertyUpdated( 8 , BLOCK , OUTPUTS ) : NO_CHANGES
+propertyUpdated( 8 , BLOCK , EVENT_INPUTS ) : SUCCESS
+propertyUpdated( 8 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 10 , PORT )
+objectDeleted( 8 , BLOCK )
 objectDeleted( 24 , LINK )
index 2f790e7..19299ea 100644 (file)
@@ -16,6 +16,14 @@ propertyUpdated( 1 , LINK , THICK ) : NO_CHANGES
 propertyUpdated( 1 , LINK , COLOR ) : NO_CHANGES
 propertyUpdated( 1 , LINK , KIND ) : NO_CHANGES
 lnk  = 
+Link    :
+          xx: []
+          yy: []
+          id: 
+          thick: 0 0
+          ct: 1 1
+          from: 0 0 0
+          to: 0 0 1
 lnk.xx
  ans  =
     []
index 99f9826..fd02f87 100644 (file)
@@ -263,6 +263,50 @@ propertyUpdated( 4 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
 objectDeleted( 5 , PORT )
 objectDeleted( 4 , BLOCK )
 sb  = 
+GUI     : SUPER_f
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = 
+          pin = 0
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = "E"
+          out_implicit = "E"
+          in_style = ""
+          out_style = ""
+          in_label = ""
+          out_label = ""
+          style = ""
+Model   : 
+          super type: 0
+          in = 1
+          in2 = 1
+          intyp = 1
+          out = 1
+          out2 = 1
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar : SuperBlock
+          ipar = []
+          opar = list()
+          blocktype = "h"
+          firing = []
+          dep_ut = [%f,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 sb.graphics
  ans  =
 orig = [0,0]
@@ -317,6 +361,18 @@ sb.doc
 // Access the contained diagram's fields
 sb.model.rpar
  ans  =
+wpar = []
+title = ["Super Block";""]
+tol = [0.000001,0.000001,1.0000D-10,100001,0,1,0]
+tf = 100000
+context = []
+void1 = []
+options = tlist("scsopt")
+void2 = []
+void3 = []
+doc = list()
+1     IN_f
+2     OUT_f
 sb.model.rpar.props
  ans  =
 wpar = []
@@ -332,7 +388,95 @@ doc = list()
 sb.model.rpar.objs
  ans  =
        ans(1)
+GUI     : IN_f
+Graphics: 
+          orig = [40,40]
+          sz = [20,20]
+          flip = %t
+          theta = 0
+          exprs = "1"
+          pin = []
+          pout = 0
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = []
+          out_implicit = "E"
+          in_style = 
+          out_style = ""
+          in_label = 
+          out_label = ""
+          style = ""
+Model   : 
+          input type: 0
+          in = []
+          in2 = []
+          intyp = 1
+          out = -1
+          out2 = -2
+          outtyp = -1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = []
+          ipar = 1
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%f,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(2)
+GUI     : OUT_f
+Graphics: 
+          orig = [240,40]
+          sz = [20,20]
+          flip = %t
+          theta = 0
+          exprs = "1"
+          pin = 0
+          pout = []
+          pein = []
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = "E"
+          out_implicit = []
+          in_style = ""
+          out_style = 
+          in_label = ""
+          out_label = 
+          style = ""
+Model   : 
+          output type: 0
+          in = -1
+          in2 = -2
+          intyp = -1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = []
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = []
+          ipar = 1
+          opar = list()
+          blocktype = "c"
+          firing = []
+          dep_ut = [%f,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 sb.model.rpar.objs(1).graphics
  ans  =
 orig = [40,40]
@@ -1126,6 +1270,50 @@ propertyUpdated( 18 , BLOCK , EVENT_OUTPUTS ) : SUCCESS
 objectDeleted( 21 , PORT )
 objectDeleted( 18 , BLOCK )
 clk  = 
+GUI     : CLOCK_c
+Graphics: 
+          orig = [0,0]
+          sz = [2,2]
+          flip = %t
+          theta = 0
+          exprs = 
+          pin = []
+          pout = []
+          pein = []
+          peout = 0
+          gr_i = []
+          id = ""
+          in_implicit = []
+          out_implicit = []
+          in_style = 
+          out_style = 
+          in_label = 
+          out_label = 
+          style = ""
+Model   : 
+          csuper type: 0
+          in = []
+          in2 = []
+          intyp = 1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = []
+          evtout = 1
+          state = []
+          dstate = []
+          odstate = list()
+          rpar : SuperBlock
+          ipar = []
+          opar = list()
+          blocktype = "h"
+          firing = 0
+          dep_ut = [%f,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
 clk.graphics
  ans  =
 orig = [0,0]
@@ -1173,6 +1361,19 @@ equations = list()
 uid = ""
 clk.model.rpar
  ans  =
+wpar = []
+title = ["Untitled";""]
+tol = [0.000001,0.000001,1.0000D-10,100001,0,1,0]
+tf = 100000
+context = []
+void1 = []
+options = tlist("scsopt")
+void2 = []
+void3 = []
+doc = list()
+1     CLKOUT_f
+2     EVTDLY_c
+4     CLKSPLIT_f
 clk.model.rpar.props
  ans  =
 wpar = []
@@ -1188,11 +1389,167 @@ doc = list()
 clk.model.rpar.objs
  ans  =
        ans(1)
+GUI     : CLKOUT_f
+Graphics: 
+          orig = [399,162]
+          sz = [20,20]
+          flip = %t
+          theta = 0
+          exprs = "1"
+          pin = []
+          pout = []
+          pein = 5
+          peout = []
+          gr_i = []
+          id = ""
+          in_implicit = []
+          out_implicit = []
+          in_style = 
+          out_style = 
+          in_label = 
+          out_label = 
+          style = ""
+Model   : 
+          output type: 0
+          in = []
+          in2 = []
+          intyp = 1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = []
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = []
+          ipar = 1
+          opar = list()
+          blocktype = "d"
+          firing = []
+          dep_ut = [%f,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(2)
+GUI     : EVTDLY_c
+Graphics: 
+          orig = [320,232]
+          sz = [40,40]
+          flip = %t
+          theta = 0
+          exprs = ["0.1";"0.1"]
+          pin = []
+          pout = []
+          pein = 6
+          peout = 3
+          gr_i = []
+          id = ""
+          in_implicit = []
+          out_implicit = []
+          in_style = 
+          out_style = 
+          in_label = 
+          out_label = 
+          style = ""
+Model   : 
+          evtdly4 type: 4
+          in = []
+          in2 = []
+          intyp = 1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = 1
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = [0.1;0.1]
+          ipar = []
+          opar = list()
+          blocktype = "d"
+          firing = 0.1
+          dep_ut = [%f,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(3)
+Link    :
+          xx: 340 340 380.71
+          yy: 226.29 172 172
+          id: 
+          thick: 0 0
+          ct: 5 -1
+          from: 2 1 0
+          to: 4 1 1
        ans(4)
+GUI     : CLKSPLIT_f
+Graphics: 
+          orig = [0,0]
+          sz = [0.33333333,0.33333333]
+          flip = %t
+          theta = 0
+          exprs = 
+          pin = []
+          pout = []
+          pein = 3
+          peout = [5;6]
+          gr_i = []
+          id = ""
+          in_implicit = []
+          out_implicit = []
+          in_style = 
+          out_style = 
+          in_label = 
+          out_label = 
+          style = ""
+Model   : 
+          split type: 0
+          in = []
+          in2 = []
+          intyp = 1
+          out = []
+          out2 = []
+          outtyp = 1
+          evtin = 1
+          evtout = [1;1]
+          state = []
+          dstate = []
+          odstate = list()
+          rpar = []
+          ipar = []
+          opar = list()
+          blocktype = "d"
+          firing = [0;0]
+          dep_ut = [%f,%f]
+          label = ""
+          nzcross = 0
+          nmode = 0
+          equations = list()
+          uid = ""
        ans(5)
+Link    :
+          xx: 380.71 399
+          yy: 172 172
+          id: 
+          thick: 0 0
+          ct: 5 -1
+          from: 4 1 0
+          to: 1 1 1
        ans(6)
+Link    :
+          xx: 380.71 380.71 340 340
+          yy: 172 302 302 277.71
+          id: 
+          thick: 0 0
+          ct: 5 -1
+          from: 4 2 0
+          to: 2 1 1
 clk.model.rpar.objs(1).graphics
  ans  =
 orig = [399,162]
@@ -1348,6 +1705,34 @@ clk.model.rpar.objs(6).to
     2.    1.    1.
 // Check that all the model items are freed
 clear
+propertyUpdated( 10 , BLOCK , INPUTS ) : SUCCESS
+propertyUpdated( 10 , BLOCK , OUTPUTS ) : NO_CHANGES
+propertyUpdated( 10 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
+propertyUpdated( 10 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 11 , PORT )
+propertyUpdated( 10 , BLOCK , INPUTS ) : NO_CHANGES
+propertyUpdated( 10 , BLOCK , OUTPUTS ) : SUCCESS
+propertyUpdated( 10 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
+propertyUpdated( 10 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 12 , PORT )
+propertyUpdated( 1 , DIAGRAM , CHILDREN ) : SUCCESS
+propertyUpdated( 6 , BLOCK , INPUTS ) : NO_CHANGES
+propertyUpdated( 6 , BLOCK , OUTPUTS ) : SUCCESS
+propertyUpdated( 6 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
+propertyUpdated( 6 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 7 , PORT )
+propertyUpdated( 10 , BLOCK , CHILDREN ) : SUCCESS
+objectDeleted( 6 , BLOCK )
+propertyUpdated( 1 , DIAGRAM , CHILDREN ) : SUCCESS
+propertyUpdated( 8 , BLOCK , INPUTS ) : SUCCESS
+propertyUpdated( 8 , BLOCK , OUTPUTS ) : NO_CHANGES
+propertyUpdated( 8 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
+propertyUpdated( 8 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
+objectDeleted( 9 , PORT )
+propertyUpdated( 10 , BLOCK , CHILDREN ) : SUCCESS
+objectDeleted( 8 , BLOCK )
+objectDeleted( 1 , DIAGRAM )
+objectDeleted( 10 , BLOCK )
 propertyUpdated( 38 , BLOCK , INPUTS ) : NO_CHANGES
 propertyUpdated( 38 , BLOCK , OUTPUTS ) : NO_CHANGES
 propertyUpdated( 38 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
@@ -1406,31 +1791,3 @@ propertyUpdated( 22 , DIAGRAM , CHILDREN ) : SUCCESS
 objectDeleted( 37 , LINK )
 objectDeleted( 22 , DIAGRAM )
 objectDeleted( 38 , BLOCK )
-propertyUpdated( 10 , BLOCK , INPUTS ) : SUCCESS
-propertyUpdated( 10 , BLOCK , OUTPUTS ) : NO_CHANGES
-propertyUpdated( 10 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
-propertyUpdated( 10 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-objectDeleted( 11 , PORT )
-propertyUpdated( 10 , BLOCK , INPUTS ) : NO_CHANGES
-propertyUpdated( 10 , BLOCK , OUTPUTS ) : SUCCESS
-propertyUpdated( 10 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
-propertyUpdated( 10 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-objectDeleted( 12 , PORT )
-propertyUpdated( 1 , DIAGRAM , CHILDREN ) : SUCCESS
-propertyUpdated( 6 , BLOCK , INPUTS ) : NO_CHANGES
-propertyUpdated( 6 , BLOCK , OUTPUTS ) : SUCCESS
-propertyUpdated( 6 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
-propertyUpdated( 6 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-objectDeleted( 7 , PORT )
-propertyUpdated( 10 , BLOCK , CHILDREN ) : SUCCESS
-objectDeleted( 6 , BLOCK )
-propertyUpdated( 1 , DIAGRAM , CHILDREN ) : SUCCESS
-propertyUpdated( 8 , BLOCK , INPUTS ) : SUCCESS
-propertyUpdated( 8 , BLOCK , OUTPUTS ) : NO_CHANGES
-propertyUpdated( 8 , BLOCK , EVENT_INPUTS ) : NO_CHANGES
-propertyUpdated( 8 , BLOCK , EVENT_OUTPUTS ) : NO_CHANGES
-objectDeleted( 9 , PORT )
-propertyUpdated( 10 , BLOCK , CHILDREN ) : SUCCESS
-objectDeleted( 8 , BLOCK )
-objectDeleted( 1 , DIAGRAM )
-objectDeleted( 10 , BLOCK )
index 3737801..6431794 100644 (file)
@@ -408,6 +408,8 @@ function t=mlist2exp(l,lmax)
             t1=mlist2exp(lk,lmax)
         elseif type(lk)==9 then
             t1=h2exp(lk,lmax)
+        elseif type(lk)==128 then
+            t1=mlist2exp(user2mlist(lk),lmax)
         else
             t1=sci2exp(lk,lmax)
         end
@@ -816,3 +818,14 @@ function t=h2exp(a,lmax) //Only for figure and uicontrol
     end
 
 endfunction
+
+function ml = user2mlist(u)
+
+    fn = getfield(1, u);
+    ml = mlist(fn);
+
+    for k=2:size(fn,"*")
+        ml(i) = eval("u."+fn(k));
+    end
+
+endfunction