RE: Use of FSM with ptcl
By design, FSMs must be specified with the STD graphical editor.
If you have specified My_FSM , the first thing to do to use it
in ptcl is to load the My_FSM with the following line :
ptkTychoLoadFSM $PTOLEMY/my_sources/My_FSM.std
Then, you can use your fsm and connect it :
----------------------------File myUniverse.pt-------------------------------
------------
set PTOLEMY $env(PTOLEMY)
# To get the definition of ptkTychoLoadFSM
source $PTOLEMY/lib/tcl/utilities.tcl
# Tycho packages must also be used, but we didn't stop
# and switched to C++.
#
#source $PTOLEMY/tcltk/itcl/lib/itcl/itk/itk.tcl
#source $PTOLEMY/tycho/kernel/TopLevel.itcl
#source $PTOLEMY/tycho/kernel/TWidget.itcl
#source $PTOLEMY/tycho/kernel/View.itcl
#source $PTOLEMY/tycho/kernel/Displayer.itcl
#source $PTOLEMY/tycho/kernel/Path.itcl
#source $PTOLEMY/tycho/kernel/File.itcl
...
ptkTychoLoadFSM $PTOLEMY/my_sources/My_FSM.std
star fsm1 My_FSM
...
connect fsm1 output A_STAR1 input
connect A_STAR2 output fsm1 input
...
----------------------------File myUniverse.pt-------------------------------
------------
Finally, just type :
ptcl myUniverse.pt
But, you need to source Tycho package to run the script.
Since, we switched to a C/C++ approach to use FSM without the graphical
environment, we didn't find exactly which Tycho files to source in ptcl.
Perhaps, someone else will to look at this !
Xavier Warzee
Thomson-CSF Optronique
Email: [EMAIL PROTECTED]
>>> Thomas Wuensche wrote
Hello all,
I have written a simulation using pigi and now want
to run it without the graphical user interface (Tcl/Tk
stars would be fine). This simulation uses FSM.
If I start ptcl with the pigiLog.pt from the last interactive
simulation, ptcl complains about the FSM stars. Hence
the questions:
- Is it possible to use FSM in ptcl?
- Is there another way to run that simulation
without displaying the graphical environment?
- Is there a way to use Tk in a simulation outside
the graphical environment?
I recall I read somewhere in the documentation that
there was a third alternative to pigi and ptcl, which
included Tk (tycho?). Unfortunately I could not find
the location again.
Thanks for your help,
Thomas Wuensche
-------------------------------------------------------
EMS Dr. Thomas Wuensche
Phone: +49-8441-490260
Fax +49-8441-81860
Visit also our web-site at http://www.ems-wuensche.com/
-------------------------------------------------------
----------------------------------------------------------------------------
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]