<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.rifidi.net/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.rifidi.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stefan</id>
		<title>RifidiWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.rifidi.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stefan"/>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Special:Contributions/Stefan"/>
		<updated>2026-05-16T05:00:56Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.1</generator>

	<entry>
		<id>https://wiki.rifidi.net/index.php/READERNAME_ReaderModuleSuspendPowerState.java</id>
		<title>READERNAME ReaderModuleSuspendPowerState.java</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/READERNAME_ReaderModuleSuspendPowerState.java"/>
				<updated>2009-06-10T14:20:55Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* resume */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:developerDoc]][[category:emulatorDoc]]&lt;br /&gt;
This class needs to be implemented for each reader to handle the state transitions from off-&amp;gt;on.  It should extend AbstractSuspendedPowerState.&lt;br /&gt;
&lt;br /&gt;
=resume=&lt;br /&gt;
&lt;br /&gt;
This method should turn the reader and all of its components back on after having been suspended&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;resume(PowerControllable pcObject)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
#pcObject - The ReaderModule&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
This is the implementation of the resume() method in the symbol reader.  It first resumes the communications and the controllers.  Then it changes the power state to the OnPowerSate using the changePowerState method.  If the reader that you are implementing has an autonomous mode, you will need to resume the autonomous mode as well.  See the LLRP reader for an example of that.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	public void resume(PowerControllable pcObject) {&lt;br /&gt;
		SymbolReaderModule rm = (SymbolReaderModule) pcObject;&lt;br /&gt;
&lt;br /&gt;
		rm.getByteComm().resume();&lt;br /&gt;
		rm.getHttpComm().resume();&lt;br /&gt;
&lt;br /&gt;
		rm.getInteractiveBitController().resume();&lt;br /&gt;
		rm.getInteractiveHttpController().resume();&lt;br /&gt;
		&lt;br /&gt;
		SymbolReaderSharedResources ssr = rm.getSharedResources();&lt;br /&gt;
		&lt;br /&gt;
		ssr.getTagMemory().resume();&lt;br /&gt;
&lt;br /&gt;
		rm.changePowerState(SymbolReaderModuleOnPowerState.getInstance());&lt;br /&gt;
		&lt;br /&gt;
		String readername = rm.getSharedResources().getReaderName();&lt;br /&gt;
		LogFactory.getLog(&amp;quot;console.&amp;quot; + readername).info(readername + &amp;quot; resumed&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=turnOff=&lt;br /&gt;
&lt;br /&gt;
See [[READERNAME_ReaderModuleOnPowerState.java#turnOff]]&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Reader_Guides</id>
		<title>Reader Guides</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Reader_Guides"/>
				<updated>2009-06-09T09:26:39Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Virtual RFID Reader User's guides */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Virtual RFID Reader User's guides=&lt;br /&gt;
The following pages contain information about how to use and develop with specific virtual readers.&lt;br /&gt;
*[[LLRP_Reader |LLRP Reader]] &lt;br /&gt;
*[[Alien 9800]]&lt;br /&gt;
*[[Symbol XR440]]&lt;br /&gt;
*[[Awid MPR ]]&lt;br /&gt;
*[[EPC Reader| EPC V1.1 ]]&lt;br /&gt;
*[[ThingMagic]]&lt;br /&gt;
*[[Sirit INfinity510|Sirit INfinity510 (work in progress)]]&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Sirit_Example_Client</id>
		<title>Sirit Example Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Sirit_Example_Client"/>
				<updated>2009-05-27T14:01:55Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This class shows how to create a program to talk to the Sirit INfinity 510 reader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 *  SimpleSiritClient.java&lt;br /&gt;
 *&lt;br /&gt;
 *  Created:	27.05.2009&lt;br /&gt;
 *  Project:	RiFidi SiritClient&lt;br /&gt;
 *  				http://www.rifidi.org&lt;br /&gt;
 *  				http://rifidi.sourceforge.net&lt;br /&gt;
 *  Copyright:	Pramari LLC and the Rifidi Project&lt;br /&gt;
 *  License:	Lesser GNU Public License (LGPL)&lt;br /&gt;
 *  				http://www.opensource.org/licenses/lgpl-license.html&lt;br /&gt;
 *	Author:		Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 */&lt;br /&gt;
package sandbox;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
import java.net.Socket;&lt;br /&gt;
import java.util.concurrent.Callable;&lt;br /&gt;
import java.util.concurrent.ExecutorService;&lt;br /&gt;
import java.util.concurrent.Executors;&lt;br /&gt;
import java.util.concurrent.Future;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * @author Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
public class SimpleSiritClient {&lt;br /&gt;
&lt;br /&gt;
	String ipAddress = &amp;quot;192.168.11.130&amp;quot;;&lt;br /&gt;
	Socket sock;&lt;br /&gt;
	int port = 50007;&lt;br /&gt;
	BufferedReader reader;&lt;br /&gt;
	PrintWriter writer;&lt;br /&gt;
&lt;br /&gt;
	Future&amp;lt;String&amp;gt; future;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param args&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		SimpleSiritClient client = new SimpleSiritClient();&lt;br /&gt;
		client.go();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * executes the application&lt;br /&gt;
	 */&lt;br /&gt;
	public void go() {&lt;br /&gt;
&lt;br /&gt;
		setUpNetworking();&lt;br /&gt;
&lt;br /&gt;
		String command = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		// Login to reader&lt;br /&gt;
		command = &amp;quot;reader.login(login=admin,pwd=readeradmin)&amp;quot;;&lt;br /&gt;
		processCommand(command);&lt;br /&gt;
&lt;br /&gt;
		// let the reader scan for tags for 3 seconds&lt;br /&gt;
		command = &amp;quot;tag.db.scan_tags(3000)&amp;quot;;&lt;br /&gt;
		processCommand(command);&lt;br /&gt;
&lt;br /&gt;
		tearDown();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * initializes the connection&lt;br /&gt;
	 */&lt;br /&gt;
	public void setUpNetworking() {&lt;br /&gt;
		try {&lt;br /&gt;
			// connection for submitting commands&lt;br /&gt;
			sock = new Socket(this.ipAddress, this.port);&lt;br /&gt;
			reader = new BufferedReader(new InputStreamReader(sock&lt;br /&gt;
					.getInputStream()));&lt;br /&gt;
			writer = new PrintWriter(sock.getOutputStream());&lt;br /&gt;
		} catch (IOException ex) {&lt;br /&gt;
			ex.printStackTrace();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * closes the connection&lt;br /&gt;
	 */&lt;br /&gt;
	public void tearDown() {&lt;br /&gt;
		try {&lt;br /&gt;
			sock.close();&lt;br /&gt;
		} catch (IOException ex) {&lt;br /&gt;
			ex.printStackTrace();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * process command, get response and write to log&lt;br /&gt;
	 */&lt;br /&gt;
	public void processCommand(String command) {&lt;br /&gt;
&lt;br /&gt;
		// create callable to read response&lt;br /&gt;
		ExecutorService pool = Executors.newFixedThreadPool(2);&lt;br /&gt;
		// Callable for Commandchannel&lt;br /&gt;
		Callable&amp;lt;String&amp;gt; callable = new IncomingCallable();&lt;br /&gt;
		future = pool.submit(callable);&lt;br /&gt;
&lt;br /&gt;
		// send command to reader&lt;br /&gt;
		sendCommand(command);&lt;br /&gt;
&lt;br /&gt;
		// write to log window&lt;br /&gt;
		System.out.println(&amp;quot;&amp;gt;&amp;gt;&amp;quot; + command + &amp;quot;\r\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// receive and write response&lt;br /&gt;
		System.out.println(getLastResponse());&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * sends command to reader&lt;br /&gt;
	 */&lt;br /&gt;
	public void sendCommand(String command) {&lt;br /&gt;
		// send command to reader&lt;br /&gt;
		writer.print(command + &amp;quot;\r\n&amp;quot;);&lt;br /&gt;
		writer.flush();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * waits for and returns the reader's response&lt;br /&gt;
	 */&lt;br /&gt;
	public String getLastResponse() {&lt;br /&gt;
		String response = &amp;quot;&amp;quot;;&lt;br /&gt;
		try {&lt;br /&gt;
			response = future.get();&lt;br /&gt;
		} catch (Exception e) {&lt;br /&gt;
			e.printStackTrace();&lt;br /&gt;
		}&lt;br /&gt;
		return response;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public class IncomingCallable implements Callable&amp;lt;String&amp;gt; {&lt;br /&gt;
		PrintWriter writer;&lt;br /&gt;
		String command;&lt;br /&gt;
&lt;br /&gt;
		public String call() {&lt;br /&gt;
			// get response&lt;br /&gt;
			String message = &amp;quot;&amp;quot;;&lt;br /&gt;
			String lastResponse = &amp;quot;&amp;quot;;&lt;br /&gt;
			try {&lt;br /&gt;
				while (lastResponse.indexOf(&amp;quot;\r\n\r\n&amp;quot;) == -1) {&lt;br /&gt;
					message = reader.readLine();&lt;br /&gt;
					message = message.replace(&amp;quot;\r&amp;quot;, &amp;quot;&amp;quot;).replace(&amp;quot;\n&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
							+ &amp;quot;\r\n&amp;quot;;&lt;br /&gt;
					lastResponse = lastResponse.concat(message);&lt;br /&gt;
				}&lt;br /&gt;
			} catch (Exception ex) {&lt;br /&gt;
				ex.printStackTrace();&lt;br /&gt;
			}&lt;br /&gt;
			return lastResponse;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Sirit_Example_Client</id>
		<title>Sirit Example Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Sirit_Example_Client"/>
				<updated>2009-05-27T13:59:41Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This class shows how to create a program to talk to the Sirit INfinity 510 reader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 *  SimpleSiritClientNoGUI.java&lt;br /&gt;
 *&lt;br /&gt;
 *  Created:	27.05.2009&lt;br /&gt;
 *  Project:	RiFidi SiritClient&lt;br /&gt;
 *  				http://www.rifidi.org&lt;br /&gt;
 *  				http://rifidi.sourceforge.net&lt;br /&gt;
 *  Copyright:	Pramari LLC and the Rifidi Project&lt;br /&gt;
 *  License:	Lesser GNU Public License (LGPL)&lt;br /&gt;
 *  				http://www.opensource.org/licenses/lgpl-license.html&lt;br /&gt;
 *	Author:		Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 */&lt;br /&gt;
package sandbox;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
import java.net.Socket;&lt;br /&gt;
import java.util.concurrent.Callable;&lt;br /&gt;
import java.util.concurrent.ExecutorService;&lt;br /&gt;
import java.util.concurrent.Executors;&lt;br /&gt;
import java.util.concurrent.Future;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * @author Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
public class SimpleSiritClientNoGUI {&lt;br /&gt;
&lt;br /&gt;
	String ipAddress = &amp;quot;192.168.11.130&amp;quot;;&lt;br /&gt;
	Socket sock;&lt;br /&gt;
	int port = 50007;&lt;br /&gt;
	BufferedReader reader;&lt;br /&gt;
	PrintWriter writer;&lt;br /&gt;
&lt;br /&gt;
	Future&amp;lt;String&amp;gt; future;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * @param args&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		SimpleSiritClientNoGUI client = new SimpleSiritClientNoGUI();&lt;br /&gt;
		client.go();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * executes the application&lt;br /&gt;
	 */&lt;br /&gt;
	public void go() {&lt;br /&gt;
&lt;br /&gt;
		setUpNetworking();&lt;br /&gt;
&lt;br /&gt;
		String command = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
		// Login to reader&lt;br /&gt;
		command = &amp;quot;reader.login(login=admin,pwd=readeradmin)&amp;quot;;&lt;br /&gt;
		processCommand(command);&lt;br /&gt;
&lt;br /&gt;
		// let the reader scan for tags for 3 seconds&lt;br /&gt;
		command = &amp;quot;tag.db.scan_tags(3000)&amp;quot;;&lt;br /&gt;
		processCommand(command);&lt;br /&gt;
&lt;br /&gt;
		tearDown();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * initializes the connection&lt;br /&gt;
	 */&lt;br /&gt;
	public void setUpNetworking() {&lt;br /&gt;
		try {&lt;br /&gt;
			// connection for submitting commands&lt;br /&gt;
			sock = new Socket(this.ipAddress, this.port);&lt;br /&gt;
			reader = new BufferedReader(new InputStreamReader(sock&lt;br /&gt;
					.getInputStream()));&lt;br /&gt;
			writer = new PrintWriter(sock.getOutputStream());&lt;br /&gt;
		} catch (IOException ex) {&lt;br /&gt;
			ex.printStackTrace();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * closes the connection&lt;br /&gt;
	 */&lt;br /&gt;
	public void tearDown() {&lt;br /&gt;
		try {&lt;br /&gt;
			sock.close();&lt;br /&gt;
		} catch (IOException ex) {&lt;br /&gt;
			ex.printStackTrace();&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * process command, get response and write to log&lt;br /&gt;
	 */&lt;br /&gt;
	public void processCommand(String command) {&lt;br /&gt;
&lt;br /&gt;
		// create callable to read response&lt;br /&gt;
		ExecutorService pool = Executors.newFixedThreadPool(2);&lt;br /&gt;
		// Callable for Commandchannel&lt;br /&gt;
		Callable&amp;lt;String&amp;gt; callable = new IncomingCallable();&lt;br /&gt;
		future = pool.submit(callable);&lt;br /&gt;
&lt;br /&gt;
		// send command to reader&lt;br /&gt;
		sendCommand(command);&lt;br /&gt;
&lt;br /&gt;
		// write to log window&lt;br /&gt;
		System.out.println(&amp;quot;&amp;gt;&amp;gt;&amp;quot; + command + &amp;quot;\r\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
		// receive and write response&lt;br /&gt;
		System.out.println(getLastResponse());&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * sends command to reader&lt;br /&gt;
	 */&lt;br /&gt;
	public void sendCommand(String command) {&lt;br /&gt;
		// send command to reader&lt;br /&gt;
		writer.print(command + &amp;quot;\r\n&amp;quot;);&lt;br /&gt;
		writer.flush();&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * waits for the reader's response&lt;br /&gt;
	 */&lt;br /&gt;
	public String getLastResponse() {&lt;br /&gt;
		String response = &amp;quot;&amp;quot;;&lt;br /&gt;
		try {&lt;br /&gt;
			response = future.get();&lt;br /&gt;
		} catch (Exception e) {&lt;br /&gt;
			e.printStackTrace();&lt;br /&gt;
		}&lt;br /&gt;
		return response;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	public class IncomingCallable implements Callable&amp;lt;String&amp;gt; {&lt;br /&gt;
		PrintWriter writer;&lt;br /&gt;
		String command;&lt;br /&gt;
&lt;br /&gt;
		public String call() {&lt;br /&gt;
			// get response&lt;br /&gt;
			String message = &amp;quot;&amp;quot;;&lt;br /&gt;
			String lastResponse = &amp;quot;&amp;quot;;&lt;br /&gt;
			try {&lt;br /&gt;
				while (lastResponse.indexOf(&amp;quot;\r\n\r\n&amp;quot;) == -1) {&lt;br /&gt;
					message = reader.readLine();&lt;br /&gt;
					message = message.replace(&amp;quot;\r&amp;quot;, &amp;quot;&amp;quot;).replace(&amp;quot;\n&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
							+ &amp;quot;\r\n&amp;quot;;&lt;br /&gt;
					lastResponse = lastResponse.concat(message);&lt;br /&gt;
				}&lt;br /&gt;
			} catch (Exception ex) {&lt;br /&gt;
				ex.printStackTrace();&lt;br /&gt;
			}&lt;br /&gt;
			return lastResponse;&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Sirit_Example_Client_RAPID</id>
		<title>Sirit Example Client RAPID</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Sirit_Example_Client_RAPID"/>
				<updated>2009-05-27T12:29:46Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: New page: This class shows how to create a program to talk to the Sirit INfinity 510 reader with the use of Sirit's RAPID API.  &amp;lt;pre&amp;gt; /*  *  SiritClientRAPID.java  *  *  Created:	07.05.2009  *  Proj...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This class shows how to create a program to talk to the Sirit INfinity 510 reader with the use of Sirit's RAPID API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 *  SiritClientRAPID.java&lt;br /&gt;
 *&lt;br /&gt;
 *  Created:	07.05.2009&lt;br /&gt;
 *  Project:	RiFidi SiritClient&lt;br /&gt;
 *  				http://www.rifidi.org&lt;br /&gt;
 *  				http://rifidi.sourceforge.net&lt;br /&gt;
 *  Copyright:	Pramari LLC and the Rifidi Project&lt;br /&gt;
 *  License:	Lesser GNU Public License (LGPL)&lt;br /&gt;
 *  				http://www.opensource.org/licenses/lgpl-license.html&lt;br /&gt;
 *  Author:	Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 */&lt;br /&gt;
package sandbox;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * This class shows how to create a program to talk to the Sirit INfinity 510 reader&lt;br /&gt;
 * with the use of Sirit's RAPID API.&lt;br /&gt;
 *&lt;br /&gt;
 * @author Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import com.sirit.data.DataManager;&lt;br /&gt;
import com.sirit.driver.IEventListener;&lt;br /&gt;
import com.sirit.mapping.EventInfo;&lt;br /&gt;
import com.sirit.mapping.InfoManager;&lt;br /&gt;
import com.sirit.mapping.ReaderManager;&lt;br /&gt;
import com.sirit.mapping.SetupManager;&lt;br /&gt;
import com.sirit.mapping.TagManager;&lt;br /&gt;
import com.sirit.mapping.TagResponse;&lt;br /&gt;
import com.sirit.mapping.TagResponseList;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.io.OutputStreamWriter;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
import java.net.Socket;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class SiritClientRAPID implements IEventListener {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * IP Address of the reader&lt;br /&gt;
	 */&lt;br /&gt;
	private String ipAddress = &amp;quot;192.168.11.130&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID() {&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor - with IP Address&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param ipAddr&lt;br /&gt;
	 *            IP Address for the reader&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID(String ipAddress) {&lt;br /&gt;
		super();&lt;br /&gt;
		this.ipAddress = ipAddress;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Executes the application&lt;br /&gt;
	 */&lt;br /&gt;
	public void run() {&lt;br /&gt;
		try {&lt;br /&gt;
			long startTime = System.currentTimeMillis();&lt;br /&gt;
&lt;br /&gt;
			// Open a connection to the reader&lt;br /&gt;
			DataManager dataManager = new DataManager(&lt;br /&gt;
					DataManager.ConnectionTypes.SOCKET, ipAddress, 0);&lt;br /&gt;
			dataManager.open();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Opened&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Get the reader's name&lt;br /&gt;
			InfoManager infoManager = new InfoManager(dataManager);&lt;br /&gt;
			String v = infoManager.getName();&lt;br /&gt;
			System.out.println(&amp;quot;Name: &amp;quot; + v);&lt;br /&gt;
			infoManager = null;&lt;br /&gt;
&lt;br /&gt;
			// Login as administrator&lt;br /&gt;
			ReaderManager readerManager = new ReaderManager(dataManager);&lt;br /&gt;
			if (!readerManager.login(&amp;quot;admin&amp;quot;, &amp;quot;readeradmin&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Login attempt failed: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			v = readerManager.whoAmI();&lt;br /&gt;
			System.out.println(&amp;quot;Login: &amp;quot; + v);&lt;br /&gt;
&lt;br /&gt;
			// Open an event channel and get it's ID&lt;br /&gt;
			String id = dataManager.getEventChannel(this);&lt;br /&gt;
			System.out.println(&amp;quot;Event Channel ID: &amp;quot; + id);&lt;br /&gt;
&lt;br /&gt;
			// Register for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsRegister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to register for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Registered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to active&lt;br /&gt;
			SetupManager setupManager = new SetupManager(dataManager);&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.ACTIVE);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Active for 5 seconds&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Sleep while handling tag events&lt;br /&gt;
			Thread.sleep(5000);&lt;br /&gt;
&lt;br /&gt;
			// Unregister for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsUnregister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to unregister for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Unregistered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to standby&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.STANDBY);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Standby&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// List the TagDB&lt;br /&gt;
			System.out.println(&amp;quot;Detected Tags:&amp;quot;);&lt;br /&gt;
			TagManager tagManager = new TagManager(dataManager);&lt;br /&gt;
			TagResponseList tagList = tagManager.dbGet(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			TagResponse tagResponse;&lt;br /&gt;
			for (int tagResponseID = 0; tagResponseID &amp;lt; tagList.getCount(); tagResponseID++) {&lt;br /&gt;
				tagResponse = tagList.getTagResponse(tagResponseID);&lt;br /&gt;
				System.out.println(&amp;quot;TagID: &amp;quot; + tagResponse.getTagId());&lt;br /&gt;
				System.out.println(&amp;quot;\tAntenna: &amp;quot; + tagResponse.getAntenna());&lt;br /&gt;
				System.out.println(&amp;quot;\tCount: &amp;quot; + tagResponse.getRepeat());&lt;br /&gt;
				System.out.println(&amp;quot;\t1st Time: &amp;quot; + tagResponse.getFirst());&lt;br /&gt;
				System.out.println(&amp;quot;\tLast Time: &amp;quot; + tagResponse.getLast());&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Close the connection&lt;br /&gt;
			setupManager = null;&lt;br /&gt;
			readerManager = null;&lt;br /&gt;
			dataManager.close();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Closed&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Output the time to execute application&lt;br /&gt;
			long endTime = System.currentTimeMillis();&lt;br /&gt;
			long t = endTime - startTime - 500;&lt;br /&gt;
			System.out.println(&amp;quot;Estimated Time: &amp;quot; + t + &amp;quot;(ms)&amp;quot;);&lt;br /&gt;
		} catch (Exception e) {&lt;br /&gt;
			System.out.println(&amp;quot;Error: &amp;quot; + e.getMessage());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main method for this demo application&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param args&lt;br /&gt;
	 *            Command line arguments first argument -IP Address of the&lt;br /&gt;
	 *            reader (optional)&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		// Create SiritClient object&lt;br /&gt;
		SiritClientRAPID scApp;&lt;br /&gt;
		if (args.length &amp;gt; 0)&lt;br /&gt;
			scApp = new SiritClientRAPID(args[0]);&lt;br /&gt;
		else&lt;br /&gt;
			scApp = new SiritClientRAPID();&lt;br /&gt;
&lt;br /&gt;
		// Execute the application&lt;br /&gt;
		scApp.run();&lt;br /&gt;
		System.out.println(&amp;quot;Exiting&amp;quot;);&lt;br /&gt;
		System.exit(0);&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Handler&lt;br /&gt;
	 */&lt;br /&gt;
	public void EventFound(Object sender, EventInfo eventInfo) {&lt;br /&gt;
		String tagID = eventInfo&lt;br /&gt;
				.getParameter(EventInfo.EVENT_TAG_ARRIVE_PARAMS.TAG_ID);&lt;br /&gt;
		System.out.println(&amp;quot;Tag ID: &amp;quot; + tagID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Sirit_Example_Client</id>
		<title>Sirit Example Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Sirit_Example_Client"/>
				<updated>2009-05-27T12:26:39Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This class shows how to create a program to talk to the Sirit INfinity 510 reader with the use of Sirit's RAPID API.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 *  SiritClientRAPID.java&lt;br /&gt;
 *&lt;br /&gt;
 *  Created:	07.05.2009&lt;br /&gt;
 *  Project:	RiFidi SiritClient&lt;br /&gt;
 *  				http://www.rifidi.org&lt;br /&gt;
 *  				http://rifidi.sourceforge.net&lt;br /&gt;
 *  Copyright:	Pramari LLC and the Rifidi Project&lt;br /&gt;
 *  License:	Lesser GNU Public License (LGPL)&lt;br /&gt;
 *  				http://www.opensource.org/licenses/lgpl-license.html&lt;br /&gt;
 *  Author:	Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 */&lt;br /&gt;
package sandbox;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * This class shows how to create a program to talk to the Sirit INfinity 510 reader&lt;br /&gt;
 * with the use of Sirit's RAPID API.&lt;br /&gt;
 *&lt;br /&gt;
 * @author Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import com.sirit.data.DataManager;&lt;br /&gt;
import com.sirit.driver.IEventListener;&lt;br /&gt;
import com.sirit.mapping.EventInfo;&lt;br /&gt;
import com.sirit.mapping.InfoManager;&lt;br /&gt;
import com.sirit.mapping.ReaderManager;&lt;br /&gt;
import com.sirit.mapping.SetupManager;&lt;br /&gt;
import com.sirit.mapping.TagManager;&lt;br /&gt;
import com.sirit.mapping.TagResponse;&lt;br /&gt;
import com.sirit.mapping.TagResponseList;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.io.OutputStreamWriter;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
import java.net.Socket;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class SiritClientRAPID implements IEventListener {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * IP Address of the reader&lt;br /&gt;
	 */&lt;br /&gt;
	private String ipAddress = &amp;quot;192.168.11.130&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID() {&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor - with IP Address&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param ipAddr&lt;br /&gt;
	 *            IP Address for the reader&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID(String ipAddress) {&lt;br /&gt;
		super();&lt;br /&gt;
		this.ipAddress = ipAddress;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Executes the application&lt;br /&gt;
	 */&lt;br /&gt;
	public void run() {&lt;br /&gt;
		try {&lt;br /&gt;
			long startTime = System.currentTimeMillis();&lt;br /&gt;
&lt;br /&gt;
			// Open a connection to the reader&lt;br /&gt;
			DataManager dataManager = new DataManager(&lt;br /&gt;
					DataManager.ConnectionTypes.SOCKET, ipAddress, 0);&lt;br /&gt;
			dataManager.open();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Opened&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Get the reader's name&lt;br /&gt;
			InfoManager infoManager = new InfoManager(dataManager);&lt;br /&gt;
			String v = infoManager.getName();&lt;br /&gt;
			System.out.println(&amp;quot;Name: &amp;quot; + v);&lt;br /&gt;
			infoManager = null;&lt;br /&gt;
&lt;br /&gt;
			// Login as administrator&lt;br /&gt;
			ReaderManager readerManager = new ReaderManager(dataManager);&lt;br /&gt;
			if (!readerManager.login(&amp;quot;admin&amp;quot;, &amp;quot;readeradmin&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Login attempt failed: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			v = readerManager.whoAmI();&lt;br /&gt;
			System.out.println(&amp;quot;Login: &amp;quot; + v);&lt;br /&gt;
&lt;br /&gt;
			// Open an event channel and get it's ID&lt;br /&gt;
			String id = dataManager.getEventChannel(this);&lt;br /&gt;
			System.out.println(&amp;quot;Event Channel ID: &amp;quot; + id);&lt;br /&gt;
&lt;br /&gt;
			// Register for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsRegister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to register for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Registered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to active&lt;br /&gt;
			SetupManager setupManager = new SetupManager(dataManager);&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.ACTIVE);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Active for 5 seconds&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Sleep while handling tag events&lt;br /&gt;
			Thread.sleep(5000);&lt;br /&gt;
&lt;br /&gt;
			// Unregister for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsUnregister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to unregister for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Unregistered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to standby&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.STANDBY);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Standby&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// List the TagDB&lt;br /&gt;
			System.out.println(&amp;quot;Detected Tags:&amp;quot;);&lt;br /&gt;
			TagManager tagManager = new TagManager(dataManager);&lt;br /&gt;
			TagResponseList tagList = tagManager.dbGet(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			TagResponse tagResponse;&lt;br /&gt;
			for (int tagResponseID = 0; tagResponseID &amp;lt; tagList.getCount(); tagResponseID++) {&lt;br /&gt;
				tagResponse = tagList.getTagResponse(tagResponseID);&lt;br /&gt;
				System.out.println(&amp;quot;TagID: &amp;quot; + tagResponse.getTagId());&lt;br /&gt;
				System.out.println(&amp;quot;\tAntenna: &amp;quot; + tagResponse.getAntenna());&lt;br /&gt;
				System.out.println(&amp;quot;\tCount: &amp;quot; + tagResponse.getRepeat());&lt;br /&gt;
				System.out.println(&amp;quot;\t1st Time: &amp;quot; + tagResponse.getFirst());&lt;br /&gt;
				System.out.println(&amp;quot;\tLast Time: &amp;quot; + tagResponse.getLast());&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Close the connection&lt;br /&gt;
			setupManager = null;&lt;br /&gt;
			readerManager = null;&lt;br /&gt;
			dataManager.close();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Closed&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Output the time to execute application&lt;br /&gt;
			long endTime = System.currentTimeMillis();&lt;br /&gt;
			long t = endTime - startTime - 500;&lt;br /&gt;
			System.out.println(&amp;quot;Estimated Time: &amp;quot; + t + &amp;quot;(ms)&amp;quot;);&lt;br /&gt;
		} catch (Exception e) {&lt;br /&gt;
			System.out.println(&amp;quot;Error: &amp;quot; + e.getMessage());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main method for this demo application&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param args&lt;br /&gt;
	 *            Command line arguments first argument -IP Address of the&lt;br /&gt;
	 *            reader (optional)&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		// Create SiritClient object&lt;br /&gt;
		SiritClientRAPID scApp;&lt;br /&gt;
		if (args.length &amp;gt; 0)&lt;br /&gt;
			scApp = new SiritClientRAPID(args[0]);&lt;br /&gt;
		else&lt;br /&gt;
			scApp = new SiritClientRAPID();&lt;br /&gt;
&lt;br /&gt;
		// Execute the application&lt;br /&gt;
		scApp.run();&lt;br /&gt;
		System.out.println(&amp;quot;Exiting&amp;quot;);&lt;br /&gt;
		System.exit(0);&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Handler&lt;br /&gt;
	 */&lt;br /&gt;
	public void EventFound(Object sender, EventInfo eventInfo) {&lt;br /&gt;
		String tagID = eventInfo&lt;br /&gt;
				.getParameter(EventInfo.EVENT_TAG_ARRIVE_PARAMS.TAG_ID);&lt;br /&gt;
		System.out.println(&amp;quot;Tag ID: &amp;quot; + tagID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Sirit_Example_Client</id>
		<title>Sirit Example Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Sirit_Example_Client"/>
				<updated>2009-05-27T12:21:21Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can see a list of possible alien commands by sending the 'help' command to the alien reader. However, not all of these commands are implemented in rifidi. See this [[Sirit_INfinity510#Supported Commands | List of supported commands]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 *  SiritClientRAPID.java&lt;br /&gt;
 *&lt;br /&gt;
 *  Created:	07.05.2009&lt;br /&gt;
 *  Project:	RiFidi SiritClient&lt;br /&gt;
 *  				http://www.rifidi.org&lt;br /&gt;
 *  				http://rifidi.sourceforge.net&lt;br /&gt;
 *  Copyright:	Pramari LLC and the Rifidi Project&lt;br /&gt;
 *  License:	Lesser GNU Public License (LGPL)&lt;br /&gt;
 *  				http://www.opensource.org/licenses/lgpl-license.html&lt;br /&gt;
 *  Author:	Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 */&lt;br /&gt;
package sandbox;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * This class shows how to create a program to talk to the Sirit INfinity 510 reader&lt;br /&gt;
 * with the use of Sirit's RAPID API.&lt;br /&gt;
 *&lt;br /&gt;
 * @author Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import com.sirit.data.DataManager;&lt;br /&gt;
import com.sirit.driver.IEventListener;&lt;br /&gt;
import com.sirit.mapping.EventInfo;&lt;br /&gt;
import com.sirit.mapping.InfoManager;&lt;br /&gt;
import com.sirit.mapping.ReaderManager;&lt;br /&gt;
import com.sirit.mapping.SetupManager;&lt;br /&gt;
import com.sirit.mapping.TagManager;&lt;br /&gt;
import com.sirit.mapping.TagResponse;&lt;br /&gt;
import com.sirit.mapping.TagResponseList;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.io.OutputStreamWriter;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
import java.net.Socket;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class SiritClientRAPID implements IEventListener {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * IP Address of the reader&lt;br /&gt;
	 */&lt;br /&gt;
	private String ipAddress = &amp;quot;192.168.11.130&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID() {&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor - with IP Address&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param ipAddr&lt;br /&gt;
	 *            IP Address for the reader&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID(String ipAddress) {&lt;br /&gt;
		super();&lt;br /&gt;
		this.ipAddress = ipAddress;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Executes the application&lt;br /&gt;
	 */&lt;br /&gt;
	public void run() {&lt;br /&gt;
		try {&lt;br /&gt;
			long startTime = System.currentTimeMillis();&lt;br /&gt;
&lt;br /&gt;
			// Open a connection to the reader&lt;br /&gt;
			DataManager dataManager = new DataManager(&lt;br /&gt;
					DataManager.ConnectionTypes.SOCKET, ipAddress, 0);&lt;br /&gt;
			dataManager.open();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Opened&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Get the reader's name&lt;br /&gt;
			InfoManager infoManager = new InfoManager(dataManager);&lt;br /&gt;
			String v = infoManager.getName();&lt;br /&gt;
			System.out.println(&amp;quot;Name: &amp;quot; + v);&lt;br /&gt;
			infoManager = null;&lt;br /&gt;
&lt;br /&gt;
			// Login as administrator&lt;br /&gt;
			ReaderManager readerManager = new ReaderManager(dataManager);&lt;br /&gt;
			if (!readerManager.login(&amp;quot;admin&amp;quot;, &amp;quot;readeradmin&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Login attempt failed: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			v = readerManager.whoAmI();&lt;br /&gt;
			System.out.println(&amp;quot;Login: &amp;quot; + v);&lt;br /&gt;
&lt;br /&gt;
			// Open an event channel and get it's ID&lt;br /&gt;
			String id = dataManager.getEventChannel(this);&lt;br /&gt;
			System.out.println(&amp;quot;Event Channel ID: &amp;quot; + id);&lt;br /&gt;
&lt;br /&gt;
			// Register for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsRegister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to register for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Registered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to active&lt;br /&gt;
			SetupManager setupManager = new SetupManager(dataManager);&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.ACTIVE);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Active for 5 seconds&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Sleep while handling tag events&lt;br /&gt;
			Thread.sleep(5000);&lt;br /&gt;
&lt;br /&gt;
			// Unregister for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsUnregister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to unregister for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Unregistered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to standby&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.STANDBY);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Standby&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// List the TagDB&lt;br /&gt;
			System.out.println(&amp;quot;Detected Tags:&amp;quot;);&lt;br /&gt;
			TagManager tagManager = new TagManager(dataManager);&lt;br /&gt;
			TagResponseList tagList = tagManager.dbGet(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			TagResponse tagResponse;&lt;br /&gt;
			for (int tagResponseID = 0; tagResponseID &amp;lt; tagList.getCount(); tagResponseID++) {&lt;br /&gt;
				tagResponse = tagList.getTagResponse(tagResponseID);&lt;br /&gt;
				System.out.println(&amp;quot;TagID: &amp;quot; + tagResponse.getTagId());&lt;br /&gt;
				System.out.println(&amp;quot;\tAntenna: &amp;quot; + tagResponse.getAntenna());&lt;br /&gt;
				System.out.println(&amp;quot;\tCount: &amp;quot; + tagResponse.getRepeat());&lt;br /&gt;
				System.out.println(&amp;quot;\t1st Time: &amp;quot; + tagResponse.getFirst());&lt;br /&gt;
				System.out.println(&amp;quot;\tLast Time: &amp;quot; + tagResponse.getLast());&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Close the connection&lt;br /&gt;
			setupManager = null;&lt;br /&gt;
			readerManager = null;&lt;br /&gt;
			dataManager.close();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Closed&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Output the time to execute application&lt;br /&gt;
			long endTime = System.currentTimeMillis();&lt;br /&gt;
			long t = endTime - startTime - 500;&lt;br /&gt;
			System.out.println(&amp;quot;Estimated Time: &amp;quot; + t + &amp;quot;(ms)&amp;quot;);&lt;br /&gt;
		} catch (Exception e) {&lt;br /&gt;
			System.out.println(&amp;quot;Error: &amp;quot; + e.getMessage());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main method for this demo application&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param args&lt;br /&gt;
	 *            Command line arguments first argument -IP Address of the&lt;br /&gt;
	 *            reader (optional)&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		// Create SiritClient object&lt;br /&gt;
		SiritClientRAPID scApp;&lt;br /&gt;
		if (args.length &amp;gt; 0)&lt;br /&gt;
			scApp = new SiritClientRAPID(args[0]);&lt;br /&gt;
		else&lt;br /&gt;
			scApp = new SiritClientRAPID();&lt;br /&gt;
&lt;br /&gt;
		// Execute the application&lt;br /&gt;
		scApp.run();&lt;br /&gt;
		System.out.println(&amp;quot;Exiting&amp;quot;);&lt;br /&gt;
		System.exit(0);&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Handler&lt;br /&gt;
	 */&lt;br /&gt;
	public void EventFound(Object sender, EventInfo eventInfo) {&lt;br /&gt;
		String tagID = eventInfo&lt;br /&gt;
				.getParameter(EventInfo.EVENT_TAG_ARRIVE_PARAMS.TAG_ID);&lt;br /&gt;
		System.out.println(&amp;quot;Tag ID: &amp;quot; + tagID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Sirit_Example_Client</id>
		<title>Sirit Example Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Sirit_Example_Client"/>
				<updated>2009-05-27T12:20:07Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can see a list of possible alien commands by sending the 'help' command to the alien reader. However, not all of these commands are implemented in rifidi. See this [[Sirit_INfinity510#Supported Commands | List of supported commands]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 *  SiritClientRAPID.java&lt;br /&gt;
 *&lt;br /&gt;
 *  Created:	07.05.2009&lt;br /&gt;
 *  Project:	RiFidi SiritClient&lt;br /&gt;
 *  				http://www.rifidi.org&lt;br /&gt;
 *  				http://rifidi.sourceforge.net&lt;br /&gt;
 *  Copyright:	Pramari LLC and the Rifidi Project&lt;br /&gt;
 *  License:	Lesser GNU Public License (LGPL)&lt;br /&gt;
 *  				http://www.opensource.org/licenses/lgpl-license.html&lt;br /&gt;
 *  Author:	Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 */&lt;br /&gt;
package sandbox;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * @author Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import com.sirit.data.DataManager;&lt;br /&gt;
import com.sirit.driver.IEventListener;&lt;br /&gt;
import com.sirit.mapping.EventInfo;&lt;br /&gt;
import com.sirit.mapping.InfoManager;&lt;br /&gt;
import com.sirit.mapping.ReaderManager;&lt;br /&gt;
import com.sirit.mapping.SetupManager;&lt;br /&gt;
import com.sirit.mapping.TagManager;&lt;br /&gt;
import com.sirit.mapping.TagResponse;&lt;br /&gt;
import com.sirit.mapping.TagResponseList;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.io.OutputStreamWriter;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
import java.net.Socket;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class SiritClientRAPID implements IEventListener {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * IP Address of the reader&lt;br /&gt;
	 */&lt;br /&gt;
	private String ipAddress = &amp;quot;192.168.11.130&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID() {&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor - with IP Address&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param ipAddr&lt;br /&gt;
	 *            IP Address for the reader&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID(String ipAddress) {&lt;br /&gt;
		super();&lt;br /&gt;
		this.ipAddress = ipAddress;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Executes the application&lt;br /&gt;
	 */&lt;br /&gt;
	public void run() {&lt;br /&gt;
		try {&lt;br /&gt;
			long startTime = System.currentTimeMillis();&lt;br /&gt;
&lt;br /&gt;
			// Open a connection to the reader&lt;br /&gt;
			DataManager dataManager = new DataManager(&lt;br /&gt;
					DataManager.ConnectionTypes.SOCKET, ipAddress, 0);&lt;br /&gt;
			dataManager.open();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Opened&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Get the reader's name&lt;br /&gt;
			InfoManager infoManager = new InfoManager(dataManager);&lt;br /&gt;
			String v = infoManager.getName();&lt;br /&gt;
			System.out.println(&amp;quot;Name: &amp;quot; + v);&lt;br /&gt;
			infoManager = null;&lt;br /&gt;
&lt;br /&gt;
			// Login as administrator&lt;br /&gt;
			ReaderManager readerManager = new ReaderManager(dataManager);&lt;br /&gt;
			if (!readerManager.login(&amp;quot;admin&amp;quot;, &amp;quot;readeradmin&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Login attempt failed: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			v = readerManager.whoAmI();&lt;br /&gt;
			System.out.println(&amp;quot;Login: &amp;quot; + v);&lt;br /&gt;
&lt;br /&gt;
			// Open an event channel and get it's ID&lt;br /&gt;
			String id = dataManager.getEventChannel(this);&lt;br /&gt;
			System.out.println(&amp;quot;Event Channel ID: &amp;quot; + id);&lt;br /&gt;
&lt;br /&gt;
			// Register for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsRegister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to register for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Registered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to active&lt;br /&gt;
			SetupManager setupManager = new SetupManager(dataManager);&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.ACTIVE);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Active for 5 seconds&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Sleep while handling tag events&lt;br /&gt;
			Thread.sleep(5000);&lt;br /&gt;
&lt;br /&gt;
			// Unregister for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsUnregister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to unregister for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Unregistered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to standby&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.STANDBY);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Standby&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// List the TagDB&lt;br /&gt;
			System.out.println(&amp;quot;Detected Tags:&amp;quot;);&lt;br /&gt;
			TagManager tagManager = new TagManager(dataManager);&lt;br /&gt;
			TagResponseList tagList = tagManager.dbGet(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			TagResponse tagResponse;&lt;br /&gt;
			for (int tagResponseID = 0; tagResponseID &amp;lt; tagList.getCount(); tagResponseID++) {&lt;br /&gt;
				tagResponse = tagList.getTagResponse(tagResponseID);&lt;br /&gt;
				System.out.println(&amp;quot;TagID: &amp;quot; + tagResponse.getTagId());&lt;br /&gt;
				System.out.println(&amp;quot;\tAntenna: &amp;quot; + tagResponse.getAntenna());&lt;br /&gt;
				System.out.println(&amp;quot;\tCount: &amp;quot; + tagResponse.getRepeat());&lt;br /&gt;
				System.out.println(&amp;quot;\t1st Time: &amp;quot; + tagResponse.getFirst());&lt;br /&gt;
				System.out.println(&amp;quot;\tLast Time: &amp;quot; + tagResponse.getLast());&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Close the connection&lt;br /&gt;
			setupManager = null;&lt;br /&gt;
			readerManager = null;&lt;br /&gt;
			dataManager.close();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Closed&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Output the time to execute application&lt;br /&gt;
			long endTime = System.currentTimeMillis();&lt;br /&gt;
			long t = endTime - startTime - 500;&lt;br /&gt;
			System.out.println(&amp;quot;Estimated Time: &amp;quot; + t + &amp;quot;(ms)&amp;quot;);&lt;br /&gt;
		} catch (Exception e) {&lt;br /&gt;
			System.out.println(&amp;quot;Error: &amp;quot; + e.getMessage());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main method for this demo application&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param args&lt;br /&gt;
	 *            Command line arguments first argument -IP Address of the&lt;br /&gt;
	 *            reader (optional)&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		// Create SiritClient object&lt;br /&gt;
		SiritClientRAPID scApp;&lt;br /&gt;
		if (args.length &amp;gt; 0)&lt;br /&gt;
			scApp = new SiritClientRAPID(args[0]);&lt;br /&gt;
		else&lt;br /&gt;
			scApp = new SiritClientRAPID();&lt;br /&gt;
&lt;br /&gt;
		// Execute the application&lt;br /&gt;
		scApp.run();&lt;br /&gt;
		System.out.println(&amp;quot;Exiting&amp;quot;);&lt;br /&gt;
		System.exit(0);&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Handler&lt;br /&gt;
	 */&lt;br /&gt;
	public void EventFound(Object sender, EventInfo eventInfo) {&lt;br /&gt;
		String tagID = eventInfo&lt;br /&gt;
				.getParameter(EventInfo.EVENT_TAG_ARRIVE_PARAMS.TAG_ID);&lt;br /&gt;
		System.out.println(&amp;quot;Tag ID: &amp;quot; + tagID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Sirit_Example_Client</id>
		<title>Sirit Example Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Sirit_Example_Client"/>
				<updated>2009-05-27T12:15:48Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: New page: You can see a list of possible alien commands by sending the 'help' command to the alien reader. However, not all of these commands are implemented in rifidi. See this [[Sirit_INfinity510#...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can see a list of possible alien commands by sending the 'help' command to the alien reader. However, not all of these commands are implemented in rifidi. See this [[Sirit_INfinity510#Supported Commands | List of supported commands]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 *  SiritClientRAPID.java&lt;br /&gt;
 *&lt;br /&gt;
 *  Created:	07.05.2009&lt;br /&gt;
 *  Project:	RiFidi SiritClient&lt;br /&gt;
 *  				http://www.rifidi.org&lt;br /&gt;
 *  				http://rifidi.sourceforge.net&lt;br /&gt;
 *  Copyright:	Pramari LLC and the Rifidi Project&lt;br /&gt;
 *  License:	Lesser GNU Public License (LGPL)&lt;br /&gt;
 *  				http://www.opensource.org/licenses/lgpl-license.html&lt;br /&gt;
 */&lt;br /&gt;
package sandbox;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * @author Stefan Fahrnbauer - stefan@pramari.com&lt;br /&gt;
 *&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
import com.sirit.data.DataManager;&lt;br /&gt;
import com.sirit.driver.IEventListener;&lt;br /&gt;
import com.sirit.mapping.EventInfo;&lt;br /&gt;
import com.sirit.mapping.InfoManager;&lt;br /&gt;
import com.sirit.mapping.ReaderManager;&lt;br /&gt;
import com.sirit.mapping.SetupManager;&lt;br /&gt;
import com.sirit.mapping.TagManager;&lt;br /&gt;
import com.sirit.mapping.TagResponse;&lt;br /&gt;
import com.sirit.mapping.TagResponseList;&lt;br /&gt;
&lt;br /&gt;
import java.io.BufferedReader;&lt;br /&gt;
import java.io.InputStreamReader;&lt;br /&gt;
import java.io.OutputStreamWriter;&lt;br /&gt;
import java.io.PrintWriter;&lt;br /&gt;
import java.net.Socket;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class SiritClientRAPID implements IEventListener {&lt;br /&gt;
&lt;br /&gt;
	/*&lt;br /&gt;
	 * IP Address of the reader&lt;br /&gt;
	 */&lt;br /&gt;
	private String ipAddress = &amp;quot;192.168.11.130&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID() {&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Constructor - with IP Address&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param ipAddr&lt;br /&gt;
	 *            IP Address for the reader&lt;br /&gt;
	 */&lt;br /&gt;
	public SiritClientRAPID(String ipAddress) {&lt;br /&gt;
		super();&lt;br /&gt;
		this.ipAddress = ipAddress;&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Executes the application&lt;br /&gt;
	 */&lt;br /&gt;
	public void run() {&lt;br /&gt;
		try {&lt;br /&gt;
			long startTime = System.currentTimeMillis();&lt;br /&gt;
&lt;br /&gt;
			// Open a connection to the reader&lt;br /&gt;
			DataManager dataManager = new DataManager(&lt;br /&gt;
					DataManager.ConnectionTypes.SOCKET, ipAddress, 0);&lt;br /&gt;
			dataManager.open();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Opened&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Get the reader's name&lt;br /&gt;
			InfoManager infoManager = new InfoManager(dataManager);&lt;br /&gt;
			String v = infoManager.getName();&lt;br /&gt;
			System.out.println(&amp;quot;Name: &amp;quot; + v);&lt;br /&gt;
			infoManager = null;&lt;br /&gt;
&lt;br /&gt;
			// Login as administrator&lt;br /&gt;
			ReaderManager readerManager = new ReaderManager(dataManager);&lt;br /&gt;
			if (!readerManager.login(&amp;quot;admin&amp;quot;, &amp;quot;readeradmin&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Login attempt failed: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			v = readerManager.whoAmI();&lt;br /&gt;
			System.out.println(&amp;quot;Login: &amp;quot; + v);&lt;br /&gt;
&lt;br /&gt;
			// Open an event channel and get it's ID&lt;br /&gt;
			String id = dataManager.getEventChannel(this);&lt;br /&gt;
			System.out.println(&amp;quot;Event Channel ID: &amp;quot; + id);&lt;br /&gt;
&lt;br /&gt;
			// Register for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsRegister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to register for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Registered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to active&lt;br /&gt;
			SetupManager setupManager = new SetupManager(dataManager);&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.ACTIVE);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Active for 5 seconds&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Sleep while handling tag events&lt;br /&gt;
			Thread.sleep(5000);&lt;br /&gt;
&lt;br /&gt;
			// Unregister for event.tag.report&lt;br /&gt;
			if (!readerManager.eventsUnregister(id, &amp;quot;event.tag.report&amp;quot;))&lt;br /&gt;
				throw new Exception(&amp;quot;Failure to unregister for event: &amp;quot;&lt;br /&gt;
						+ readerManager.getLastErrorMessage());&lt;br /&gt;
			System.out.println(&amp;quot;Unregistered for event.tag.report&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Set operating mode to standby&lt;br /&gt;
			setupManager&lt;br /&gt;
					.setOperatingMode(SetupManager.OPERATING_MODE_TYPES.STANDBY);&lt;br /&gt;
			System.out.println(&amp;quot;Operating Mode: Standby&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// List the TagDB&lt;br /&gt;
			System.out.println(&amp;quot;Detected Tags:&amp;quot;);&lt;br /&gt;
			TagManager tagManager = new TagManager(dataManager);&lt;br /&gt;
			TagResponseList tagList = tagManager.dbGet(&amp;quot;&amp;quot;, &amp;quot;&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			TagResponse tagResponse;&lt;br /&gt;
			for (int tagResponseID = 0; tagResponseID &amp;lt; tagList.getCount(); tagResponseID++) {&lt;br /&gt;
				tagResponse = tagList.getTagResponse(tagResponseID);&lt;br /&gt;
				System.out.println(&amp;quot;TagID: &amp;quot; + tagResponse.getTagId());&lt;br /&gt;
				System.out.println(&amp;quot;\tAntenna: &amp;quot; + tagResponse.getAntenna());&lt;br /&gt;
				System.out.println(&amp;quot;\tCount: &amp;quot; + tagResponse.getRepeat());&lt;br /&gt;
				System.out.println(&amp;quot;\t1st Time: &amp;quot; + tagResponse.getFirst());&lt;br /&gt;
				System.out.println(&amp;quot;\tLast Time: &amp;quot; + tagResponse.getLast());&lt;br /&gt;
&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			// Close the connection&lt;br /&gt;
			setupManager = null;&lt;br /&gt;
			readerManager = null;&lt;br /&gt;
			dataManager.close();&lt;br /&gt;
			System.out.println(&amp;quot;Connection Closed&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
			// Output the time to execute application&lt;br /&gt;
			long endTime = System.currentTimeMillis();&lt;br /&gt;
			long t = endTime - startTime - 500;&lt;br /&gt;
			System.out.println(&amp;quot;Estimated Time: &amp;quot; + t + &amp;quot;(ms)&amp;quot;);&lt;br /&gt;
		} catch (Exception e) {&lt;br /&gt;
			System.out.println(&amp;quot;Error: &amp;quot; + e.getMessage());&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
	/**&lt;br /&gt;
	 * Main method for this demo application&lt;br /&gt;
	 * &lt;br /&gt;
	 * @param args&lt;br /&gt;
	 *            Command line arguments first argument -IP Address of the&lt;br /&gt;
	 *            reader (optional)&lt;br /&gt;
	 */&lt;br /&gt;
	public static void main(String[] args) {&lt;br /&gt;
		// Create SiritClient object&lt;br /&gt;
		SiritClientRAPID scApp;&lt;br /&gt;
		if (args.length &amp;gt; 0)&lt;br /&gt;
			scApp = new SiritClientRAPID(args[0]);&lt;br /&gt;
		else&lt;br /&gt;
			scApp = new SiritClientRAPID();&lt;br /&gt;
&lt;br /&gt;
		// Execute the application&lt;br /&gt;
		scApp.run();&lt;br /&gt;
		System.out.println(&amp;quot;Exiting&amp;quot;);&lt;br /&gt;
		System.exit(0);&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	/**&lt;br /&gt;
	 * Event Handler&lt;br /&gt;
	 */&lt;br /&gt;
	public void EventFound(Object sender, EventInfo eventInfo) {&lt;br /&gt;
		String tagID = eventInfo&lt;br /&gt;
				.getParameter(EventInfo.EVENT_TAG_ARRIVE_PARAMS.TAG_ID);&lt;br /&gt;
		System.out.println(&amp;quot;Tag ID: &amp;quot; + tagID);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Reader_Guides</id>
		<title>Reader Guides</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Reader_Guides"/>
				<updated>2009-05-22T13:02:07Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Virtual RFID Reader User's guides */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Virtual RFID Reader User's guides=&lt;br /&gt;
The following pages contain information about how to use and develop with specific virtual readers.&lt;br /&gt;
*[[LLRP_Reader |LLRP Reader]] &lt;br /&gt;
*[[Alien 9800]]&lt;br /&gt;
*[[Symbol XR440]]&lt;br /&gt;
*[[Awid MPR ]]&lt;br /&gt;
*[[EPC Reader| EPC V1.1 ]]&lt;br /&gt;
*[[ThingMagic]]&lt;br /&gt;
*[[Sirit INfinity510]]&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Package_Structure_for_a_reader_project</id>
		<title>Package Structure for a reader project</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Package_Structure_for_a_reader_project"/>
				<updated>2009-05-06T12:44:50Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* org.rifidi.emulator.reader.READERNAME.command.exception */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:developerDoc]][[category:emulatorDoc]]&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Create a new reader project | this document]] to figure out how to create a new reader project in eclipse&lt;br /&gt;
&lt;br /&gt;
This page enumerates the very basic packages that a reader will need to have and the important files in each one.  Complex readers will have more packages than these, but this is a bare minimum.  These packages correspond with what you will need to program in [[Reader_Development_Stages#Stage_2_Reader_Core_Implementation| stage 2 of reader creation]].&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME==&lt;br /&gt;
This package just contains the osgi activator.  It should be created for you automatically when you create the project.  You have to modify it only to make sure it sets up the reader. [[Reader_Activator.java|Activator.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.command.exception==&lt;br /&gt;
This package contains a file that handles exceptions that occur in the parsing and execution of reader commands.&lt;br /&gt;
*[[READERNAME_ExceptionHandler.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.commandhandler==&lt;br /&gt;
This package contains one or more files that handle incoming reader messages.  Normally commands can be divided into general categories.  For example, with the LLRP reader, there are a set of commands that deal with ROSPec messages (such as ADD_ROSPEC, ENABLE_ROSPEC, etc.) and a separate set of commands that deal with AccessSpec messages (such as ADD_ACCESSSPEC, ENABLE_ACCESSSPEC).  So for the LLRP reader, there is one file called 'LLRPReaderOperationControl.java' that contains the handler methods for ROSpec commands and  a file called 'LLRPAccessControl.java' that contains the handler methods for AccessSpec commands.  &lt;br /&gt;
*[[READERNAME_CATEGORY_Handler.java]]&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.formatter==&lt;br /&gt;
Any kind of formatters used should go into this package.  You will definitely need a formatter that handles the parsing of incoming and outgoing commands called &lt;br /&gt;
*[[READERNAME_CommandFormatter.java]]&lt;br /&gt;
But you may also need formatters such as &lt;br /&gt;
*[[READERNAME_LogFormatter.java]] (not required)&lt;br /&gt;
that handles how incoming and outgoing messages should look in the log file.&lt;br /&gt;
Another useful formatter that may be necessary is&lt;br /&gt;
*[[READERNAME_StreamReaderFormatter.java]] (not required)&lt;br /&gt;
that controls how bytes are read off of and written to the TCPSocket.&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.protocol==&lt;br /&gt;
The protocol package contains one file whose purpose is twofold.  The protocol needs to:&lt;br /&gt;
#strip any extra protocol-- such as HTTP that the reader uses to communicate-- off of incoming messages and apply these protocols back to outgoing messages.&lt;br /&gt;
#Sometimes two or more commands can be read off of the TCP socket at the same time if the messages are sent quickly.  Therefore the protocol needs to make sure that each command is placed on the incoming buffer individually.&lt;br /&gt;
*[[READERNAME_Protocol.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.module==&lt;br /&gt;
The module is the heart of the reader.  It contains all the essential classes to get the reader up and running.&lt;br /&gt;
*[[reader.xml]] is a file that has the mappings between command names and handler methods&lt;br /&gt;
*[[emulator.xml]] is a file that contains with some basic configuration information&lt;br /&gt;
*[[REDERNAME_Module.java]] has the constructor for the reader&lt;br /&gt;
*[[READERNAME_ReaderSharedResources.java]] - The shared resources for this reader.  It allows various pieces of the reader to be accessed in different parts.&lt;br /&gt;
*[[READERNAME_ReaderModuleOnPowerState.java]] - contains the transition functions for how to go from on-&amp;gt;off and on-&amp;gt;suspend&lt;br /&gt;
*[[READERNAME_ReaderModuleOffPowerState.java]] - contains the transition functions for how to go from off-&amp;gt;on&lt;br /&gt;
*[[READERNAME_ReaderModuleSuspendPowerState.java]] - contains the transition functions for how to go from suspended-&amp;gt;on and suspended-&amp;gt;off&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.tagbuffer==&lt;br /&gt;
Because every real reader has a slightly different way that they remember tags, each virtual reader will need a class to handle tag reads.&lt;br /&gt;
* [[READERNAME_TagMemory.java]] is a class that keeps up with tag reads for the reader.&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/READERNAME_ExceptionHandler.java</id>
		<title>READERNAME ExceptionHandler.java</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/READERNAME_ExceptionHandler.java"/>
				<updated>2009-05-06T12:44:08Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: READERNAME ExceptionHanlder.java moved to READERNAME ExceptionHandler.java: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:developerDoc]][[category:emulatorDoc]]&lt;br /&gt;
This class should extend GenericExceptionHandler.  This page goes through each of the four methods in GenericExceptionHandler and describes in detail what each one does and how it should be implemented.  The first three methods must be implemented by the class that extends it, and the last class may (and probably should be) implemented by the subclass.&lt;br /&gt;
&lt;br /&gt;
=CommandNotFoundError=&lt;br /&gt;
&lt;br /&gt;
This exception is thrown in the [[Command Flow|CommandAdapter]] if a command is sent to the reader that is not defined in the reader.xml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;public abstract ArrayList&amp;lt;Object&amp;gt; commandNotFoundError(ArrayList&amp;lt;Object&amp;gt; arg, CommandObject obj);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
#arg - The incoming command&lt;br /&gt;
#obj - The incoming command object&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
An array of objects where the first object in the array is a message to be sent back to the client.&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
This is the commandNotFoundError in the alien reader&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	public ArrayList&amp;lt;Object&amp;gt; commandNotFoundError(ArrayList&amp;lt;Object&amp;gt; arg,&lt;br /&gt;
			CommandObject obj) {&lt;br /&gt;
		String message = &amp;quot;&amp;quot;;&lt;br /&gt;
		for (Object i : arg) {&lt;br /&gt;
			message += i.toString();&lt;br /&gt;
		}&lt;br /&gt;
		message = &amp;quot;Error 1: Command not understood&amp;quot; + message;&lt;br /&gt;
		ArrayList&amp;lt;Object&amp;gt; returnValue = new ArrayList&amp;lt;Object&amp;gt;();&lt;br /&gt;
		returnValue.add(message);&lt;br /&gt;
                return returnValue;&lt;br /&gt;
&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=InvalidCommandError=&lt;br /&gt;
This exception is thrown in the [[Command Flow|CommandAdapter]] if a command is in the reader.xml but does has and invalid argument. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;public abstract ArrayList&amp;lt;Object&amp;gt; invalidCommandError(ArrayList&amp;lt;Object&amp;gt; arg, String value, CommandObject obj);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
#arg - The incoming command&lt;br /&gt;
#obj - The incoming command object&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
An array of objects where the first object in the array is a message to be sent back to the client.&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
See the above implementation for the commandNotFound.  The handling of this error will likely be the same, but the message might be slightly different.&lt;br /&gt;
&lt;br /&gt;
=MalformedMessageError=&lt;br /&gt;
Tiis exception is thrown in the [[Command Flow|CommandAdapter]] if a command is in the reader.xml but is missing a required argument &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;public abstract ArrayList&amp;lt;Object&amp;gt; malformedMessageError(ArrayList&amp;lt;Object&amp;gt; arg, CommandObject obj);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
#arg - The incoming command&lt;br /&gt;
#obj - The incoming command object&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
An array of objects where the first object in the array is a message to be sent back to the client.&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
See the above implementation for the commandNotFound.  The handling of this error will likely be the same, but the message might be slightly different.&lt;br /&gt;
&lt;br /&gt;
=MethodInvocationError=&lt;br /&gt;
This exception is thrown in the [[Command Flow|CommandAdapter]] if something goes wrong in the handler method while executing a command.  It often happens if there is a null pointer exception thrown somewhere in the handler method.  While it is not required to implement this method, it is a good idea to do so, so that a proper error message can be sent back to the reader if something like that happens&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;public CommandObject methodInvocationError(ArrayList&amp;lt;Object&amp;gt; arg,CommandObject obj)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Arguments==&lt;br /&gt;
#arg - The incoming command&lt;br /&gt;
#obj - The incoming command object&lt;br /&gt;
&lt;br /&gt;
==Return Value==&lt;br /&gt;
An array of objects where the first object in the array is a message to be sent back to the client.&lt;br /&gt;
&lt;br /&gt;
==Reference Implementation==&lt;br /&gt;
This is a reference implementation from the LLRPExceptionHandler.  The ErrorMessage object is an LLRP specific message that the reader is required to send back to the client if an error happens.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	public CommandObject methodInvocationError(ArrayList&amp;lt;Object&amp;gt; arg,&lt;br /&gt;
			CommandObject obj) {&lt;br /&gt;
		ErrorMessage em = new ErrorMessage();&lt;br /&gt;
		LLRPStatus llrpstat = new LLRPStatus();&lt;br /&gt;
		llrpstat.setErrorCode((short) 100);&lt;br /&gt;
		char[] c = obj.getCurrentQueryName().toCharArray();&lt;br /&gt;
		byte[] com = new byte[c.length];&lt;br /&gt;
		for (int i = 0; i &amp;lt; c.length; i++) {&lt;br /&gt;
			com[i] = (byte) c[i];&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		llrpstat.setErrorDescription(&amp;quot;Internal error in Rifidi &amp;quot;&lt;br /&gt;
				+ &amp;quot;when processing a message of type &amp;quot;&lt;br /&gt;
				+ LLRPUtilities.calculateMessageNumber(com)&lt;br /&gt;
				+ &amp;quot; Please report error at &amp;quot;&lt;br /&gt;
				+ &amp;quot;rifidi sourceforge page&amp;quot;);&lt;br /&gt;
		em.setLLRPStatusParam(llrpstat);&lt;br /&gt;
&lt;br /&gt;
		&lt;br /&gt;
		obj.getReturnValue().add(em);&lt;br /&gt;
		return obj;&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/READERNAME_ExceptionHanlder.java</id>
		<title>READERNAME ExceptionHanlder.java</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/READERNAME_ExceptionHanlder.java"/>
				<updated>2009-05-06T12:44:08Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: READERNAME ExceptionHanlder.java moved to READERNAME ExceptionHandler.java: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[READERNAME ExceptionHandler.java]]&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Package_Structure_for_a_reader_project</id>
		<title>Package Structure for a reader project</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Package_Structure_for_a_reader_project"/>
				<updated>2009-05-06T12:43:34Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* org.rifidi.emulator.reader.READERNAME.command.exception */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:developerDoc]][[category:emulatorDoc]]&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Create a new reader project | this document]] to figure out how to create a new reader project in eclipse&lt;br /&gt;
&lt;br /&gt;
This page enumerates the very basic packages that a reader will need to have and the important files in each one.  Complex readers will have more packages than these, but this is a bare minimum.  These packages correspond with what you will need to program in [[Reader_Development_Stages#Stage_2_Reader_Core_Implementation| stage 2 of reader creation]].&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME==&lt;br /&gt;
This package just contains the osgi activator.  It should be created for you automatically when you create the project.  You have to modify it only to make sure it sets up the reader. [[Reader_Activator.java|Activator.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.command.exception==&lt;br /&gt;
This package contains a file that handles exceptions that occur in the parsing and execution of reader commands.&lt;br /&gt;
*[[READERNAME_ExceptionHanlder.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.commandhandler==&lt;br /&gt;
This package contains one or more files that handle incoming reader messages.  Normally commands can be divided into general categories.  For example, with the LLRP reader, there are a set of commands that deal with ROSPec messages (such as ADD_ROSPEC, ENABLE_ROSPEC, etc.) and a separate set of commands that deal with AccessSpec messages (such as ADD_ACCESSSPEC, ENABLE_ACCESSSPEC).  So for the LLRP reader, there is one file called 'LLRPReaderOperationControl.java' that contains the handler methods for ROSpec commands and  a file called 'LLRPAccessControl.java' that contains the handler methods for AccessSpec commands.  &lt;br /&gt;
*[[READERNAME_CATEGORY_Handler.java]]&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.formatter==&lt;br /&gt;
Any kind of formatters used should go into this package.  You will definitely need a formatter that handles the parsing of incoming and outgoing commands called &lt;br /&gt;
*[[READERNAME_CommandFormatter.java]]&lt;br /&gt;
But you may also need formatters such as &lt;br /&gt;
*[[READERNAME_LogFormatter.java]] (not required)&lt;br /&gt;
that handles how incoming and outgoing messages should look in the log file.&lt;br /&gt;
Another useful formatter that may be necessary is&lt;br /&gt;
*[[READERNAME_StreamReaderFormatter.java]] (not required)&lt;br /&gt;
that controls how bytes are read off of and written to the TCPSocket.&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.protocol==&lt;br /&gt;
The protocol package contains one file whose purpose is twofold.  The protocol needs to:&lt;br /&gt;
#strip any extra protocol-- such as HTTP that the reader uses to communicate-- off of incoming messages and apply these protocols back to outgoing messages.&lt;br /&gt;
#Sometimes two or more commands can be read off of the TCP socket at the same time if the messages are sent quickly.  Therefore the protocol needs to make sure that each command is placed on the incoming buffer individually.&lt;br /&gt;
*[[READERNAME_Protocol.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.module==&lt;br /&gt;
The module is the heart of the reader.  It contains all the essential classes to get the reader up and running.&lt;br /&gt;
*[[reader.xml]] is a file that has the mappings between command names and handler methods&lt;br /&gt;
*[[emulator.xml]] is a file that contains with some basic configuration information&lt;br /&gt;
*[[REDERNAME_Module.java]] has the constructor for the reader&lt;br /&gt;
*[[READERNAME_ReaderSharedResources.java]] - The shared resources for this reader.  It allows various pieces of the reader to be accessed in different parts.&lt;br /&gt;
*[[READERNAME_ReaderModuleOnPowerState.java]] - contains the transition functions for how to go from on-&amp;gt;off and on-&amp;gt;suspend&lt;br /&gt;
*[[READERNAME_ReaderModuleOffPowerState.java]] - contains the transition functions for how to go from off-&amp;gt;on&lt;br /&gt;
*[[READERNAME_ReaderModuleSuspendPowerState.java]] - contains the transition functions for how to go from suspended-&amp;gt;on and suspended-&amp;gt;off&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.tagbuffer==&lt;br /&gt;
Because every real reader has a slightly different way that they remember tags, each virtual reader will need a class to handle tag reads.&lt;br /&gt;
* [[READERNAME_TagMemory.java]] is a class that keeps up with tag reads for the reader.&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Package_Structure_for_a_reader_project</id>
		<title>Package Structure for a reader project</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Package_Structure_for_a_reader_project"/>
				<updated>2009-05-06T12:43:12Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* org.rifidi.emulator.reader.READERNAME.command.exception */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:developerDoc]][[category:emulatorDoc]]&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Create a new reader project | this document]] to figure out how to create a new reader project in eclipse&lt;br /&gt;
&lt;br /&gt;
This page enumerates the very basic packages that a reader will need to have and the important files in each one.  Complex readers will have more packages than these, but this is a bare minimum.  These packages correspond with what you will need to program in [[Reader_Development_Stages#Stage_2_Reader_Core_Implementation| stage 2 of reader creation]].&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME==&lt;br /&gt;
This package just contains the osgi activator.  It should be created for you automatically when you create the project.  You have to modify it only to make sure it sets up the reader. [[Reader_Activator.java|Activator.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.command.exception==&lt;br /&gt;
This package contains a file that handles exceptions that occur in the parsing and execution of reader commands.&lt;br /&gt;
*[[READERNAME_ExceptionHandler.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.commandhandler==&lt;br /&gt;
This package contains one or more files that handle incoming reader messages.  Normally commands can be divided into general categories.  For example, with the LLRP reader, there are a set of commands that deal with ROSPec messages (such as ADD_ROSPEC, ENABLE_ROSPEC, etc.) and a separate set of commands that deal with AccessSpec messages (such as ADD_ACCESSSPEC, ENABLE_ACCESSSPEC).  So for the LLRP reader, there is one file called 'LLRPReaderOperationControl.java' that contains the handler methods for ROSpec commands and  a file called 'LLRPAccessControl.java' that contains the handler methods for AccessSpec commands.  &lt;br /&gt;
*[[READERNAME_CATEGORY_Handler.java]]&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.formatter==&lt;br /&gt;
Any kind of formatters used should go into this package.  You will definitely need a formatter that handles the parsing of incoming and outgoing commands called &lt;br /&gt;
*[[READERNAME_CommandFormatter.java]]&lt;br /&gt;
But you may also need formatters such as &lt;br /&gt;
*[[READERNAME_LogFormatter.java]] (not required)&lt;br /&gt;
that handles how incoming and outgoing messages should look in the log file.&lt;br /&gt;
Another useful formatter that may be necessary is&lt;br /&gt;
*[[READERNAME_StreamReaderFormatter.java]] (not required)&lt;br /&gt;
that controls how bytes are read off of and written to the TCPSocket.&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.protocol==&lt;br /&gt;
The protocol package contains one file whose purpose is twofold.  The protocol needs to:&lt;br /&gt;
#strip any extra protocol-- such as HTTP that the reader uses to communicate-- off of incoming messages and apply these protocols back to outgoing messages.&lt;br /&gt;
#Sometimes two or more commands can be read off of the TCP socket at the same time if the messages are sent quickly.  Therefore the protocol needs to make sure that each command is placed on the incoming buffer individually.&lt;br /&gt;
*[[READERNAME_Protocol.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.module==&lt;br /&gt;
The module is the heart of the reader.  It contains all the essential classes to get the reader up and running.&lt;br /&gt;
*[[reader.xml]] is a file that has the mappings between command names and handler methods&lt;br /&gt;
*[[emulator.xml]] is a file that contains with some basic configuration information&lt;br /&gt;
*[[REDERNAME_Module.java]] has the constructor for the reader&lt;br /&gt;
*[[READERNAME_ReaderSharedResources.java]] - The shared resources for this reader.  It allows various pieces of the reader to be accessed in different parts.&lt;br /&gt;
*[[READERNAME_ReaderModuleOnPowerState.java]] - contains the transition functions for how to go from on-&amp;gt;off and on-&amp;gt;suspend&lt;br /&gt;
*[[READERNAME_ReaderModuleOffPowerState.java]] - contains the transition functions for how to go from off-&amp;gt;on&lt;br /&gt;
*[[READERNAME_ReaderModuleSuspendPowerState.java]] - contains the transition functions for how to go from suspended-&amp;gt;on and suspended-&amp;gt;off&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.tagbuffer==&lt;br /&gt;
Because every real reader has a slightly different way that they remember tags, each virtual reader will need a class to handle tag reads.&lt;br /&gt;
* [[READERNAME_TagMemory.java]] is a class that keeps up with tag reads for the reader.&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Package_Structure_for_a_reader_project</id>
		<title>Package Structure for a reader project</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Package_Structure_for_a_reader_project"/>
				<updated>2009-05-06T12:34:59Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:developerDoc]][[category:emulatorDoc]]&lt;br /&gt;
&lt;br /&gt;
Please refer to [[Create a new reader project | this document]] to figure out how to create a new reader project in eclipse&lt;br /&gt;
&lt;br /&gt;
This page enumerates the very basic packages that a reader will need to have and the important files in each one.  Complex readers will have more packages than these, but this is a bare minimum.  These packages correspond with what you will need to program in [[Reader_Development_Stages#Stage_2_Reader_Core_Implementation| stage 2 of reader creation]].&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME==&lt;br /&gt;
This package just contains the osgi activator.  It should be created for you automatically when you create the project.  You have to modify it only to make sure it sets up the reader. [[Reader_Activator.java|Activator.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.command.exception==&lt;br /&gt;
This package contains a file that handles exceptions that occur in the parsing and execution of reader commands.&lt;br /&gt;
*[[READERNAME_ExceptionHanlder.java]] &lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.commandhandler==&lt;br /&gt;
This package contains one or more files that handle incoming reader messages.  Normally commands can be divided into general categories.  For example, with the LLRP reader, there are a set of commands that deal with ROSPec messages (such as ADD_ROSPEC, ENABLE_ROSPEC, etc.) and a separate set of commands that deal with AccessSpec messages (such as ADD_ACCESSSPEC, ENABLE_ACCESSSPEC).  So for the LLRP reader, there is one file called 'LLRPReaderOperationControl.java' that contains the handler methods for ROSpec commands and  a file called 'LLRPAccessControl.java' that contains the handler methods for AccessSpec commands.  &lt;br /&gt;
*[[READERNAME_CATEGORY_Handler.java]]&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.formatter==&lt;br /&gt;
Any kind of formatters used should go into this package.  You will definitely need a formatter that handles the parsing of incoming and outgoing commands called &lt;br /&gt;
*[[READERNAME_CommandFormatter.java]]&lt;br /&gt;
But you may also need formatters such as &lt;br /&gt;
*[[READERNAME_LogFormatter.java]] (not required)&lt;br /&gt;
that handles how incoming and outgoing messages should look in the log file.&lt;br /&gt;
Another useful formatter that may be necessary is&lt;br /&gt;
*[[READERNAME_StreamReaderFormatter.java]] (not required)&lt;br /&gt;
that controls how bytes are read off of and written to the TCPSocket.&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.protocol==&lt;br /&gt;
The protocol package contains one file whose purpose is twofold.  The protocol needs to:&lt;br /&gt;
#strip any extra protocol-- such as HTTP that the reader uses to communicate-- off of incoming messages and apply these protocols back to outgoing messages.&lt;br /&gt;
#Sometimes two or more commands can be read off of the TCP socket at the same time if the messages are sent quickly.  Therefore the protocol needs to make sure that each command is placed on the incoming buffer individually.&lt;br /&gt;
*[[READERNAME_Protocol.java]]&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.module==&lt;br /&gt;
The module is the heart of the reader.  It contains all the essential classes to get the reader up and running.&lt;br /&gt;
*[[reader.xml]] is a file that has the mappings between command names and handler methods&lt;br /&gt;
*[[emulator.xml]] is a file that contains with some basic configuration information&lt;br /&gt;
*[[REDERNAME_Module.java]] has the constructor for the reader&lt;br /&gt;
*[[READERNAME_ReaderSharedResources.java]] - The shared resources for this reader.  It allows various pieces of the reader to be accessed in different parts.&lt;br /&gt;
*[[READERNAME_ReaderModuleOnPowerState.java]] - contains the transition functions for how to go from on-&amp;gt;off and on-&amp;gt;suspend&lt;br /&gt;
*[[READERNAME_ReaderModuleOffPowerState.java]] - contains the transition functions for how to go from off-&amp;gt;on&lt;br /&gt;
*[[READERNAME_ReaderModuleSuspendPowerState.java]] - contains the transition functions for how to go from suspended-&amp;gt;on and suspended-&amp;gt;off&lt;br /&gt;
&lt;br /&gt;
==org.rifidi.emulator.reader.READERNAME.tagbuffer==&lt;br /&gt;
Because every real reader has a slightly different way that they remember tags, each virtual reader will need a class to handle tag reads.&lt;br /&gt;
* [[READERNAME_TagMemory.java]] is a class that keeps up with tag reads for the reader.&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	<entry>
		<id>https://wiki.rifidi.net/index.php/Create_a_new_reader_project</id>
		<title>Create a new reader project</title>
		<link rel="alternate" type="text/html" href="https://wiki.rifidi.net/index.php/Create_a_new_reader_project"/>
				<updated>2009-05-06T12:20:36Z</updated>
		
		<summary type="html">&lt;p&gt;Stefan: /* Add the project's dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:developerDoc]][[category:emulatorDoc]]&lt;br /&gt;
= How to create a new Reader Project =&lt;br /&gt;
If you start up a new Reader it is necessary to create a new Plugin Project for the new reader. This HowTo shows how to do this in Eclipse.&lt;br /&gt;
&lt;br /&gt;
== Creating a new Project in Eclipse ==&lt;br /&gt;
First you need to set up your Eclipse Workspace. After that you can start creating a new Project by selecting the &amp;quot;File&amp;quot;-menu in the eclipse menubar. &lt;br /&gt;
&lt;br /&gt;
File -&amp;gt; New... -&amp;gt; Project &lt;br /&gt;
&lt;br /&gt;
Now you will see the &amp;quot;New Project Wizard&amp;quot;. &lt;br /&gt;
# create a new Eclipse Plug-in Project&lt;br /&gt;
# enter a name for the new Project and select as Target Platform Equinox&lt;br /&gt;
# enter the name of the Plug-in Provider and click the finish button&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; style=&amp;quot;background:transparent;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Image:NewPluginProject1.png|300px|thumb|left|create a new &amp;quot;PluginProject&amp;quot; in Eclipse]]&lt;br /&gt;
||&lt;br /&gt;
[[Image:NewPluginProject2.png|300px|thumb|left|enter the name for the project and select as target Equinox]]&lt;br /&gt;
||&lt;br /&gt;
[[Image:NewPluginProject3.png|300px|thumb|left| Enter the Name of the Plug-in Provider]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Add the project's dependencies==&lt;br /&gt;
#Double click on the project's MANIFEST.MF file&lt;br /&gt;
#Select the Dependencies tab&lt;br /&gt;
#For new readers, add the following packages:&lt;br /&gt;
*org.rifidi.emulator&lt;br /&gt;
*org.rifidi.common.utilities&lt;br /&gt;
*org.rifidi.services.tags&lt;br /&gt;
&lt;br /&gt;
== Add the project to the SVN Server (Optional)==&lt;br /&gt;
&lt;br /&gt;
If you are saving the project in the Rifidi SVN, you can do that from right inside eclipse using the subclipse plugin&lt;br /&gt;
&lt;br /&gt;
If you already created a new Eclipse Plug-in Project you need to add it to the Subversion Server. This can be done by following these 4 steps.&lt;br /&gt;
&lt;br /&gt;
# right click on the new Project and select &amp;quot;Team&amp;quot; -&amp;gt; &amp;quot;Share Project...&amp;quot;&lt;br /&gt;
# select SVN as repository type &lt;br /&gt;
# select the repository location &lt;br /&gt;
# select the folder you want to save the project ()&lt;br /&gt;
&lt;br /&gt;
Usually our projects are stored in the trunk of the subversion server. If you want to contribute you a new project with the name '''org.rifidi.emulator.reader.test''', the path would be:&lt;br /&gt;
&lt;br /&gt;
'''http://[Address of Subversion]/rifidi/trunk/org.rifidi.emulator.reader.test'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; style=&amp;quot;background:transparent;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:ShareProject1.png|300px|thumb|left| right click on the new Project and select &amp;quot;Team&amp;quot; -&amp;gt; &amp;quot;Share Project...&amp;quot; ]]&lt;br /&gt;
| [[Image:ShareProject2.png|300px|thumb|left| select SVN as repository type  ]]&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:ShareProject3.png|300px|thumb|left| select the repository location]]&lt;br /&gt;
| [[Image:ShareProject4.png|300px|thumb|left|  select the folder you want to save the project ()]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>	</entry>

	</feed>