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

java.lang.Object
  extended bycom.sap.ip.me.api.pios.configuration.ConfigurationManager
      extended bycom.sap.ip.me.api.pios.rfid.TagConfigurationManager

public class TagConfigurationManager
extends ConfigurationManager

The TagConfigurationManager is used to manage the various RFID tag Types that will be supported by an RFID reader. A tag type configuration represents a logical tag type that maps to physical RFID tag type. Since most mobile RFID readers use a set of pre-defined/supported tag types, the default configuration contains entries that match the RFID reader's most commonly used tag types. To map additional tag types, the tag type must be supported by the RFID reader. All changes to the tag type configurations are handled through this class. The RFID connection must be reopened for any changes to take effect.

Example: Add a new tag configuration
 
 
	Connector connector = Connector.getInstance();		 

	DriverInfo[] rfidDrivers = connector.listDrivers(ConnectionType.RFID);

	RfidParameters parameters = new RfidParameters(rfidDrivers[0]);

	RfidConnection rfid = (RfidConnection)connector.open(parameters);

	TagConfigurationManager manager = rfid.getTagConfigurationManager();

	Configuration tagConfiguration = manager.addTagConfiguration("NewTagType");

	String[] tagParameters = tagConfiguration.getParameters();

	for (int i=0; i<tagParameters.length; i++) {

		tagConfiguration.setParameterValue(tagParameters[i], "NEW VALUE");

	}		

	manager.save();

	rfid.close();
	
   
 
 

Since:
MI 2.5
Author:
Abaco
See Also:
com.sap.ip.me.api.pios.configuration, RfidConnection

Constructor Summary
protected TagConfigurationManager(ConfigurationManager confManager)
          Creates a new TagConfigurationManager using the specified configuration manager.
 
Method Summary
 Configuration addTagConfiguration(java.lang.String tagName)
          Adds a new empty tag configuration to this RFID connection.
 void deleteTagConfiguration(java.lang.String tagName)
          Deletes a tag configuration for this RFID connection.
 Configuration getTagConfiguration(java.lang.String tagName)
          Returns the tag Configuration object for the specified tag configuration name.
 java.lang.String[] listTagTypeNames()
          Returns available tag names for this RFID connection.
 void save()
          Stores all tag configuration changes.
 
Methods inherited from class com.sap.ip.me.api.pios.configuration.ConfigurationManager
add, delete, get, getConfig, getHeaderName, getParamaterValue, getParameters, getPossibleValues, getTypes, list, list, setParameterValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TagConfigurationManager

protected TagConfigurationManager(ConfigurationManager confManager)
                           throws ConfigurationException
Creates a new TagConfigurationManager using the specified configuration manager.

Parameters:
confManager - the configuration manager
Throws:
ConfigurationException - thrown if there is an error while loading the configuration or metadata files
Method Detail

addTagConfiguration

public Configuration addTagConfiguration(java.lang.String tagName)
                                  throws ConfigurationException
Adds a new empty tag configuration to this RFID connection.

Parameters:
tagName - the tag configuration name
Returns:
A new tag Configuration object.
Throws:
ConfigurationException - thrown if unable to create new tag configuration.

deleteTagConfiguration

public void deleteTagConfiguration(java.lang.String tagName)
                            throws ConfigurationException
Deletes a tag configuration for this RFID connection.

Parameters:
tagName - the tag configuration name
Throws:
ConfigurationException - thrown if unable to delete the tag configuration

listTagTypeNames

public java.lang.String[] listTagTypeNames()
                                    throws ConfigurationException
Returns available tag names for this RFID connection. If there are no tags configured an empty array is returned.

Returns:
A string array with the name of all configured tags.
Throws:
ConfigurationException - thrown if an error occurs while obtaining the tag list

getTagConfiguration

public Configuration getTagConfiguration(java.lang.String tagName)
                                  throws ConfigurationException
Returns the tag Configuration object for the specified tag configuration name.

Parameters:
tagName - the tag configuration name
Returns:
The tag Configuration object.
Throws:
ConfigurationException - thrown if unable to get the tag configuration for this connection

save

public void save()
          throws ConfigurationException
Stores all tag configuration changes. Changes will be reflected after closing and opening the connection.

Overrides:
save in class ConfigurationManager
Throws:
ConfigurationException - thrown if an error occurs while saving the tag configuration file


Copyright © 2005 SAP AG. All Rights Reserved.