[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New type of queue



Kannan Varadhan wrote:

> the ns-compat stuff is to maintain backward compatibility
> with ns-1 scripts.  Since it is likely that no one (including yourself, yes?)
> has scripts with yoru queue type, you should not have to change ns-compat.tcl.
>
> Kannan

Thank you, Kannan.
Now I don't understand what could be my mistake.
I' ve implemented this new type of queue, which I' called  RQ. It is defined as a
child class of REDQueue class. I have no problem whith compiling, but when I run
my OTcl script for the simulation, the interpreter gives me this message:

invalid command name "Queue/RQ"
    while executing
"Queue/RQ create _o31 "
    invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $ ..."
    (procedure "new" line 3)
    invoked from within
"new Queue/$type"
    invoked from within
"set q [new Queue/$type]..."
    invoked from within
"if { [string first "ErrorModule" $type] != 0 } {
set q [new Queue/$type]

} else {
if { $argsz > 1 } {
set q [eval new $type ..."
    (procedure "_o3" line 38)
    invoked from within
"$ns simplex-link $n2 $n3 1.5Mb 10ms RQ"

The program exits even  before the class constructor is called. Please, could you
help me?
Thanks  a lot
                           Sara