WebSphere brand IBM WebSphere Sensor Events, Version 6.2

Working with the ECReports servlet

This topic includes an example of an ECReport XML received by the servlet to create an IBM® Sensor Event, and an example of the corresponding IBM Sensor Event.

Example ECReport XML

The following is an example of the ECReport XML that is sent to the servlet from an ALE 1.1 implementation.

<?xml version="1.0"?>
<ECReports xmlns="urn:epcglobal:ale:xsd:1" schemaVersion="1.1"
   creationDate="2008-02-19T10:54:06.444-05:00" specName="ECSpec1"
   date="2008-02-19T10:54:06.444-05:00" ALEID="ALEID_1"
   totalMilliseconds="5000" terminationCondition="DURATION">
   <reports>
      <report reportName="ReportName1">
         <group>
            <groupList>
               <member>
                  <tag>
                     urn:epc:tag:sgtin-96:3.0037000.006542.773346595
                  </tag>
                  <extension>
                     <fieldList>
                        <field>
                           <name>quantity</name>
                           <value>10</value>
                           <fieldspec>
                              <fieldname>@3.0.32</fieldname>
                              <datatype>uint</datatype>
                              <format>decimal</format>
                           </fieldspec>
                        </field>
                     </fieldList>
                     <stats>
                        <stat>
                           <profile>TagTimestamps</profile>
                           <firstSightingTime>
                              2008-02-19T10:54:06.444-05:00
                           </firstSightingTime>
                           <lastSightingTime>
                              2008-02-19T10:54:06.455-05:00
                           </lastSightingTime>
                        </stat>
                        <stat>
                           <profile>IBMTagTimestamps</profile>
                           <statBlocks>
                              <statBlock>
                                 <readerName>R1</readerName>
                                 <firstSightingTime>
                                    2008-02-19T10:54:06.444-05:00
                                 </firstSightingTime>
                                 <lastSightingTime>
                                    2008-02-19T10:54:06.455-05:00
                                 </lastSightingTime>
                              </statBlock>
                              <statBlock>
                                 <readerName>R2</readerName>
                                 <firstSightingTime>
                                    2008-02-19T10:54:06.444-05:00
                                 </firstSightingTime>
                                 <lastSightingTime>
                                    2008-02-19T10:54:06.455-05:00
                                 </lastSightingTime>
                              </statBlock>
                           </statBlocks>
                           <firstSightingTime>
                              2008-02-19T10:54:06.444-05:00
                           </firstSightingTime>
                           <lastSightingTime>
                              2008-02-19T10:54:06.455-05:00
                           </lastSightingTime>
                        </stat>
                        <stat>
                           <profile>IBMTagCounts</profile>
                           <statBlocks>
                              <statBlock>
                                 <readerName>R1</readerName>
                                 <count>10</count>
                              </statBlock>
                              <statBlock>
                                 <readerName>R2</readerName>
                                 <count>6</count>
                              </statBlock>
                           </statBlocks>
                           <count>2</count>
                        </stat>
                        <stat>
                           <profile>IBMTagAntennas</profile>
                           <statBlocks>
                              <statBlock>
                                 <readerName>R1</readerName>
                                 <antennas>
                                    <antenna>0</antenna>
                                    <antenna>1</antenna>
                                 </antennas>
                              </statBlock>
                              <statBlock>
                                 <readerName>R2</readerName>
                                 <antennas>
                                    <antenna>1</antenna>
                                 </antennas>
                              </statBlock>
                           </statBlocks>
                        </stat>
                        <stat>
                           <profile>IBMReaderNames</profile>
                           <statBlocks>
                              <statBlock>
                                 <readerName>R1</readerName>
                              </statBlock>
                              <statBlock>
                                 <readerName>R2</readerName>
                              </statBlock>
                           </statBlocks>
                        </stat>
                     </stats>
                  </extension>
               </member>
            </groupList>
            <groupCount>
               <count>1</count>
            </groupCount>
         </group>
      </report>
      <report reportName="ReportName2" />
   </reports>
   <ECSpec creationDate="2008-02-19T10:54:06.444-05:00"
      schemaVersion="1.1">
      <logicalReaders>
         <logicalReader>R1</logicalReader>
      </logicalReaders>
      <boundarySpec>
         <repeatPeriod unit="MS">10000</repeatPeriod>
         <duration unit="MS">5000</duration>
      </boundarySpec>
      <reportSpecs>
         <reportSpec reportName="ReportName1">
            <reportSet set="CURRENT" />
            <output includeTag="true" includeCount="true" />
         </reportSpec>
      </reportSpecs>
   </ECSpec>
</ECReports>

Example generated IBM Sensor Event

The following is an example of the IBM Sensor Event generated using the ECReports sample above.

version: 6.2
name: ibmse_header
	      attributes: {
	      name: sourceId, value: ALEID_1, type: 18
	      name: eventType, value: EDDR/report/TaggregationReport, type: 18
	      name: priority, value: 70, type: 16
	      name: dateTime, value: 2008-07-03T10:12:35.015Z, type: 5
	      name: eventId, value: IBMSensorEvent_8c77d029-276b-418a-88e4-a64662905dc7, type: 18}
	      groups: {
	      name: sourceComponent
		    attributes: {
		    name: componentType, value: none, type: 18
		    name: locationType, value: Unknown, type: 18
		    name: componentIdType, value: Application, type: 18
		    name: location, value: none, type: 18
		    name: subComponent, value: none, type: 18
		    name: component, value: none, type: 18
		    name: application, value: IBM WebSphere Sensor Events, type: 18}
		    groups: {}}
name: ibmse_payloadMetaData
	      attributes: {
	      name: lastSightingTime, value: 2008-02-19T23:54:06.455+08:00, type: 18
	      name: antennas, value: 1, type: 18
	      name: CreationDate, value: 2008-02-19T23:54:06.444+08:00, type: 18
	      name: reportnames, value: ReportName1, ReportName2, , type: 18
	      name: count, value: 6, type: 18
	      name: firstSightingTime, value: 2008-02-19T23:54:06.444+08:00, type: 18}
	      groups: {}
name: ibmse_payload
	      attributes: {
	      name: AGGCOUNT, value: 1, type: 12}
	      groups: {
	      name: EDDR/report/TaggregationReport
		    attributes: {}
		    groups: {
		    name: tagread_1
			  attributes: {
			  name: ANTENNA, value: 1, type: 12
			  name: DISCOVERED, value: 2008-07-03T10:12:35.031Z, type: 5
			  name: COUNT, value: 2, type: 12
			  name: reader, value: R1, type: 18}
			  groups: {
			  name: tag
				attributes: {
				name: rawuri, value: urn:epc:raw:96.x30740242200663802E185523, type: 18
				name: taguri, value: urn:epc:tag:sgtin-96:3.0037000.006542.773346595, type: 18
				name: iduri, value: urn:epc:id:sgtin:0037000.006542.773346595, type: 18
				name: tagid, value: 30740242200663802E185523, type: 18}
				groups: {}}}}
payloadClassName: com.ibm.sensorevent.model.payload.PassiveRFIDAggregatedTagReadPayload

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2009. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.