[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Problem with Agent::command()
I think you should call your agent command using
$self mycmd, instead of $self cmd mycmd.
The second calls the command cmd of your agent, and since it doesn't find it,
calls agent::command.
However, this is just a guess.
Bye
Nick
Kristian Svensson wrote:
> Hi!
>
> I'm in the beginning of making a routing agent (MyProto), and have a problem
> with reaching C++ from TCL via MyProto::command(). It seems that when i
> calls "$self cmd mycmd" from Agent/rtProto/MyProto, the command function of
> MyProto isn't called, but Agent::command is. MyProto inherits from Agent,
> and I've set up the connections as follows, the usual way:
>
> static class MyProtoclass : public TclClass {
> public:
> MyProtoclass() : TclClass("Agent/rtProto/MyProto") {}
> TclObject* create(int, const char*const*) {
> return (new MyProto());
> }
> } class_MyProto;
>
> And MyProto::command() is defined of course.
>
> Can someone please give me a hint on what I might be doing wrong?
>
> Regards,
> Kristian Svensson