Difference between revisions of "READERNAME ReaderSharedResources.java"

From RifidiWiki

Jump to: navigation, search
m (Reverted edits by Amesycyxa (Talk); changed back to last version by Jmaine)
 
Line 1: Line 1:
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://otyxemydu.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 
----
 
=[http://otyxemydu.co.cc CLICK HERE]=
 
----
 
</div>
 
 
[[category:developerDoc]][[category:emulatorDoc]]
 
[[category:developerDoc]][[category:emulatorDoc]]
 
The SharedResources act as common repository for various objects used in various places in the code.  Each reader should have a shared resources and it should extend AbstractReaderSharedResources.
 
The SharedResources act as common repository for various objects used in various places in the code.  Each reader should have a shared resources and it should extend AbstractReaderSharedResources.
Line 17: Line 9:
 
#GenericRadio radio
 
#GenericRadio radio
 
#TagMemory tagMemory
 
#TagMemory tagMemory
#ControlSignal&lt;Boolean&gt; readerPowerSignal
+
#ControlSignal<Boolean> readerPowerSignal
 
#String readerName
 
#String readerName
 
#GenericExceptionHandler geh
 
#GenericExceptionHandler geh
Line 24: Line 16:
  
 
The first thing that the constructor should do is make a call to its super class:
 
The first thing that the constructor should do is make a call to its super class:
&lt;pre&gt;
+
<pre>
 
super(radio, tagMemory, readerPowerSignal, readerName, geh digester, numberOfAntennas);
 
super(radio, tagMemory, readerPowerSignal, readerName, geh digester, numberOfAntennas);
&lt;/pre&gt;
+
</pre>
  
 
Then it should set the rest of the variables that are required by the reader to be in the shared resources. If more than one class or part of the reader needs the same object or information then it should be placed inside the shared resources. For more information see the sharedResources in one of the other readers.
 
Then it should set the rest of the variables that are required by the reader to be in the shared resources. If more than one class or part of the reader needs the same object or information then it should be placed inside the shared resources. For more information see the sharedResources in one of the other readers.

Latest revision as of 19:40, 26 November 2010

The SharedResources act as common repository for various objects used in various places in the code. Each reader should have a shared resources and it should extend AbstractReaderSharedResources.

All of the methods in the shared resources are just getters and setters for the components that are held in it. The only method that this page will cover is the constructor.

Constructor

The constructor for the shared resources should be called in the reader module. The constructor for the shared resources must take in the following things:

  1. GenericRadio radio
  2. TagMemory tagMemory
  3. ControlSignal<Boolean> readerPowerSignal
  4. String readerName
  5. GenericExceptionHandler geh
  6. CommandDigester digester
  7. int numberOfAntennas

The first thing that the constructor should do is make a call to its super class:

		super(radio, tagMemory, readerPowerSignal, readerName, geh digester, numberOfAntennas);

Then it should set the rest of the variables that are required by the reader to be in the shared resources. If more than one class or part of the reader needs the same object or information then it should be placed inside the shared resources. For more information see the sharedResources in one of the other readers.

Personal tools