Difference between revisions of "TagStreamerSpecification"

From RifidiWiki

Jump to: navigation, search
m (XML)
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
  
This document describes a possible use case for TagStreamer 2.0 for the purpose of demonstrating how it would work.  The basic idea is to define a Scenario that describes the flow of input data through processing points. These processing points are called path items.  They consist of either a reader or a GPI Listener and a time to wait before moving on to the next path item.  It is important to note that the scenario and the data are decoupled.
+
This document describes a possible use case for TagStreamer 2.0 for the purpose of demonstrating how it would work.  The basic idea is to define a Scenario that describes the flow of input data through processing points and BatchPattern which describe the input data in general. The processing points of the Scenario are called path items.  They consist of either a reader or a GPI Listener and a time to wait before moving on to the next path item.  It is important to note that the scenario and the data are decoupled. The BatchPattern describes the speed which data will put into the Scenario and how many tags will be generated. The Tag Generator uses that information and executes the BatchPattern one activated.  
  
 
In the below scenario, a batch item – a group of tags – moves into the entry point of the scenario by being processed by reader 1.  Reader 1 adds the tags to its antenna for a variable amount of time, between 4 and 8 seconds.  Then the tags wait for 5 seconds before moving on to the next path item.   
 
In the below scenario, a batch item – a group of tags – moves into the entry point of the scenario by being processed by reader 1.  Reader 1 adds the tags to its antenna for a variable amount of time, between 4 and 8 seconds.  Then the tags wait for 5 seconds before moving on to the next path item.   
Line 7: Line 7:
 
The next path item is a GPI Listener that is tied to Reader 2.  Because this particular Batch Item is set to trigger GPI Listeners, the GPI Listener will toggle one of Reader 2's GPI ports.  The batch item now waits for 5 more seconds.  Now the tags in the batch are seen by reader 2's antenna for 3 seconds and then wait for anywhere between 10 and 20 seconds before moving on to Reader 3.
 
The next path item is a GPI Listener that is tied to Reader 2.  Because this particular Batch Item is set to trigger GPI Listeners, the GPI Listener will toggle one of Reader 2's GPI ports.  The batch item now waits for 5 more seconds.  Now the tags in the batch are seen by reader 2's antenna for 3 seconds and then wait for anywhere between 10 and 20 seconds before moving on to Reader 3.
  
Once the tags are seen by reader 3, this iteration of the scenario is over.  However, the scenario can be repeated, if it is configured to do so.
+
Once the tags are seen by reader 3, this iteration of the scenario is over.  The TagGenerator can execute a BatchPattern more than once. This will be defined as the iteration of the BatchPattern.  
  
 
[[Image:TagStreamerSpec.png]]
 
[[Image:TagStreamerSpec.png]]
Line 19: Line 19:
 
###GPI Listener - If a Batch Item which is set to trigger a GPI event passes through a GPI Listener, it will trigger a GPI event on the GPI Listener's reader.
 
###GPI Listener - If a Batch Item which is set to trigger a GPI event passes through a GPI Listener, it will trigger a GPI event on the GPI Listener's reader.
 
###Time - A time is used either to describe the amount of time that a batch item should wait on a Path Item, or the amount of time a batch item should wait after being processed by the path item.  For example, in the above use case, if the tag batch moved to reader 1, it is processed by the reader  for 4-8 seconds (i.e. It is added to the reader's antenna for this amount of time).  Then it waits for 5 seconds before it proceeds to the next path item.  It can be a random amount of time with a min value and a max value. If it's not a random value both values should be equal.
 
###Time - A time is used either to describe the amount of time that a batch item should wait on a Path Item, or the amount of time a batch item should wait after being processed by the path item.  For example, in the above use case, if the tag batch moved to reader 1, it is processed by the reader  for 4-8 seconds (i.e. It is added to the reader's antenna for this amount of time).  Then it waits for 5 seconds before it proceeds to the next path item.  It can be a random amount of time with a min value and a max value. If it's not a random value both values should be equal.
#Input Data - A container for Batch Items.  Each of the batch items in the Input Data flows through the Scenario by starting at the entry point and being processed sequentially at each Path Item.
+
#BatchPattern - A way to describe BathItems generated at the runtime.  Each batch items flows through the Scenario by starting at the entry point and being processed sequentially at each Path Item.
 
