Class Agent/SP is not a built-in NS2 class. You have to create an access
to OTcl by using Tclclass. Then you will be able to access use it in
OTcl. for example,
static class TcpClass : public TclClass {
public:
TcpClass() : TclClass("Agent/TCP") {}
TclObject* create(int , const char*const*) {
return (new TcpAgent());
}
} class_tcp;
BR,
Teerawat
On 8/1/2007, "hossein fotouhi" <[EMAIL PROTECTED]> wrote:
>
>Hi,
>I received this error when running my file.
>does anyone know where is the problem?
>thank you
>
>-----------------------------------------------------------------------------------------------------------------------------------
>
>[EMAIL PROTECTED] bin]# ./ns wireless-spr.tcl 10 20
>num_nodes is set 100
>invalid command name "Agent/SP"
> while executing
>"Agent/SP set sport_ 0"
> (file "./spr.tcl" line 3)
> invoked from within
>"source.orig ./spr.tcl"
> ("uplevel" body line 1)
> invoked from within
>"uplevel source.orig [list $fileName]"
> invoked from within
>"if [$instance_ is_http_url $fileName] {
>set buffer [$instance_ read_url $fileName]
>uplevel eval $buffer
>} else {
>uplevel source.orig [list $fileName]
>..."
> (procedure "source" line 8)
> invoked from within
>"source ./spr.tcl"
> (file "wireless-spr.tcl" line 259)
>