Difference between revisions of "Emulator.xml"

From RifidiWiki

Jump to: navigation, search
(maxantennas)
m (Reverted edits by Amesycyxa (Talk); changed back to last version by Kyle)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[category:developerDoc]][[category:emulatorDoc]]
 
Emulator.xml is a file that contains the information used to start up a reader.  Readers typically have a set of inputs that are required to be able to create it, for example IP addresses, number of antennas, number of GPIs, etc.  This file is used to supply that information to the ReaderModule, which handles the creation of a reader.
 
Emulator.xml is a file that contains the information used to start up a reader.  Readers typically have a set of inputs that are required to be able to create it, for example IP addresses, number of antennas, number of GPIs, etc.  This file is used to supply that information to the ReaderModule, which handles the creation of a reader.
  
Line 51: Line 52:
  
 
==Reference Implementation==
 
==Reference Implementation==
This is the maxantennas tag in the alien reader
+
This is the maxgpis tag in the alien reader
 
<pre>
 
<pre>
 
<maxgpis>4</maxgpis>
 
<maxgpis>4</maxgpis>
 
</pre>
 
</pre>
  
=maxantennas=
+
=maxgpos=
The maximum number of antennas that this reader supports.  It is required by all readers
+
The maximum number of gpos that this reader supports.  It is required by all readers
  
 
==Sub elements==
 
==Sub elements==
Line 63: Line 64:
  
 
==Reference Implementation==
 
==Reference Implementation==
This is the maxantennas tag in the alien reader
+
This is the maxgpos tag in the alien reader
 
<pre>
 
<pre>
<maxantennas>4</maxantennas>
+
<maxgpos>8</maxgpos>
 
</pre>
 
</pre>
  
=maxantennas=
+
=property=
The maximum number of antennas that this reader supportsIt is required by all readers
+
Each reader can have its own set of information required to start itThese are supplied using the propery tags.
 
+
 
==Sub elements==
 
==Sub elements==
none
+
#required - Whether or not this property is required.  If the property is not required, the reader should be able to be created without needing this property.
 
+
#name - The name of the property.  This will be used in the readerModule as a key to get the value of the property out of a hashmap
 +
#display - The display name of the property in the reader creation wizzard
 +
#tooltip - The mouseover text in the reader creation wizzard
 +
#defaultvalue - The default value of the property
 +
#validatorclassname - Which validator should be used to make sure that a user enters in the proper value into the reader creation wizzard for this field.  Some common validators are:
 +
*IpAddressValidator
 +
*BooleanValidator
 +
*PositiveIntegerValidator
 
==Reference Implementation==
 
==Reference Implementation==
This is the maxantennas tag in the alien reader
+
These are the property tags in the alien reader.  Notice that each one of these tags correspond to a value that the user can enter in the reader creation wizzard
 
<pre>
 
<pre>
<maxantennas>4</maxantennas>
+
<property>
 +
<required>1</required>
 +
<name>inet_address</name>
 +
<display>ip address</display>
 +
<tooltip>The address the reader should be reachable through</tooltip>
 +
<defaultvalue>127.0.0.1:20000</defaultvalue>
 +
<validatorclassname>IpAddressValidator</validatorclassname>
 +
</property>
 +
<property>
 +
<required>1</required>
 +
<name>heartbeat_address</name>
 +
<display>heartbeat address</display>
 +
<tooltip>The address the heartbeat should bind to</tooltip>
 +
<defaultvalue>255.255.255.255:3988</defaultvalue>
 +
<validatorclassname>IpAddressValidator</validatorclassname>
 +
</property>
 +
<property>
 +
<required>0</required>
 +
<name>heartbeat_power</name>
 +
<display>Enable Heartbeat for this reader</display>
 +
<tooltip>Whether or not the heartbeat is activated</tooltip>
 +
<defaultvalue>0</defaultvalue>
 +
<validatorclassname>BooleanValidator</validatorclassname>
 +
</property>
 +
<property>
 +
<required>0</required>
 +
<name>heartbeat_port</name>
 +
<display>Heartbeat binding port</display>
 +
