[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Connecting classes
Hi,
I am trying to the queue class such that it will query or set the link
speed
on the link class on the event basis. I did the following changes but
I get segmentation fault:
In object.h
class NsObject : public TclObject, public Handler {
I define a new virtual function:
virtual double bandwidth() = 0;
bandwidth is the function defined in delay.cc in class LinkDelay :
public Connector {
double bandwidth() const { return bandwidth_; }
Now in the queue.cc in void Queue::recv(Packet* p, Handler*)
I call the statement temp = target_->bandwidth();
I am getting segmentation fault on running any tcl script. Please help.
Your help is very much appreciated.
-Sanjay
begin:vcard
n:Agrawal;Sanjay
tel;work:(408) 525-0938
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[email protected]
end:vcard