<?xml version="1.0"?>
<pipeline>

	<register>
		<load name="mouse"/>
		<load name="python" />		
		<load name="graphic"/>
	</register>	

	<!-- sensor -->
	<sensor create="Mouse">		
		<output channel="cursor" pin="cursor" />
	</sensor>
	
	<!-- python 
	
		script  = script name (omit .py)
		optsstr = override option provided in the script (getOptions() function)
				  e.g. "global=false" will set option "global" to false (to overide several options separate by ;) 
		syspath = string with directories that will be added to python's syspath (by default ., if several separate by ;)
		
	-->
	
	<!-- output cursor position to console/file -->
	<transformer create="PythonFilter" script="filter" syspath=".">
		<input pin="cursor" frame="0.2s"/>
		<output pin="sum"/>
	</transformer>
	<transformer create="PythonFilter" script="filter_np" syspath=".">
		<input pin="cursor" frame="0.2s"/>
		<output pin="sum_np"/>
	</transformer>
	
	<!-- visualization 	 -->
	<consumer create="SignalPainter:plot" title="CURSOR" size="10.0">
		<input pin="cursor" frame="0.2s" />		
	</consumer>
	<consumer create="SignalPainter:plot-energy" title="SUM" size="10.0">
		<input pin="sum" frame="0.2s" />		
	</consumer>
	<consumer create="SignalPainter:plot-energy" title="SUM (NUMPY)" size="10.0">
		<input pin="sum_np" frame="1" />		
	</consumer>
	
	<!-- decoration -->
	<object create="Decorator" icon="true" title="Pipeline">
		<area pos="0,0,400,600">console</area>
		<area pos="400,0,400,300">plot</area>
		<area pos="400,300,400,300" nv="1">plot-energy*</area>
	</object>

</pipeline>