Managing clock frequency

Making & changing box plugins and external apps
Post Reply
rmatasan
Posts: 5
Joined: Tue Feb 09, 2010 10:26 am

Managing clock frequency

Post by rmatasan »

Hi, I am trying to develop a new plugin for openvibe. In this plugin I need to call a method that displays something on the screen at a determinate frequency (let's say 10 Hz). I guess I need to use the getClockFrequency() function since I need to trigger my "displaying" function so often, but I don't know how to trigger my function once I have the frequency. Can anyone please help me??

Rubén Mata

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: Managing clock frequency

Post by yrenard »

Dear Rubén Mata,

thank you for your interest in our software and welcome on this board.

Actually, the getClockFrequency function you are talking about will tell the driver how often you box should be clock-notified... So if you want it to be notified at 10 Hz, just return 10LL<<32. This will cause the kernel to call you processClock callback 10 times a second. In this callback you should mark your box algorithm as ready to process, requiring the kernel to call your process callback... Do whatever you want in this callback !

I hope this helps,
Are you working on SSVEP presentation ?

Best regards,
Yann

rmatasan
Posts: 5
Joined: Tue Feb 09, 2010 10:26 am

Re: Managing clock frequency

Post by rmatasan »

Thanks a lot!! I already understood and made it work.

Yes, I am working in SSVEP. But I guess I am still a beginner. Anyway I will try to learn as fast as possible.

Thank you again for answering so quickly.

Post Reply