Hi,
I am trying to collect statistics from the switches periodically using timer
and I am creating a thread for this. I have written the following code
void
Linkloads::install() {
pthread_create(&thread_id,0,&Linkloads::timer,(void *)this);
}
void* Linkloads::timer(void *obj)
{
cout<<"timer called"<<endl;
timeval tv={1,0};
((Linkloads *)obj)->post(boost::bind(&Linkloads::timer, (Linkloads *)obj),
tv);
}
So I am expecting the timer to be called every 1 second. I have made timer
static while declaring it. It compiles well but when I run nox_core with
linkloads, it gives the following message.
00034|nox|ERR:Cannot change the state of 'linkloads' to INSTALLED:
'linkloads' ran into an error:
Can't open a dynamic library: 'nox/netapps/linkloads/linkloads.so:
cannot open shared object file: No such file or directory' or
'nox/netapps/linkloads/.libs/linkloads.so: undefined symbol:
vigil::applications::Linkloads::post(boost::function<void ()(),
std::allocator<void> > const&, timeval const&) const'
I am unable to figure out the error and any help is greatly appreciated.
Thanks in advance.
Sravanthi
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org