Edward already responded, below are some further details.

About invoking Ptolemy II, see "How do I invoke Ptolemy II" in the faq at
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIfaq.htm#invoking%20Ptolemy%20II?

You can open a model with:

  java -classpath $PTII ptolemy.actor.gui.PtolemyApplication 
$PTII/ptolemy/domains/sdf/demo/Butterfly/Butterfly.xml

which is the same as
  $PTII/bin/ptolemy $PTII/ptolemy/domains/sdf/demo/Butterfly/Butterfly.xml

I don't use the -class command line argument much, it seems like it
might be broken?  (Edward, do you have any ideas?)

$PTII/ptolemy/actor/gui/MoMLSimpleApplication.java will invoke a
non-graphical application.  

  $PTII/bin/ptinvoke ptolemy.actor.gui.MoMLSimpleApplication  
$PTII/ptolemy/actor/lib/test/auto/IIR.xml 

To execute a graphical application, try:

$PTII/bin/ptexecute $PTII/ptolemy/domains/sdf/demo/Butterfly/Butterfly.xml



To add your editor, you might look at how the tree view is implemented.

Basically, $PTII/ptolemy/configs/graphTableauFactory.xml adds
a TreeTableau Factory to the configuration:

<property name="factory2" class="ptolemy.actor.gui.PtolemyTableauFactory">
  <!-- These will appear in the View menu of a the graph editor. -->
  <property name="Graph Editor"
            class="ptolemy.vergil.actor.ActorGraphTableau$Factory"/>
  <property name="Run Window"
            class="ptolemy.actor.gui.RunTableau$Factory"/>
  <property name="Tree View"
            class="ptolemy.vergil.tree.TreeTableau$Factory"/>
  <property name="XML view"
            class="ptolemy.actor.gui.TextEditorTableau$Factory"/>
  <!-- No code gen in this basic file. -->
  <!--property name="Code Generator"
            class="ptolemy.copernicus.gui.GeneratorTableau$Factory"/-->
  <!-- FIXME: does this belong in the View menu? -->
  <property name="JVM Properties"
            class="ptolemy.actor.gui.JVMTableau$Factory"/>
  <!-- FIXME: Tcl Shell does not belong in the View menu, nor in
  basic.
    Commented out so that Web Start works
    -->
  <!--property name="Tcl Shell"
            class="ptolemy.actor.gui.ptjacl.TclShellTableau$Factory"/-->
</property>

Also, look at $PTII/ptolemy/actor/gui/Tableau.java and Effigy.java

The configuration system is somewhat complex, partly because it
is written to use the Ptolemy classes to configure itself.  I
find the names Tableau and Effigy confusing. 
An Effigy consists of the metadata about the Model, so it
could be considered a ModelModel.  The Tableau could be considered
a View (I think).

MoMLApplication is not really meant to be called directly, though
in the command below will use the HyVisual configuration when
opening a model:

$PTII/bin/moml $PTII/ptolemy/configs/hyvisual/configuration.xml 
$PTII/ptolemy/domains/ct/demo/StickyMasses/StickyMasses.xml

I'll poke around with -class and see if I can come up with a working
example.

Feel free to contact me directly if you have further questions.


_Christopher

Christopher Brooks (cxh at eecs berkeley edu) University of California
Programmer/Analyst Chess/Ptolemy/GSRC         US Mail: 558 Cory Hall #1770
ph: 510.643.9841 fax:510.642.2739             Berkeley, CA 94720-1770
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480  (office: 400A Cory)


--------

    Hi,
    
    I'm pretty new to Ptolemy and I'm just getting my feet wet with the structu
   re of the application. I have a few questions.
    
    I will be integrating a tool with Ptolemy that will basically be providing 
   another view on the Ptolemy models. I would like to have changes made in my 
   view reflect on Ptolemy models in real time, while being able to switch betw
   een my view and the Ptolemy view. So far I have determined that this would r
   equire invoking some application-like instance of Ptolemy, getting access to
    the Director and then its respective Actors. I'm stuck on the first step, i
   nvoking an application-like instance of Ptolemy and I'm trying to do this fo
   r now using the provided demos.
    
    Does anyone have any experience doing this? Anyone very familiar with the l
   oading mechanism that might be able to give me some pointers? So far I've st
   epped through Vergil a bit and determined that the Configuration class is re
   sponsible for instantiating the MoMLParser that in turn brings up the models
   , but it's not clear how to get that started without invoking all of Vergil.
    
    
    My attempts to use ptolemy.actor.gui.CompositeActorApplication,  PtExecuteA
   pplication, MoMLApplication and PtolemyApplication have not worked with the 
   -class command line argument, specifying the package location of the composi
   te actor xml files. For example:
    
    PtolemyApplication -class ptolemy.domains.ci.demo.Router.Router
    
    where from the working directory, /ptolemy/domains/ci/demo/Router/Router.xm
   l exists, the execution does nothing.
    
    I'd appreciate any help and guidance.
    
    Thanks,
    
    Giridhar "Giri" Sreenivas
    Software Engineer - Modeling, Simulation and Information Sciences
    Advanced Technology Center
    Lockheed Martin - Space Systems Company
    B/153 2K4
    Phone: (408) 742-5914
    [EMAIL PROTECTED]
    
    
    ---------------------------------------------------------------------------
   -
    Posted to the ptolemy-hackers mailing list.  Please send administrative
    mail for this list to: [EMAIL PROTECTED]
--------

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to