navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 2 (modified by landauf, 9 years ago) (diff)



TclBind is a connection between the Tcl library (read this for more information) and Orxonox. Tcl is used by the CommandExecutor to execute nested commands and scripts.

There are two important C++ functions in TclBind:

  • tcl(command): Executes a tcl command (also available as a ConsoleCommand)
  • eval(command): Executes a tcl command and returns the returnvalue

On the other hand, TclBind defines some new Tcl procedures:

  • execute command: Executes a ConsoleCommand in the CommandExecutor
  • query command: Executes a ConsoleCommand in the CommandExecutor and returns the returnvalue
  • crossquery id command: Sends a command to another Tcl interpreter (see TclThreadManager?)

If Tcl finds an unknown procedure, it automatically passes the command via execute to the CommandExecutor. This allows you to call Orxonox commands within Tcl wihtout defining a Tcl alias for every Orxonox command.

Additionally the native Tcl procedure puts sends it's output to the orxout() instead of directly using the standard output device.

Learn more about Tcl in the Tcl-wiki: