OpenViBE forum

The OpenViBE community
It is currently Sat May 25, 2013 6:53 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Feb 21, 2012 8:29 am 
Offline

Joined: Tue Apr 19, 2011 7:58 pm
Posts: 91
Hi,

I am exploring the tutorial about the new acquisition driver. Driver was automatically generated and placed where specified.

I have registered my driver in: ovasCAcquisitionServerGUI.cpp (header and vector)
Do I need to register the configuration "CConfigurationTestDriver"? This is what I missed last time.

Code:
boolean CDriverTestDriver::initialize(
   const uint32 ui32SampleCountPerSentBlock,
   IDriverCallback& rCallback)
{
   assert(&m_rDriverContext!=NULL);//fails here

   if(m_rDriverContext.isConnected()) return false; //actually here
   if(!m_oHeader.isChannelCountSet()||!m_oHeader.isSamplingFrequencySet()) return false;


Currently my code fails with m_rDriverContext being NULL.

Please advise.

-Anton


Top
 Profile  
 
PostPosted: Tue Feb 21, 2012 6:11 pm 
Offline
Site Admin

Joined: Wed Oct 07, 2009 12:11 pm
Posts: 413
Hi Anton !

The only thing you need to use a new driver is registering it in the ovasCAcquisitionServerGUI.cpp file (#include and push_back in the vector), the configuration is not registered.
.. and if your driver is flagged as unstable, set AcquisitionServer_ShowUnstable to true in the config file.

I tried to assert the existence of m_rDriverContext too in a new empty driver, but couldn't reproduce what you are experiencing.
You didn't modify anything else, did you ?

Laurent-

_________________
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !


Top
 Profile  
 
PostPosted: Wed Feb 22, 2012 6:58 pm 
Offline

Joined: Tue Apr 19, 2011 7:58 pm
Posts: 91
Hello Laurent,

I have another problem that might be the primary problem.

When I add the new driver files in the project file something goes wrong with the compilation.

Visual Studio can not find <gtk/gtk.h> all of a sudden in ovasCConfigurationBuilder.h

Do you use VS 2010?

Please try to add the files I have attached. Does it compile with them?

Without the new files everything compiles and runs as expected.


Attachments:
ovasCDriverTestDriver.zip [3.95 KiB]
Downloaded 11 times
Top
 Profile  
 
PostPosted: Thu Feb 23, 2012 1:49 pm 
Offline
Site Admin

Joined: Wed Oct 07, 2009 12:11 pm
Posts: 413
Hello Anton,

Your source code works fine on my computer.
And seems very simple to me... no big deal except the assert part.

I use Visual Studio 2010.

Did you try cleaning the cmake cache and re-build from scratch the acquisition server ? (delete local-tmp/openvibe-application/acquisition-server)

_________________
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !


Top
 Profile  
 
PostPosted: Thu Feb 23, 2012 7:58 pm 
Offline

Joined: Tue Apr 19, 2011 7:58 pm
Posts: 91
Hello,

I regenerated projects and reconfigured the acquisition server in VS.

I found the problem. It is:

Code:
m_vDriver.push_back(new CDriverTestDriver(m_pAcquisitionServer->getDriverContext()));


and not:

Code:
m_vDriver.push_back(new CDriverTestDriver(*m_pDriverContext)); //as in the tutorial


m_pDriverContext is NULL at that time

Please, change it :D


Top
 Profile  
 
PostPosted: Fri Feb 24, 2012 9:20 am 
Offline

Joined: Tue Nov 02, 2010 8:51 am
Posts: 216
Location: Inria Rennes FR
Hello Anton,

indeed there was an error in the tutorial. Thank you for your input, it is corrected now.

Cheers
Jozef

_________________
My Weblog Follow me on Twitter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
POWERED_BY
Translated by MaĆ«l Soucaze © 2009 phpBB.fr