##BatchItem - A batch item contains a list of tags, a boolean that describes whether or not it should trigger GPI Listeners and a time value that describes the amount of time it should wait before being processed by the first path item.
 
##BatchItem - A batch item contains a list of tags, a boolean that describes whether or not it should trigger GPI Listeners and a time value that describes the amount of time it should wait before being processed by the first path item.
###GPI Trigger - A boolean value that defines whether or not the asociated batch item should cause GPI Listerns to fire a GPI event.
+
### GPI Trigger - A boolean value that defines whether or not the asociated batch item should cause GPI Listerns to fire a GPI event.
 
### Tags - A list of RFID tags to be added to readers.  They are defined by an ID, a Generation( Gen1 or Gen2), and type (e.g. DOD-96).
 
### Tags - A list of RFID tags to be added to readers.  They are defined by an ID, a Generation( Gen1 or Gen2), and type (e.g. DOD-96).
  
 
==XML==
 
==XML==
 
===Scenario.xml===
 
===Scenario.xml===
This XML describes the various components (ie RFID Readers & GPI Listeners) in the scenario
+
This XML describes the PathItems and the way Data moves through the scenario to the various components like RFID Readers & GPI Listeners.
 
<pre>
 
<pre>
<scenario id="1" numberOfRuns="1">  
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<pathitem id=1>  
+
<scenario id="0">
<reader id="1">  
+
    <pathItem id="0">
<time random="true" min="4000" max="8000"></time>  
+
        <readerEntity>
</reader>  
+
            <timeEntity>
<time random="false" min="5000" max="5000"></time>  
+
                <random>true</random>
</pathitem>  
+
                <minValue>400</minValue>
<pathitem id=2>  
+
                <maxValue>500</maxValue>
<gpilistner id=1>  
+
            </timeEntity>
<time random="true" min="1000" max="2000"></time>  
+
            <readerID>0</readerID>
</gpilistner>  
+
        </readerEntity>
<time random="false" min="5000" max="5000"></time>  
+
        <timeEntity>
</pathitem>  
+
            <random>true</random>
<pathitem id=3>  
+
            <minValue>400</minValue>
<reader id="2">  
+
            <maxValue>500</maxValue>
<time random="true" min="4000" max="8000"></time>  
+
        </timeEntity>
</reader>  
+
    </pathItem>
<time random="true" min="10000" max="20000"></time>  
+
    <pathItem id="1">
</pathitem>  
+
        <gpiListenerEntity>
<pathitem id=4>  
+
            <timeEntity>
<reader id="3">  
+
                <random>true</random>
<time random="false" min="2000" max="2000"></time>  
+
                <minValue>400</minValue>
</reader>  
+
                <maxValue>500</maxValue>
<time random="false" min="0" max="0"></time>  
+
            </timeEntity>
</pathitem>  
+
            <gpiListenerID>0</gpiListenerID>
 +
        </gpiListenerEntity>
 +
        <timeEntity>
 +
            <random>true</random>
 +
            <minValue>400</minValue>
 +
            <maxValue>500</maxValue>
 +
        </timeEntity>
 +
    </pathItem>
 +
    <pathItem id="2">
 +
        <readerEntity>
 +
            <timeEntity>
 +
                <random>true</random>
 +
                <minValue>400</minValue>
 +
                <maxValue>500</maxValue>
 +
            </timeEntity>
 +
            <readerID>0</readerID>
 +
        </readerEntity>
 +
        <timeEntity>
 +
            <random>true</random>
 +
            <minValue>400</minValue>
 +
            <maxValue>500</maxValue>
 +
        </timeEntity>
 +
    </pathItem>
 +
    <pathItem id="3">
 +
        <readerEntity>
 +
            <timeEntity>
 +
                <random>true</random>
 +
                <minValue>400</minValue>
 +
                <maxValue>500</maxValue>
 +
            </timeEntity>
 +
            <readerID>0</readerID>
 +
        </readerEntity>
 +
        <timeEntity>
 +
            <random>true</random>
 +
            <minValue>400</minValue>
 +
            <maxValue>500</maxValue>
 +
        </timeEntity>
 +
    </pathItem>
 
</scenario>
 
</scenario>
 
</pre>
 
</pre>
Line 60: Line 97:
  
 
<pre>
 
<pre>
<componentList>
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<readerConfig>
+
<componentList id="0">
<reader id=1>
+
    <readerComponents id="0">
