<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Requirements for adding ExCon Receiver</title><link>https://sourceforge.net/p/excon/wiki/Requirements%2520for%2520adding%2520ExCon%2520Receiver/</link><description>Recent changes to Requirements for adding ExCon Receiver</description><atom:link href="https://sourceforge.net/p/excon/wiki/Requirements%20for%20adding%20ExCon%20Receiver/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 05 Dec 2013 16:23:50 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/excon/wiki/Requirements%20for%20adding%20ExCon%20Receiver/feed" rel="self" type="application/rss+xml"/><item><title>Requirements for adding ExCon Receiver modified by Chris DeGreef</title><link>https://sourceforge.net/p/excon/wiki/Requirements%2520for%2520adding%2520ExCon%2520Receiver/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The ExCon receiver is a prepackaged class that you simply have to create an instance of, optionally register some commands of your own, and send it the "go" message.&lt;/p&gt;
&lt;p&gt;Create an instance of Receiver by sending it the port number that it will listen on.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;final&lt;/span&gt; &lt;span class="n"&gt;Receiver&lt;/span&gt; &lt;span class="n"&gt;rcvr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Receiver&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2526&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can also create a new Receiver without the port number.  But you must set the port separately before starting the receiver.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;final&lt;/span&gt; &lt;span class="n"&gt;Receiver&lt;/span&gt; &lt;span class="n"&gt;rcvr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Receiver&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;rcvr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setPort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2526&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;At this point you need to register all commands with receiver.  It is only listening otherwise with no knowledge of how to do anything.  Minimally you might want to register all of the default commands.  It doesn't matter what order you register them, the menu will be presented in alphabetic order.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;final&lt;/span&gt; &lt;span class="n"&gt;Receiver&lt;/span&gt; &lt;span class="n"&gt;rcvr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Receiver&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2526&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;rcvr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;registerStandard&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="cm"&gt;/*&lt;/span&gt;
&lt;span class="cm"&gt;* Register any other commands before the go&lt;/span&gt;
&lt;span class="cm"&gt;*/&lt;/span&gt;
&lt;span class="n"&gt;rcvr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;go&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We also added the "go" message in the previous example.  This must be issued after all commands are registered.  Receiver will then start listening to the specified port for the Sender that will be requesting commands that need to be run.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris DeGreef</dc:creator><pubDate>Thu, 05 Dec 2013 16:23:50 -0000</pubDate><guid>https://sourceforge.net0fbac2d1561ad127a86533568bbf73275546be3e</guid></item></channel></rss>