hi everyone, i wanna define a new timer for a agent i have modify from udp
agent. I've defined the timer SockTimer but i get error during compilation,
the code seen good for me but i have to missing something. thanks a lot in
advance
class UdpAgentSk;
class SockTimer : public TimerHandler {
public:
SockTimer(UdpAgentSk *a) : TimerHandler() {a_ = a; };
virtual void expire (Event *e);
//void setTimer(double t);
protected:
UdpAgentSk *a_;
};
class UdpAgentSk : public Agent {
public:
//UdpAgentSk();
UdpAgentSk() : sk_timer(this) {} ;
UdpAgentSk(packet_t);
virtual void sendmsg(int nbytes, const char *flags = 0)
{
sendmsg(nbytes, NULL, flags);
}
virtual void sendmsg(int nbytes, AppData* data, const char *flags = 0);
virtual void recv(Packet* pkt, Handler*);
virtual int command(int argc, const char*const* argv);
protected:
int seqno_;
SockTimer sk_timer;
};
--
Ing Pedro Alonso Chaparro Valero
Ciudad Politecnica de la Innovación
iTEAM - Mobile Communications Group
Polytechnic University of Valencia
C\ Camino de Vera S/N, Edificio 8G
46022 Valencia, Spain