com.sap.ip.me.api.pios.rfid
Class RfidTagUserArea

java.lang.Object
  extended bycom.sap.ip.me.api.pios.rfid.RfidTagUserArea

public abstract class RfidTagUserArea
extends java.lang.Object

Represents a tag area defined as writable or readable in a tag configuration file. Provides the user with the starting and ending position of a tag writable or readable area.

Example: Open RFID connection and read the first readable area (field) for the first identified tag.

 
 
	Connector connector = Connector.getInstance();
		  			
	DriverInfo[] rfidDrivers = connector.listDrivers(ConnectionType.RFID);
		  			
	RfidParameters rfidParams = new RfidParameters(rfidDrivers[0]);
		  			
	RfidConnection rfidConnection = (RfidConnection)connector.open(rfidParams);
		  
	RfidTagType tagType = rfidConnection.getTagType("INTELLITAGISOGEN1");
		 
	RfidTagUserArea[] areas = tagType.getUserReadableAreas();
		  
	if (areas.length > 0) {

		System.out.println("StartPosition=" + areas[0].getStartPos());
				 
	 	System.out.println("EndPosition=" + areas[0].getEndPos());
				
		RfidTag[] tags = rfidConnection.identify(tagType);
				
		if (tags.length > 0) {
					
			RfidTagData data = rfidConnection.read(tagList[0],areas[0].getStartPos(), 
								areas[0].getEndPos() - areas[0].getStartPos() + 1); 

					
			// Use tag data ...
		}
		else {
	
			System.out.println("No tags in range");
				
		}
	}	
	else {
		
		System.out.println("Tag type is read only!");

	}	

  rfidConnection.close();

 
 

Since:
MI 2.5
Author:
Abaco
See Also:
RfidTagType, RfidConnection

Constructor Summary
RfidTagUserArea()
           
 
Method Summary
abstract  int getEndPos()
          Returns the writable/readable area ending position.
abstract  int getStartPos()
          Returns the writable/readable area starting position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RfidTagUserArea

public RfidTagUserArea()
Method Detail

getStartPos

public abstract int getStartPos()
Returns the writable/readable area starting position.

Returns:
The area starting position.

getEndPos

public abstract int getEndPos()
Returns the writable/readable area ending position.

Returns:
The area ending position.


Copyright © 2005 SAP AG. All Rights Reserved.