[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new Agent ...
Hi everybody,
I have defined a new agent using ns2.1b5 and I have got a coredump for:
#0 0x805e7b2 in Agent::initpkt (this=0x20722074, p=0x83e62e0) at
agent.cc:487
487 ch->ptype() = type_;
I followed M. Greis' steps (the PT_... in packet.h, and ns-default.tcl
etc)
class EcamAgent : public Agent {
public:
EcamAgent();
int command(int argc, const char*const* argv);
void funtion - asking for Packet* pkt_ecam = allocpkt();
... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
protected:
...
};
static class EcamAgentClass : public TclClass {
public:
EcamAgentClass() : TclClass("Agent/ECAM") {}
TclObject* create(int , const char*const*) {
return (new EcamAgent());
}
} class_ecamagent;
EcamAgent::EcamAgent() : Agent(PT_ECAM)
{
...
}
Thank you for giving me a hint.
Have a nice day with ns,
Anca
--
______________________________________________________________________
Anca Dracinschi
Universit� Pierre et Marie Curie tel: +33 (0) 1 44 27 71 26
Laboratoire LIP6 - CNRS fax: +33 (0) 1 44 27 53 53
8 rue du Capitaine Scott
75015 PARIS France mailto:[email protected]
______________________________________________________________________