Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5056


Ignore:
Timestamp:
May 13, 2008, 12:49:00 AM (16 years ago)
Author:
landauf
Message:

updates in init.tcl:

  • query
  • crossquery
  • execute
File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/Media/tcl/init.tcl

    r5051 r5056  
    214214
    215215# query --
    216 # Sends a query to the Tcl interpreter of Orxonox and
     216# Sends a query to the CommandExecutor of Orxonox and
    217217# waits for the response.
    218218# This procedure will be changed to it's real function
     
    222222# args - The command to send to Orxonox
    223223
     224proc query args {
     225    return -code error "Can't query Orxonox now"
     226}
     227
     228# crossquery --
     229# Sends a query to another Tcl-interpreter in Orxonox and
     230# waits for the response.
     231# This procedure will be changed to it's real function
     232# by Orxonox itself.
     233#
     234# Arguments:
     235# id   - The ID of the other interpreter
     236# args - The command to send to Orxonox
     237
    224238proc query {id args} {
    225     return -code error "can't query now"
    226 }
    227 
    228 # orxonox --
    229 # This procedure will be changed by Orxonox itself.
    230 # Until then it will return an error message.
    231 # orxonox gets called by "unknown" if a command isn't known.
    232 #
    233 # Arguments:
    234 # args - The original command
    235 
    236 proc orxonox args {
    237     return -code error "can't execute \"$args\""
     239    return -code error "Can't query interpreter with ID $id now"
    238240}
    239241
     
    273275                if {$nl==""} {lappend cmd 0} else {lappend cmd 1}
    274276                lappend cmd $s
    275                 execute log muuuuh
    276277                eval $cmd
    277278            } else {
     
    477478    }
    478479#    return -code error "invalid command name \"$name\""
    479     return [orxonox $args]
     480    return [query $args]
    480481}
    481482
Note: See TracChangeset for help on using the changeset viewer.