How to send messages to the console?

Post Reply
ammaia
Posts: 11
Joined: Tue Dec 04, 2012 12:15 pm

How to send messages to the console?

Post by ammaia »

I would like to know if it is possible to send messages to the INF console at the bottom of the OpenVibe screen designer.

Lets use a simple scenario connecting the 2 modules: "Clock stimulator" and "Run Command"

"Clock stimulator" defined as:

Code: Select all

Intervalstimulation interval (in sec): 10.00000
Stimluation: OVTK_StimulationId_Label_01
"Run Command" defined as:

Code: Select all

Stimulation 1: OVTK_StimulationId_Label_01
Command 1: START notepad
So, each 10 seconds it opens the application notepad.

What I want to do is also to send a message each 10 seconds to the console at the botton of the screen. For example: "Opening notepad..."


Regards
Pedro

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

Re: How to send messages to the console?

Post by jlegeny »

Hello Pedro,

an easy way to display arbitrary messages would be to use the Lua stimulator box.

Add an input to it via right click menu and use it with a simple script such as this:

Code: Select all

function initialize(box)
end

function uninitialize(box)
end

function process(box)
	while true do
		if (box:get_stimulation_count(1)) then
			box:log("Info", "test")
			box:remove_stimulation(1, 1)
		end
		box:sleep()
	end
end
This program will display a message "test" every time it receives a stimulation. For more info look at the lua box documentation here:
http://openvibe.inria.fr/documentation/ ... lator.html

Cheers
Jozef

Post Reply