Tag Configuration
Manager
In this example a new tag type configuration is added. The program performs the following steps:
...
1. Gets the RFID parameters from the first driver and, using them, opens the connection to the RFID reader.
2. Adds the "NewTagType" configuration and sets all the tag parameters to "NEW VALUE". Displays each of the modified tag parameters.
3. Saves the configuration.

The value, "NEWVALUE", is used to illustrate the use of the tag configuration manager and not intended to be used in reality.
import com.sap.ip.me.api.pios.PIOSException;
import com.sap.ip.me.api.pios.configuration.Configuration;
import com.sap.ip.me.api.pios.connection.*;
import com.sap.ip.me.api.pios.rfid.*;
public class ExampleTagConfigurationManager {
public static void main(String[] args) {
RfidConnection rfid = null;
try {
//----------------------(1)--------------------
Connector connector = Connector.getInstance();
DriverInfo[] rfidDrivers =
connector.listDrivers(ConnectionType.RFID);
if (rfidDrivers.length > 0) {
RfidParameters parameters = new RfidParameters(rfidDrivers[0]);
rfid = (RfidConnection) connector.open(parameters);
TagConfigurationManager manager =
rfid.getTagConfigurationManager();
//----------------------(2)--------------------
Configuration tagConfiguration =
manager.addTagConfiguration("NewTagType");
String[] tagParameters = tagConfiguration.getParameters();
for (int i = 0; i < tagParameters.length; i++) {
tagConfiguration.setParameterValue(
tagParameters[i],
"NEWVALUE");
System.out.println(tagParameters[i]);
}
//----------------------(3)--------------------
manager.save();
} else {
System.out.println("There are no RFID drivers.");
}
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try {
rfid.close();
} catch (PIOSException pex) {
pex.printStackTrace();
}
}
}
}