Difference between revisions of "TagStreamerArchitecture"

From RifidiWiki

Jump to: navigation, search
(Data Objects)
m (The PathItem)
 
(41 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Load XML Handler==
+
= Tag Streamer 2.0 =
This is loading the needed Information form the XML Files. This consists of three different Files:
+
* The Scenario,
+
* The Components
+
* The InputData
+
  
It will have a main load-method() taking in three filenames
+
As we talk about Tag Streamer 2.0 we talk about a new Software. The software comes along with Objects and object orientated programming. One of the modern software development concepts is the "Model Viewer Controller" principle. It defines 3 main parts of a program.
  
==Component Manager==
+
* the Viewer
The ComponentManager is a universal Class for creating the Components and keeping track of them. You can get the instances of the readers by asking the componentManager. He will create the reader if needed or returning a connected instance to the reader.
+
* the Model
 +
* the Controller
  
==Processor==
+
== The Viewer ==
Is the executing part. It runs the Scenarios by calling the processdata methods and doing the timing coming along with the pathItems. For doing that it needs to be a thread which can be interrupted at certain points.
+
The Viewer will be defined in a later phase of the implementation because the main task of Tag Streamer will be the execution of predefined XML files.
  
==Command Interface==
+
== The Model ==
This is providing the user with the commands
+
The Model represents the input data. In Tag Streamer we can identify 4 parts.
  
* start
+
* the Batch
* stop
+
* the Scenario
* pause (implement later on)
+
* the Components
* resume (implement later on)
+
* the LoadTestSuite
* clean
+
* load
+
  
==Data Objects==
+
=== The Batch ===
===class Scenario===
+
Describes what should be done on the PathItems along the Scenario.
* field ID
+
* field numOfRuns
+
* ArrayList of PathItems
+
  
===class PathItems===  
+
<pre>
* field ID (tells the position of this PathItem in the array)
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* class TimeObject
+
<batch id="0">
* PathEntity Object
+
    <waitAction>
 +
        <waitTime>100</waitTime>
 +
    </waitAction>
 +
    <tagAction>
 +
        <execDuration>200</execDuration>
 +
        <number>20</number>
 +
        <prefix>eef</prefix>
 +
        <tagGen>GEN2</tagGen>
 +
        <tagType>CustomEPC96</tagType>
 +
    </tagAction>
 +
    <waitAction>
 +
        <waitTime>100</waitTime>
 +
    </waitAction>
 +
    <gpiAction>
 +
        <port>0</port>
 +
        <signal>true</signal>
 +
    </gpiAction>
 +
</batch>
 +
</pre>
  
===abstract class PathEntity===  
+
=== The Scenario ===
* reference TimeObject
+
Describes how the PathItems are connected to each other <span class="plainlinks">[http://www.supplementstoweightloss.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">best weight loss</span>] to simulate a assembly line in a factory.
* method processdata(batchitem)
+
  
===class ReaderEntitiy extend PathEntity===
+
<pre>
* reference to the UIReader
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* override the processdata() method
+
<scenario>
 +
    <pathUnit>
 +
        <readerID>0</readerID>
 +
        <travelTime>400</travelTime>
 +
    </pathUnit>
 +
    <pathUnit>
 +
        <readerID>0</readerID>
 +
        <travelTime>400</travelTime>
 +
    </pathUnit>
 +
    <pathUnit>
 +
        <readerID>0</readerID>
 +
        <travelTime>400</travelTime>
 +
    </pathUnit>
 +
</scenario>
 +
</pre>
  
===class GPIListernEntity extend PathEntity ===
+
=== The Components ===
* reference to the UIReader
+
Describes the affected devices in the PathItems. That can be RFID readers and in the future some more devices along a assembly line.
* override the processdata() method
+
  
===class timeObject implements observer===
+
<pre>
*Reference to SuspendableTimer
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
*method start
+
<componentList id="0">
*method stop
+
    <readerComponents id="0">
*method suspend
+
        <reader>
*method resume
+
        <numAntennas>1</numAntennas>
*field min value
+
        <numGPIs>4</numGPIs>
*field max value
+
        <numGPOs>4</numGPOs>
*field (boolean) random
+
        <propertiesMap>
*set Observer
+
            <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>
 +
</componentList>
 +
</pre>
  
===class InputData===
+
=== The LoadTestSuite ===
* list of BatchItems
+
Describes how many Scenarios are executed and how are the Batches are connected to the scenarios, the speed new batches are created and how long the wait time will be until it's executed again.
  
===class BatchItem===
+
<pre>
* field ID
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* field trigger (boolean)
+
<loadTestSuite>
* field time (think about that)
+
    <fileUnits>
* list of tags
+
        <fileName>scenario.xml</fileName>
 +
        <fileType>SCENARIO</fileType>
 +
    </fileUnits>
 +
    <fileUnits>
 +
        <fileName>scenario2.xml</fileName>
 +
        <fileType>SCENARIO</fileType>
 +
    </fileUnits>
 +
    <fileUnits>
 +
        <fileName>batch.xml</fileName>
 +
        <fileType>BATCH</fileType>
 +
    </fileUnits>
 +
    <testUnit>
 +
        <batchID>1</batchID>
 +
        <rampTime>4000</rampTime>
 +
        <scenarios>
 +
            <id>1</id>
 +
            <id>2</id>
 +
        </scenarios>
 +
    </testUnit>
 +
    <testUnit>
 +
        <batchID>1</batchID>
 +
        <rampTime>4000</rampTime>
 +
        <scenarios>
 +
            <id>1</id>
 +
        </scenarios>
 +
    </testUnit>
 +
    <testUnit>
 +
        <batchID>1</batchID>
 +
        <rampTime>4000</rampTime>
 +
        <scenarios>
 +
            <id>1</id>
 +
            <id>2</id>
 +
        </scenarios>
 +
    </testUnit>
 +
</loadTestSuite>
 +
</pre>
 +
 
 +
== The Controller ==
 +
The Controller specifies how the input data will be processed. A example "use case" is provided here:  [[TagStreamerSpecification]].
 +
 
 +
As parts of the controller we can identify the following components:
 +
 
 +
* the BatchGenerator
 +
* the PathItem
 +
* the LoadTestProcessor
 +
 
 +
=== The BatchGenerator ===
 +
It uses the Batch as input data and creates the BatchItems which are floating through the Scenario.
 +
 
 +
=== The PathItem ===
 +
A thread which will take a Batch as input and execute the <span class="plainlinks">[http://www.shoppharmacycounter.com/t-dietpillsonline.aspx <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">diet pills</span>] the defined operations in it.
 +
 
 +
=== The LoadTestProcessor ===
 +
A Thread which takes the LoadTestSuite as input and creates all the necessary objects to operate.

Latest revision as of 00:08, 6 November 2011

Tag Streamer 2.0

As we talk about Tag Streamer 2.0 we talk about a new Software. The software comes along with Objects and object orientated programming. One of the modern software development concepts is the "Model Viewer Controller" principle. It defines 3 main parts of a program.

  • the Viewer
  • the Model
  • the Controller

The Viewer

The Viewer will be defined in a later phase of the implementation because the main task of Tag Streamer will be the execution of predefined XML files.

The Model

The Model represents the input data. In Tag Streamer we can identify 4 parts.

  • the Batch
  • the Scenario
  • the Components
  • the LoadTestSuite

The Batch

Describes what should be done on the PathItems along the Scenario.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<batch id="0">
    <waitAction>
        <waitTime>100</waitTime>
    </waitAction>
    <tagAction>
        <execDuration>200</execDuration>
        <number>20</number>
        <prefix>eef</prefix>
        <tagGen>GEN2</tagGen>
        <tagType>CustomEPC96</tagType>
    </tagAction>
    <waitAction>
        <waitTime>100</waitTime>
    </waitAction>
    <gpiAction>
        <port>0</port>
        <signal>true</signal>
    </gpiAction>
</batch>

The Scenario

Describes how the PathItems are connected to each other best weight loss to simulate a assembly line in a factory.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<scenario>
    <pathUnit>
        <readerID>0</readerID>
        <travelTime>400</travelTime>
    </pathUnit>
    <pathUnit>
        <readerID>0</readerID>
        <travelTime>400</travelTime>
    </pathUnit>
    <pathUnit>
        <readerID>0</readerID>
        <travelTime>400</travelTime>
    </pathUnit>
</scenario>

The Components

Describes the affected devices in the PathItems. That can be RFID readers and in the future some more devices along a assembly line.

<?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>
</componentList>

The LoadTestSuite

Describes how many Scenarios are executed and how are the Batches are connected to the scenarios, the speed new batches are created and how long the wait time will be until it's executed again.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<loadTestSuite>
    <fileUnits>
        <fileName>scenario.xml</fileName>
        <fileType>SCENARIO</fileType>
    </fileUnits>
    <fileUnits>
        <fileName>scenario2.xml</fileName>
        <fileType>SCENARIO</fileType>
    </fileUnits>
    <fileUnits>
        <fileName>batch.xml</fileName>
        <fileType>BATCH</fileType>
    </fileUnits>
    <testUnit>
        <batchID>1</batchID>
        <rampTime>4000</rampTime>
        <scenarios>
            <id>1</id>
            <id>2</id>
        </scenarios>
    </testUnit>
    <testUnit>
        <batchID>1</batchID>
        <rampTime>4000</rampTime>
        <scenarios>
            <id>1</id>
        </scenarios>
    </testUnit>
    <testUnit>
        <batchID>1</batchID>
        <rampTime>4000</rampTime>
        <scenarios>
            <id>1</id>
            <id>2</id>
        </scenarios>
    </testUnit>
</loadTestSuite>

The Controller

The Controller specifies how the input data will be processed. A example "use case" is provided here: TagStreamerSpecification.

As parts of the controller we can identify the following components:

  • the BatchGenerator
  • the PathItem
  • the LoadTestProcessor

The BatchGenerator

It uses the Batch as input data and creates the BatchItems which are floating through the Scenario.

The PathItem

A thread which will take a Batch as input and execute the diet pills the defined operations in it.

The LoadTestProcessor

A Thread which takes the LoadTestSuite as input and creates all the necessary objects to operate.

Personal tools