A problem with creating a driver

Making & changing hardware drivers in Acquisition Server
Post Reply
amin.mahnam
Posts: 9
Joined: Wed Jun 11, 2014 5:56 pm

A problem with creating a driver

Post by amin.mahnam »

Hi,

I am a beginner to openvibe software, I work on a BCI project. I have made a 2 channels EEG system and I want to use openvibe software to acquire and process my EEG data. I have to create a driver due to this ink:

http://openvibe.inria.fr/tutorial-creat ... on-server/

I generate files from skeleton generator, due to READ ME file:

The Configuration and Driver classes:

- ovasCConfigurationTestDriver.h

- ovasCConfigurationTestDriver.cpp

- ovasCDriverTestDriver.h

- ovasCDriverTestDriver.cpp

You can put these files here in your local repository:

[openvibe-repository]/contrib/plugins/server-drivers/[my-device]/src/

The glade interface:

- interface-TestDriver.glade

You can put this file in here in your local repository:

[openvibe-repository]/contrib/plugins/server-drivers/[my-device]/share/


Don't forget to declare your driver to the Acquisition Server application.

This happens in ./contrib/common/contribAcquisitionServer.inl, there you

will find examples of such declarations.

...............................................................................................

Now, there is not my created driver’s name in driver list of openvibe acquisition server, so I don’t know if my driver is registered to the acquisition server or not? And how should I work with this new driver?

Thank you in advanced for any help.

Best Regards

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: A problem with creating a driver

Post by jtlindgren »

Hi Amin,

having lines like

Code: Select all

#include "ovasCDriverMyDriver.h"
void initiateContributions(...)
{
  // ...
  vDriver->push_back(new OpenViBEAcquisitionServer::CDriverMyDriver(pAcquisitionServer->getDriverContext()));
  // ...
}
in the .inl file is half of the process. However, you also need to let cmake know the sources to compile, using line like

Code: Select all

OV_ADD_CONTRIB_DRIVER("${CMAKE_SOURCE_DIR}/contrib/plugins/server-drivers/mydriver/")
in the corresponding .cmake file.


Hope this helps,
Jussi

amin.mahnam
Posts: 9
Joined: Wed Jun 11, 2014 5:56 pm

Re: A problem with creating a driver

Post by amin.mahnam »

Hi,
Thank you so much for your reply.

I have edited contribAcquisitionServer.inl file and contribAcquisitionServer.cmake due to your comment by typing on the files, but the problem has been remained yet and I cannot see my driver name in the list of GUI.
I will attach the .inl and .cmake files, so you can see all these lines are added but still there is not my driver name in GUI!!!

My driver name is "rayan".

Please help me, what should I do?

Regards
Attachments
contribAcquisitionServer.inl.txt
(3.57 KiB) Downloaded 347 times
contribAcquisitionServer.cmake.txt
(2.14 KiB) Downloaded 347 times

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: A problem with creating a driver

Post by jtlindgren »

Hi Amin,

at a glance the files look alright. I can only suggest the following, until something helps

1) Is your driver compiled? You can either look at the compiler outputs or examine the resulting openvibe-acquisition-server. Or, you can add some printf/cout to OpenViBEAcquisitionServer::CDriverrayan() constructor. When the server is started, you should get that print if your driver is included.
2) Carefully compare how your driver is different from the existing drivers. Try to turn an existing driver into your driver. Try modify some working driver bit by bit. When it no longer appears in the GUI, you've found the bug.


Best,
Jussi

amin.mahnam
Posts: 9
Joined: Wed Jun 11, 2014 5:56 pm

Re: A problem with creating a driver

Post by amin.mahnam »

Hi,

Thank you for your reply.

Yes, I think driver is not compiled.
Because when I double click on "win32-build.cmd" for compiling OpenViBE source code, I face some errors about CMake. You can see them in these attachments.
Untitled.png
Untitled.png (55.14 KiB) Viewed 7402 times
Untitled1.png
Untitled1.png (48.28 KiB) Viewed 7402 times
Could you please help me know what is the problem with my compiling? What should I do? I really need to create a driver for my device.

Thank you so much for any help you can provide.

Regards

jtlindgren
Posts: 778
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: A problem with creating a driver

Post by jtlindgren »

This looks like related to your Visual Studio installation and its interaction with cmake. You could try to see if you can build any other programs that use the combination. The only unusual thing in addition to the errors that I see is that your Visual Studio is not installed under C:\Program Files\. Not sure if it matters. Some people have had issues if they had uninstalled/reinstalled Visual Studio. You could also try to google up what the error codes mean.


Good luck,
Jussi

amin.mahnam
Posts: 9
Joined: Wed Jun 11, 2014 5:56 pm

Re: A problem with creating a driver

Post by amin.mahnam »

Hi,

Thanks a lot, This helps to create a new driver for my EEG device.

Best.

Post Reply