Driver organization

Making & changing hardware drivers in Acquisition Server
Post Reply
nbaron
Posts: 23
Joined: Mon Jan 18, 2010 4:54 am

Driver organization

Post by nbaron »

I think the way to add a driver to the AS is not easy and I try to find out why it is like that.

My first idea was :
Why OV did not use a cfg or xml file to dynamically load the driver DLL ?
So I just have to write my class which has heritage to the correct interface (interface's files
are standalone), compile it as a dynamic library and that's it.

Then I think that Linux does not have DLL :shock:
My conclusion ; it was to keep the multi platform advantages of OpenVibe.

I don't know how does it works on Linux but is a functionality like that can be implemented ?

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

Re: Driver organization

Post by yrenard »

Dear nbaron,

this is possible to do what you are describing. The box plugins are working exactly this way. Linux uses dlopen / dlclose / dlsym to do that where Windows uses LoadLibrary / FreeLibrary / GetProcAddress. The way they work is almost identical.

The configuration manager helps to find what plugin modules should be loaded.

To answer your interrogation, this was simply done this way because the acquisition driver was not relying on the OpenViBE kernel at the beginning... so it did not have all the advantages of having all the dynamic library loading facilities ready. We will probably move to what you describe later. No time on my side for this right now ;)

Yann

Post Reply