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

Re: [ns] adding a new protocol



Hullo,
this is the error that i am getting when i run my tcl
sciprt.could someone please tell me what to do?
can't read "debug_": no such variable
    (Object set line 1)
    invoked from within
"Classifier/Port set debug_"
    invoked from within
"catch "$c set $var" val"
    (procedure "_o36" line 1)
    (SplitObject unknown line 1)
    invoked from within
"$agent target [[$self node] entry]"
    (procedure "_o11" line 2)
    (RtModule attach line 2)
    invoked from within
"$m attach $agent $port"
    (procedure "_o10" line 4)
    (Node add-target line 4)
    invoked from within
"$self add-target $agent $port"
    (procedure "_o10" line 15)
    (Node attach line 15)
    invoked from within
"$node attach $agent"
    (procedure "_o3" line 2)
    (Simulator attach-agent line 2)
    invoked from within
"$ns attach-agent $mCast $dgAgent1"
    (file "./tclScripts/DG_Agent.tcl" line 34)

thanks,
bindu

--- Sowmya Manjanatha <[email protected]> wrote:
> 
> Apart from whatever you have done below, you must
> also
> add the OTcl stubs in .cc to be able to generate and
> use
> Tcl instances.  To give you an example here is how
> droptail
> adds it.
> 
> static class DropTailClass : public TclClass {
>  public:
>         DropTailClass() : TclClass("Queue/DropTail")
> {}
>         TclObject* create(int, const char*const*) {
>                 return (new DropTail);
>         }
> } class_drop_tail;
> 
> int
> DropTail::command(int argc, const char*const* argv)
> {
> 
>         if (argc == 3) {
>                 if (!strcmp(argv[1],
> "packetqueue-attach")) {
>                         delete q_;
>                         if (!(q_ = (PacketQueue*)
> TclObject::lookup(argv[2])))
>                                 return (TCL_ERROR);
>                         else {
>                                 pq_ = q_;
>                                 return (TCL_OK);
>                         }
>                 }
>         }
>         return Queue::command(argc, argv);
> }
> 
> If you have already done the above, can you send the
> exact
> error message occuring when you run your script.
> 
> Sowmya.
> 
> 
> On Wed, 7 Nov 2001, bindumadhavi ramavarjula wrote:
> 
> > hi,
> > i have tried to add a new protocol.i did the
> > following:
> > 1.added code DG_Agent.cc,DG_Agent.h
> > 2.Then i changed the packet.h to incorporate new
> > packet types
> > 3.then i added DG_Agent.o to the object code list
> in
> > Makefile.
> > then i did a make depend
> > it gets stuck at this point:
> > tclAppInit.cc tkAppInit.cc
> > then i do a make which runs fine.
> > then when i run the tcl script for my protocol it
> says
> > it does not reconise the SplitObject.
> > could someone tell me what i am doing wrong?
> > bindu
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Find a job, post your resume.
> > http://careers.yahoo.com
> > 
> > 
> 


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com