<numAntennas>2</numAntennas>
+
        <reader>
        <numGPIs>4</numGPIs>
+
        <numAntennas>1</numAntennas>
        <numGPOs>8</numGPOs>  
+
        <numGPIs>4</numGPIs>
        <propertiesMap>  
+
        <numGPOs>4</numGPOs>
<entry>
+
        <propertiesMap>
                <key>inet_address</key>
+
            <entry>
                <value>127.0.0.1:20000</value>  
+
                <key>servermode</key>
            </entry>
+
                <value>true</value>
            <entry>
+
            </entry>
                <key>heartbeat_address</key>
+
            <entry>
                <value>255.255.255.255:3899</value>
+
                <key>inet_address</key>
            </entry>
+
                <value>127.0.0.1:10101</value>
        </propertiesMap>
+
            </entry>
<readerClassName>org.rifidi.emulator.reader.alien.module.AlienReaderModule</readerClassName>
+
            <entry>
        <readerName>AlienReader</readerName>
+
                <key>llrp_inet_address</key>
        <readerType>AlienALR9800</readerType>
+
                <value>127.0.0.1:5084</value>
</reader>
+
            </entry>
<reader id=2>  
+
        </propertiesMap>
        <numAntennas>1</numAntennas>  
+
        <readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>
        <numGPIs>4</numGPIs>  
+
        <readerName>LLRPreader</readerName>
        <numGPOs>4</numGPOs>  
+
        <readerType>LLRPReader</readerType>
        <propertiesMap>  
+
        </reader>
<entry>  
+
    </readerComponents>
<key>servermode</key>  
+
    <readerComponents id="1">
<value>true</value>  
+
        <reader>
</entry>  
+
            <numAntennas>1</numAntennas>
<entry>  
+
        <numGPIs>4</numGPIs>
<key>inet_address</key>  
+
        <numGPOs>4</numGPOs>
                <value>127.0.0.1:10102</value>  
+
        <propertiesMap>
</entry>  
+
            <entry>
            <entry>  
+
                <key>servermode</key>
<key>llrp_inet_address</key>  
+
                <value>true</value>
<value>127.0.0.1:5085</value>  
+
            </entry>
</entry>  
+
            <entry>
        </propertiesMap>  
+
                <key>inet_address</key>
<readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>  
+
                <value>127.0.0.1:10102</value>
<readerName>LLRPreader</readerName>  
+
            </entry>
<readerType>LLRPReader</readerType>  
+
            <entry>
<numAntennas>1</numAntennas>  
+
                <key>llrp_inet_address</key>
</reader>
+
                <value>127.0.0.1:5085</value>
<reader id=3>  
+
            </entry>
        <numAntennas>1</numAntennas>  
+
        </propertiesMap>
        <numGPIs>4</numGPIs>  
+
        <readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>
        <numGPOs>4</numGPOs>  
+
        <readerName>LLRPreader2</readerName>
        <propertiesMap>  
+
        <readerType>LLRPReader</readerType>
<entry>  
+
        </reader>
<key>servermode</key>  
+
    </readerComponents>
<value>true</value>  
+
    <gpiListenerComponents id="0">
</entry>  
+
        <port>0</port>
<entry>  
+
        <readerID>0</readerID>
<key>inet_address</key>  
+
        <signalValue>true</signalValue>
                <value>127.0.0.1:10101</value>  
+
    </gpiListenerComponents>
</entry>  
+
            <entry>  
+
<key>llrp_inet_address</key>  
+
<value>127.0.0.1:5084</value>  
+
</entry>  
+
        </propertiesMap>  
+
<readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>  
+
<readerName>LLRPreader</readerName>  
+
<readerType>LLRPReader</readerType>  
+
<numAntennas>1</numAntennas>
+
</reader>  
+
</readerConfig>  
+
 
+
<gpiconfig>
+
<gpiListener id="1">
+
<port>3</port>  
+
<readerID>2</readerID>  
+
<state>true</state>
+
</gpiListener>  
+
</gpiConfig>  
+
 
</componentList>
 
</componentList>
 
</pre>
 
</pre>
  
===InputData.xml===
+
===BatchPattern.xml===
The Inputdata.xml file describes the inputs into the scenario.
+
The BatchPattern describes the input data generated at the runtime by the BatchGenerators. This will create BatchItems wich certain tags and flow through the scenario.
 
<pre>
 
