TagStreamerSpecification

From RifidiWiki

Jump to: navigation, search

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