Sending External Stimulation

Obtaining data from various hardware devices
Post Reply
benry
Posts: 12
Joined: Thu Sep 22, 2011 3:59 pm
Location: Milan, Italy
Contact:

Sending External Stimulation

Post by benry »

Hi,
I tried to implement in my C++ code the new feature introduced in OpenVibe 0.15.0, to be able to send "External Stimulation" to the acquisition server... I successfully compiled my code using the provided example, but (while running it on the same machine), looking at the stimulations recived by the acquisition server using a "stimulationn listener" box I can't see any "OVTK_StimulationId_Beep".

The code is running fine without any error and I am sure that I am running this once:

OpenViBE::StimulationConnection* osc = new OpenViBE::StimulationConnection("openvibeExternalStimulations");

and this inside a loop:

osc->sendStimulation(OVTK_StimulationId_Beep);

Am I missing something? How could I debug this problem?

p.s.
I am using the procompiled version of openvibe... do I have to compile it from source code to enable this feature of the acquisition server?


Thanks in advance,

Enrico

benry
Posts: 12
Joined: Thu Sep 22, 2011 3:59 pm
Location: Milan, Italy
Contact:

Re: Sending External Stimulation

Post by benry »

Does anyone succeeded to use this function?

jlegeny
Posts: 239
Joined: Tue Nov 02, 2010 8:51 am
Location: Mensia Technologies Paris FR
Contact:

Re: Sending External Stimulation

Post by jlegeny »

Hello benry,

have you activated the External Stimulations inside the properties of the Acquisition Server?

One way to debug this would be to activate Debug log level through openvibe.conf. The Acquisition Server displays a number of information concerning the external stimulations when the acquisition stops.

Regards
Jozef

benry
Posts: 12
Joined: Thu Sep 22, 2011 3:59 pm
Location: Milan, Italy
Contact:

Re: Sending External Stimulation

Post by benry »

Hi,
thank you very much for your answer...

I have activated the External Stimulations check box and as you suggested I enabled the logging at Debug level.

When the Acquisition Server stop the acquisition, it reports 0 for all the counters related to IPC... but I am sure that my code was executing the send command (without throwing any exception) while the acquisition server was running...

Do I have to use a specific version of the boost library? Which version are you using?


Thanks for your work ;)

benry
Posts: 12
Joined: Thu Sep 22, 2011 3:59 pm
Location: Milan, Italy
Contact:

Re: Sending External Stimulation

Post by benry »

It works! :)

1) I downloaded the latest svn version of openvibe and compiled it
2) I recompiled my code, using the same boost library folder downloaded by the openvibe script for dependencies
3) Now the acquisition server is receiving the external stimulations from my code

p.s.
The precompiled version (0.15.0) of the acquisition server still not works...

Hope this will help other people ;)

Bye

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

Re: Sending External Stimulation

Post by yrenard »

Dear benry,

thank you for your feedback, I would like to ask one thing about what you did : can you check or at least, do you believe that you must use the same version of boost as is used in the acquisition server for your own stimulation program to behave correctly with OpenViBE ?

Thank you very much,
Yann

benry
Posts: 12
Joined: Thu Sep 22, 2011 3:59 pm
Location: Milan, Italy
Contact:

Re: Sending External Stimulation

Post by benry »

Hi,
I checked again and the problem seems related not to the boost library versions, but to the compiler used...

e.g. if I compile the external-stimulation sender example provided with the openvibe source code using minGW (that is what I commonly use when I am forced to compile stuff for windows), the stimulations it throws are not catched by the acquisition server compiled by the openvibe build system and no error/exceptions are signaled.
On the other hand, the same exemple, compiled by the openvibe build system and thus with the same compiler, is perfectly working.

Bye,

Enrico

Post Reply