<pre>
<InputData>
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<BatchItem ID = "1" GPITrigger="true" offset="0">  
+
<batchPattern id="1">
<Tag>  
+
<scenario>3</scenario>
<ID>012341231</ID>  
+
<interation>250</iteration>
<Type>DOD-96</Type>  
+
<burstNumber>50</busrtNumber>
<GEN>2</GEN>  
+
<burstInterval>4000</burstInterval>
</Tag>  
+
        <isGPITrigger>true</isGPITrigger>
<Tag>
+
<tagPattern count="100">
<ID>454543523</ID>  
+
<type>Custom</type>
<Type>DOD-96</Type>
+
<prefix>eef</prefix>
<GEN>2</GEN>  
+
<gen>2</gen>
</Tag>
+
</tagPattern>
</BatchItem>
+
<tagPattern count="90">
 
+
<type>DOD</type>
<BatchItem ID = "2" GPITrigger="true" offset="5000">
+
</prefix>
<Tag>  
+
<gen>2</gen>
<ID>62346456</ID>  
+
</tagPattern>
<Type>DOD-96</Type>  
+
</batchPattern>
<GEN>2</GEN>  
+
</Tag>  
+
<Tag>  
+
<ID>4435272</ID>  
+
<Type>DOD-96</Type>  
+
<GEN>2</GEN>
+
</Tag>  
+
</BatchItem>  
+
</InputData>
+
 
</pre>
 
</pre>

Latest revision as of 18:37, 28 July 2015

Introduction

This document describes a possible use case for TagStreamer 2.0 for the purpose of demonstrating how it would work. The basic idea is to define a Scenario that describes the flow of input data through processing points and BatchPattern which describe the input data in general. The processing points of the Scenario are called path items. They consist of either a reader or a GPI Listener and a time to wait before moving on to the next path item. It is important to note that the scenario and the data are decoupled. The BatchPattern describes the speed which data will put into the Scenario and how many tags will be generated. The Tag Generator uses that information and executes the BatchPattern one activated.

In the below scenario, a batch item – a group of tags – moves into the entry point of the scenario by being processed by reader 1. Reader 1 adds the tags to its antenna for a variable amount of time, between 4 and 8 seconds. Then the tags wait for 5 seconds before moving on to the next path item.

The next path item is a GPI Listener that is tied to Reader 2. Because this particular Batch Item is set to trigger GPI Listeners, the GPI Listener will toggle one of Reader 2's GPI ports. The batch item now waits for 5 more seconds. Now the tags in the batch are seen by reader 2's antenna for 3 seconds and then wait for anywhere between 10 and 20 seconds before moving on to Reader 3.

Once the tags are seen by reader 3, this iteration of the scenario is over. The TagGenerator can execute a BatchPattern more than once. This will be defined as the iteration of the BatchPattern.

TagStreamerSpec.png

Components

