<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Multiple global events</title>
		<link>http://aseba.wikidot.com/forum/t-1208112/multiple-global-events</link>
		<description>Posts in the discussion thread &quot;Multiple global events&quot; - Only the first global event seems to reach the DBus network. The others don&#039;t.</description>
				<copyright></copyright>
		<lastBuildDate>Tue, 14 Jul 2026 22:36:23 +0000</lastBuildDate>
		
					<item>
				<guid>http://aseba.wikidot.com/forum/t-1208112#post-2301190</guid>
				<title>Re: Multiple global events</title>
				<link>http://aseba.wikidot.com/forum/t-1208112/multiple-global-events#post-2301190</link>
				<description></description>
				<pubDate>Fri, 22 May 2015 19:50:04 +0000</pubDate>
				<wikidot:authorName>binaerbaum</wikidot:authorName>				<wikidot:authorUserId>2158601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>In the end I managed to get it working.</p> <p>Apparently when using the Java DBus bindings the event names are somehow lost. So the following did not work :</p> <div class="code"> <pre><code>eventFilter.ListenEventName(&quot;Event&quot;); //As seen in many examples (e.g. python). This does not work eventFilter.ListenEventName(&quot;ForwardPressed&quot;); //Does not work either</code></pre></div> <p>However referring to event IDs works :</p> <div class="code"> <pre><code>//This works. The order of events reflects the one in Aseba Studio (see first post) eventFilter.ListenEvent(new UInt16(0)); //RightPressed eventFilter.ListenEvent(new UInt16(1)); //LeftPressed eventFilter.ListenEvent(new UInt16(2)); //ForwardPressed eventFilter.ListenEvent(new UInt16(3)); //BackwardPressed</code></pre></div> <p>If someone knows why the event names are lost upon arrival on DBus (they aren't even visible in the <tt>asebamedulla</tt> logs) I'd be interested to know :)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://aseba.wikidot.com/forum/t-1208112#post-2299504</guid>
				<title>Multiple global events</title>
				<link>http://aseba.wikidot.com/forum/t-1208112/multiple-global-events#post-2299504</link>
				<description></description>
				<pubDate>Wed, 20 May 2015 20:10:15 +0000</pubDate>
				<wikidot:authorName>binaerbaum</wikidot:authorName>				<wikidot:authorUserId>2158601</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hello,</p> <p>I have an external program (Java) that runs on a linux machine and listens to global events sent by Thymio-II over DBus (Session) using <tt>asebamedulla</tt>.</p> <p>The Aseba program that runs on Thymio-II is very simple. When each of the 4 direction buttons (forward, backward, left, right) is pressed a global event is emitted.</p> <div class="code"> <pre><code>onevent button.left emit LeftPressed onevent button.right emit RightPressed onevent button.backward emit BackwardPressed onevent button.forward emit ForwardPressed</code></pre></div> <p>The global events are defined in Aseba Studio in the following order:</p> <div class="code"> <pre><code>RightPressed LeftPressed ForwardPressed BackwardPressed</code></pre></div> <p>The problems that I am facing right now are :</p> <ol> <li>Only the first defined event (in this case <tt>RightPressed</tt>) is visible on DBus. If I define <tt>ForwardPressed</tt> first in Aseba Studio then only this event will be visible on DBus&#8230;.</li> <li>All 4 events are visible in Aseba Studio, but only the first on DBus ..</li> <li>The event name is lost when it arrives on DBus, all I see is a question mark &quot;?&quot; as can be seen in the output of the <tt>dbus-monitor</tt> command</li> </ol> <div class="code"> <pre><code>#A RightPressed global event signal on DBus signal sender=:1.144 -&gt; dest=(null destination) serial=42 path=/events_filters/0; interface=ch.epfl.mobots.EventFilter; member=Event uint16 0 string &quot;?&quot; #This should be RightPressed array [ ]</code></pre></div> <p>While the output of <tt>asebamedulla -v -d &quot;ser:name=Thymio-II&quot;</tt> does show a message for each button pressed. But only one seems to go through DBus &#8230;</p> <div class="code"> <pre><code>[Wed May 20 21:45:19 2015 099] 0 user message from 1 : user message of size 0 : #This is a RightPressed event. It is visible on Dbus #The following are NOT visible on DBus [Wed May 20 21:45:20 2015 082] 0x1 user message from 1 : user message of size 0 : #This is a LeftPressed event [Wed May 20 21:45:23 2015 175] 0x2 user message from 1 : user message of size 0 : #This is a ForwardPressed event [Wed May 20 21:45:23 2015 769] 0x3 user message from 1 : user message of size 0 : #This is a BackwardPressed event</code></pre></div> <p>I have read what documentation I could find including the paper &quot;<strong>Aseba meets DBus</strong>&quot;, I also had a look at the python code examples.</p> <p>In the program I do create an <tt>EvenFilter</tt> and I do receive the signals for <strong>one</strong> of the global events.</p> <p>It looks like I'm missing a subscription to the other global events, but I don't know how ?</p> <p>I also don't understand why the event's name is lost in the DBus signal ?</p> <p>Any help will greately be appreciated.</p> <p>My aim is to contribute a Java client, I'm almost there :)</p> <p>P.S. Une réponse en français me convient parfaitement :)</p> <p>Merci d'avance !</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>