<tooltip>Enter the port the hearbeat broadcast should bind to</tooltip>
 +
<defaultvalue>3989</defaultvalue>
 +
<validatorclassname>PositiveIntegerValidator</validatorclassname>
 +
</property>
 
</pre>
 
</pre>

Latest revision as of 19:44, 26 November 2010

Emulator.xml is a file that contains the information used to start up a reader. Readers typically have a set of inputs that are required to be able to create it, for example IP addresses, number of antennas, number of GPIs, etc. This file is used to supply that information to the ReaderModule, which handles the creation of a reader.

The information in this file are basically of two types:

  1. Information that is common to all readers in order to start them. These pieces of information have their own tags and should be included in all the reader's emulator.xml file
  2. Information that is specific to the reader. Information of this type will be supplied using a <property> tag

The reader creation wizzard in the UI will automatically add places to collect information according to the <property> tags in the emulator.xml. For example, if an IP address is listed as a property in the emulator.xml, the reader creation wizzard will automatically add a space to collect that information.

readerclassname

This tag is required by all readers. It is path to the ReaderModule.

Sub elements

none

Reference Implementation

This is the readerClassName tag in the alien reader

	<readerclassname>org.rifidi.emulator.reader.alien.module.AlienReaderModule</readerclassname>

description

A short description of the type of the reader. It is required by all readers

Sub elements

none

Reference Implementation

This is the description tag in the alien reader

	<description>Emulator for the Alien 9800</description>

maxantennas

The maximum number of antennas that this reader supports. It is required by all readers

Sub elements

none

Reference Implementation

This is the maxantennas tag in the alien reader

	<maxantennas>4</maxantennas>

maxgpis

The maximum number of GPIs that this reader supports. It is required by all readers

Sub elements

none

Reference Implementation

This is the maxgpis tag in the alien reader

	<maxgpis>4</maxgpis>

maxgpos

The maximum number of gpos that this reader supports. It is required by all readers

Sub elements

none

Reference Implementation

This is the maxgpos tag in the alien reader

	<maxgpos>8</maxgpos>

property

Each reader can have its own set of information required to start it. These are supplied using the propery tags.

Sub elements

  1. required - Whether or not this property is required. If the property is not required, the reader should be able to be created without needing this property.
  2. name - The name of the property. This will be used in the readerModule as a key to get the value of the property out of a hashmap
  3. display - The display name of the property in the reader creation wizzard
  4. tooltip - The mouseover text in the reader creation wizzard
  5. defaultvalue - The default value of the property
  6. validatorclassname - Which validator should be used to make sure that a user enters in the proper value into the reader creation wizzard for this field. Some common validators are:
  • IpAddressValidator
  • BooleanValidator
  • PositiveIntegerValidator

Reference Implementation

These are the property tags in the alien reader. Notice that each one of these tags correspond to a value that the user can enter in the reader creation wizzard

	<property>
		<required>1</required>
		<name>inet_address</name>
		<display>ip address</display>
		<tooltip>The address the reader should be reachable through</tooltip>
		<defaultvalue>127.0.0.1:20000</defaultvalue>		
		<validatorclassname>IpAddressValidator</validatorclassname>
	</property>
	<property>
		<required>1</required>
		<name>heartbeat_address</name>
		<display>heartbeat address</display>
		<tooltip>The address the heartbeat should bind to</tooltip>
		<defaultvalue>255.255.255.255:3988</defaultvalue>
		<validatorclassname>IpAddressValidator</validatorclassname>
	</property>
		<property>
		<required>0</required>
		<name>heartbeat_power</name>
		<display>Enable Heartbeat for this reader</display>
		<tooltip>Whether or not the heartbeat is activated</tooltip>
		<defaultvalue>0</defaultvalue>
		<validatorclassname>BooleanValidator</validatorclassname>
	</property>
		<property>
		<required>0</required>
		<name>heartbeat_port</name>
		<display>Heartbeat binding port</display>
		<tooltip>Enter the port the hearbeat broadcast should bind to</tooltip>
		<defaultvalue>3989</defaultvalue>
		<validatorclassname>PositiveIntegerValidator</validatorclassname>
	</property>
Personal tools