Consortium
Activities
Projects
Forge
Events
Log-in
Register
Patrolman Demonstration
Space Menu
Consortium
|
Solutions
|
Middleware
|
Forge
|
MyObjectWeb
|
PDF
|
History
|
More Actions
View
Code
|
XML
|
Help
Documentation
|
XWiki Syntax
|
1 Patrolman demonstration #toc("" "" "") 1.1 Short description Nowadays, no option allows interaction on data retrieved from logical readers, even if a logical reader can be a fully interactive device, like a mobile phone. The aim of this demonstration is to provide a standard way to show a questionnaire to an user each time a specific tag is found. A questionnaire may be composed of different elements (textual questions and choices lists), to help the user describe the element he is analyzing. For example, a patrolman may have to control many check points in an industrial building. His phone may be considered as a logical reader. He will start by downloading one or more ECSpec XML file from a bluetooth server. These files contain the list of all questionnaires and the associated tag UID or record type patterns. While patrolling, the operator will use his phone to read the RFID tag of every item he has to check. For every tag read, the associated questionnaire will be displayed. At the end of the patrol, he will simply submit the fulfilled questionnaires back to the ALE server. 1.1 User documentation On the server side, the patrolman-server bundle must be active. It relies on the [bluetoothServer>Main.Documentation.Bundles.BluetoothServer] bundle. On the client side, simply install the .jad and .jar files. When the client encounter an unknown pattern, nothing is shown on the screen. When a known pattern is encountered and multiple questionnaires are valid, the first questionnaire is shown. Currently, the server just show the ECReports on the console output. 1.1 Technical documentation The ECSpec format has been extended to make an interactive logical reader, like a phone, to display a specific questionnaire when a given pattern has been detected in a tag. When the client receives an ECSpec file, it prepares in memory a screen per questionnaire, ready to be shown on tag detection. The questionnaires are defined in the <questionnaire> XML extension element in group specification elements The client specifies the questionnaire to display via a <questionnaire> XML element and the associated tag information pattern in report groups specifications. 1.1.1 Sample report specification with a questionnaire Here is a sample questionnaire, containing several questions displayed every time the reader will find a tag with the pattern: "urn:nfc:wkt:Uri". {code:xml} <reportSpec reportName="ReportDevice"> <reportSet set="CURRENT" /> <groupSpec> <pattern>urn:nfc:wkt:Uri</pattern> <extension> <extension> <questionnaire title="Device State" id="DevState"> <textual id="message"> <label>Value shown</label> <default>None</default> </textual> <choiceList id="state"> <label>Unique</label> <choice>Good</choice> <choice>Medium</choice> <choice>Bad</choice> </choiceList> <choiceList id="control_leds" multiple="true"> <label>Multiple</label> <choice>Red</choice> <choice>Blue</choice> <choice>Green</choice> </choiceList> </questionnaire> </extension> </extension> </groupSpec> </reportSpec> {code} 1.1.1 Questionnaire extension XMLSchema {code:xml} <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://aspirerfid.ow2.org/ECSpec/extensions/questionnaire" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://aspirerfid.ow2.org/ECSpec/extensions/questionnaire"> <element name="questionnaire" type="tns:Questionnaire"></element> <complexType name="Questionnaire"> <sequence> <element name="textual" type="tns:textualType" maxOccurs="unbounded" minOccurs="0"> </element> <element name="choiceList" type="tns:choiceListType" maxOccurs="unbounded" minOccurs="0"> </element> </sequence> <attribute name="id" type="string" use="required"></attribute> <attribute name="title" type="string" use="required"></attribute> </complexType> <complexType name="QuestionType"> <sequence> <element name="label" type="string" maxOccurs="1" minOccurs="1"></element> </sequence> <attribute name="id" type="string" use="required"></attribute> </complexType> <complexType name="textualType"> <complexContent> <extension base="tns:QuestionType"> <sequence> <element name="default" type="string" maxOccurs="1" minOccurs="0"></element> <element name="answer" type="string" maxOccurs="1" minOccurs="0"></element> </sequence> <attribute name="default" type="string" use="optional"></attribute> </extension> </complexContent> </complexType> <complexType name="choiceListType"> <complexContent> <extension base="tns:QuestionType"> <sequence> <element name="choice" type="string" maxOccurs="unbounded" minOccurs="1"> </element> </sequence> <attribute name="multiple" type="boolean" use="optional" default="false"></attribute> <attribute name="default" type="int" use="optional" default="0"></attribute> </extension> </complexContent> </complexType> </schema> {code} 1.1 Tips for future improvements * When an unknown tag is encountered, show a default questionnaire (free text area). * When multiple questionnaires corresponds to the read tag, let the user choose the good questionnaire. * Do something with the questionnaires data when the server gets an ECReport file (storage, statistics...)