A TagStreamer usecase consists of two main components -- the Scenario and the Input Data. Both are decoupled so that neither depends on the other part.

  1. Scenario - The Scenario describes the path through which a tag batch flows. It is made up of path items. It also contains a variable that controls how many times the scenario is repeated. If the variable is 0, the scenario is run infinitely. If it is positive, it is run n times.
    1. PathItem - A path item consists of either a reader or a GPI Listener and a time to wait.
      1. Reader - An RFID reader which tags appear on
      2. GPI Listener - If a Batch Item which is set to trigger a GPI event passes through a GPI Listener, it will trigger a GPI event on the GPI Listener's reader.
      3. Time - A time is used either to describe the amount of time that a batch item should wait on a Path Item, or the amount of time a batch item should wait after being processed by the path item. For example, in the above use case, if the tag batch moved to reader 1, it is processed by the reader for 4-8 seconds (i.e. It is added to the reader's antenna for this amount of time). Then it waits for 5 seconds before it proceeds to the next path item. It can be a random amount of time with a min value and a max value. If it's not a random value both values should be equal.
  2. BatchPattern - A way to describe BathItems generated at the runtime. Each batch items flows through the Scenario by starting at the entry point and being processed sequentially at each Path Item.
    1. BatchItem - A batch item contains a list of tags, a boolean that describes whether or not it should trigger GPI Listeners and a time value that describes the amount of time it should wait before being processed by the first path item.
      1. GPI Trigger - A boolean value that defines whether or not the asociated batch item should cause GPI Listerns to fire a GPI event.
      2. Tags - A list of RFID tags to be added to readers. They are defined by an ID, a Generation( Gen1 or Gen2), and type (e.g. DOD-96).

XML

Scenario.xml

This XML describes the PathItems and the way Data moves through the scenario to the various components like RFID Readers & GPI Listeners.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<scenario id="0">
    <pathItem id="0">
        <readerEntity>
            <timeEntity>
                <random>true</random>
                <minValue>400</minValue>
                <maxValue>500</maxValue>
            </timeEntity>
            <readerID>0</readerID>
        </readerEntity>
        <timeEntity>
            <random>true</random>
            <minValue>400</minValue>
            <maxValue>500</maxValue>
        </timeEntity>
    </pathItem>
    <pathItem id="1">
        <gpiListenerEntity>
            <timeEntity>
                <random>true</random>
                <minValue>400</minValue>
                <maxValue>500</maxValue>
            </timeEntity>
            <gpiListenerID>0</gpiListenerID>
        </gpiListenerEntity>
        <timeEntity>
            <random>true</random>
            <minValue>400</minValue>
            <maxValue>500</maxValue>
        </timeEntity>
    </pathItem>
    <pathItem id="2">
        <readerEntity>
            <timeEntity>
                <random>true</random>
                <minValue>400</minValue>
                <maxValue>500</maxValue>
            </timeEntity>
            <readerID>0</readerID>
        </readerEntity>
        <timeEntity>
            <random>true</random>
            <minValue>400</minValue>
            <maxValue>500</maxValue>
        </timeEntity>
    </pathItem>
    <pathItem id="3">
        <readerEntity>
            <timeEntity>
                <random>true</random>
                <minValue>400</minValue>
                <maxValue>500</maxValue>
            </timeEntity>
            <readerID>0</readerID>
        </readerEntity>
        <timeEntity>
            <random>true</random>
            <minValue>400</minValue>
            <maxValue>500</maxValue>
        </timeEntity>
    </pathItem>
</scenario>

Component.xml

This XML describes the various components (ie RFID Readers & GPI Listeners) in the scenario

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<componentList id="0">
    <readerComponents id="0">
        <reader>
         <numAntennas>1</numAntennas>
        <numGPIs>4</numGPIs>
        <numGPOs>4</numGPOs>
        <propertiesMap>
            <entry>
                <key>servermode</key>
                <value>true</value>
            </entry>
            <entry>
                <key>inet_address</key>
                <value>127.0.0.1:10101</value>
            </entry>
            <entry>
                <key>llrp_inet_address</key>
                <value>127.0.0.1:5084</value>
            </entry>
        </propertiesMap>
        <readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>
        <readerName>LLRPreader</readerName>
        <readerType>LLRPReader</readerType>
        </reader>
    </readerComponents>
    <readerComponents id="1">
        <reader>
            <numAntennas>1</numAntennas>
        <numGPIs>4</numGPIs>
        <numGPOs>4</numGPOs>
        <propertiesMap>
            <entry>
                <key>servermode</key>
                <value>true</value>
            </entry>
            <entry>
                <key>inet_address</key>
                <value>127.0.0.1:10102</value>
            </entry>
            <entry>
                <key>llrp_inet_address</key>
                <value>127.0.0.1:5085</value>
            </entry>
        </propertiesMap>
        <readerClassName>org.rifidi.emulator.reader.llrp.module.LLRPReaderModule</readerClassName>
        <readerName>LLRPreader2</readerName>
        <readerType>LLRPReader</readerType>
        </reader>
    </readerComponents>
    <gpiListenerComponents id="0">
        <port>0</port>
        <readerID>0</readerID>
        <signalValue>true</signalValue>
    </gpiListenerComponents>
</componentList>

BatchPattern.xml

The BatchPattern describes the input data generated at the runtime by the BatchGenerators. This will create BatchItems wich certain tags and flow through the scenario.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<batchPattern id="1">
	<scenario>3</scenario>	
	<interation>250</iteration>
	<burstNumber>50</busrtNumber>
	<burstInterval>4000</burstInterval>
        <isGPITrigger>true</isGPITrigger>
	<tagPattern count="100">
		<type>Custom</type>
		<prefix>eef</prefix>
		<gen>2</gen>	
	</tagPattern>
	<tagPattern count="90">
		<type>DOD</type>
		</prefix>
		<gen>2</gen>
	</tagPattern>
</batchPattern>
Personal tools