WebSphere brand IBM WebSphere Sensor Events, Version 6.2

Edge Configuration sample XML

This topic contains example XML configurations.

If you have installed the sample projects, a sample XML file is also available in IBM_RFID_HOME/Configurations/com.ibm.rfid.resource.toolkit/edge-rdrsim-llrp.xml.

Examples

Sample 1: Create or update a Managed Service configuration with the specified PID.

<configurationAdmin>
 <requests>
	<request type="createOrUpdate">
	<configurations>
	 <configuration pid="com.ibm.rfid.edge.config">
		<properties>
		<property key="com.ibm.rfid.edge.config.url" value="file:edge.xml"/>
		<property key="com.ibm.rfid.edge.config.interval" value="10000"/>
		<property key="com.ibm.rfid.edge.config.autostart" value="true"/>
		</properties>
	 </configuration>
	</configurations>
  </request>
 </requests>
</configurationAdmin>

Sample 2: Create a Managed Service configuration with the specified PID only if it does not already exist.

<configurationAdmin>
 <requests>
	<request type="create">
	 <configurations>
		<configuration pid="com.ibm.rfid.edge.config">
		 <properties>
		 <property key="com.ibm.rfid.edge.config.url" value="file:edge.xml"/>
		 <property key="com.ibm.rfid.edge.config.interval" value="10000"/>
		 <property key="com.ibm.rfid.edge.config.autostart" value="true"/>
		 </properties>
		</configuration>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

Sample 3: Update an existing Managed Service configuration with the specified PID. A new configuration will not be created if one does not already exist.

<configurationAdmin>
 <requests>
	<request type="update">
	 <configurations>
		<configuration pid="com.ibm.rfid.edge.config">
		 <properties>
		 <property key="com.ibm.rfid.edge.config.url" value="file:edge.xml"/>
		 <property key="com.ibm.rfid.edge.config.interval" value="10000"/>
		 <property key="com.ibm.rfid.edge.config.autostart" value="true"/>
		 </properties>
		</configuration>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

Sample 4: Create a Managed Service Factory configuration using the specified Factory PID.

<configurationAdmin>
 <requests>
	<request type="create">
	 <configurations>
		<configuration factoryPid="com.ibm.rfid.agent.rfidmap.bundle.RFIDMapAgentActivator">
		 <properties>
		 <property key="portal.id" value="P1"/>
		 <property key="portal.name" value="PortalName1"/>
		 <property key="topics.publish" value="receiving/portal/P1/signal/tags"/>
		 <property key="topics.subscribe" value="R1/RfidInventory/TagReport,R1/RfidInventory/TagAggregationReport"/>
		 <property key="tracing" value="false"/>
		 </properties>
		</configuration>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

Sample 5: Update an existing Managed Service Factory configuration, or configurations unless the filter is guaranteed to only deliver a single configuration, using the specified filter value. Note that the factoryPid attribute is not specified.

<configurationAdmin>
	<requests>
		<request type="update">
			<configurations>
				<configuration filter="(&(portal.id=P1)(factoryPid=com.ibm.rfid.agent.rfidmap.bundle.RFIDMapAgentActivator))">
					<properties>
						<property key="portal.id" value="P1"/>
						<property key="portal.name" value="PortalName1"/>
						<property key="topics.publish" value="receiving/portal/P1/signal/tags"/>
						<property key="topics.subscribe" value="R1/RfidInventory/TagReport,R1/RfidInventory/TagAggregationReport"/>
						<property key="tracing" value="false"/>
					</properties>
				</configuration>
			</configurations>
		</request>
	</requests>
</configurationAdmin>

Sample 6: Create or update a Managed Service Factory configuration. If no configurations matching the filter exist, create a new one; otherwise, update all existing ones. Note that the factoryPid is specified so that a new configuration can be created if one does not already exist.

<configurationAdmin>
 <requests>
	<request type="createOrUpdate">
	 <configurations>
		<configuration factoryPid="com.ibm.rfid.agent.rfidmap.bundle.RFIDMapAgentActivator" 
filter="(&(portal.id=P1)(factoryPid=com.ibm.rfid.agent.rfidmap.bundle.RFIDMapAgentActivator))">
		 <properties>
		 <property key="portal.id" value="P1"/>
		 <property key="portal.name" value="PortalName1"/>
		 <property key="topics.publish" value="receiving/portal/P1/signal/tags"/>
		 <property key="topics.subscribe" 
value="R1/RfidInventory/TagReport,R1/RfidInventory/TagAggregationReport"/>
		 <property key="tracing" value="false"/>
		 </properties>
		</configuration>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

Sample 7: Update all configurations matching the specified filter. This example demonstrates how to update multiple configurations sharing a common property. In effect, this example turns tracing on for all agents associated with portal P1 as well as all controller agents associated with Edge E1.

<configurationAdmin>
 <requests>
	<request type="update">
	 <configurations>
		<configuration filter="(|(portal.id=P1)(edge.id=E1))">
		 <properties>
		 <property key="tracing" value="true"/>
		 </properties>
		</configuration>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

Sample 8: Delete all configurations matching the specified filter. In effect, this example would delete all configurations currently contained within the ConfigurationAdmin service except for the one associated with the Data Capture and Delivery Configuration Service.

<configurationAdmin>
 <requests>
	<request type="delete">
	 <configurations>
		<configuration filter="(!(service.pid=com.ibm.rfid.edge.config))"/>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

Sample 9: Delete the configuration with the specified PID. The following two requests are equivalent.

<configurationAdmin>
 <requests>
	<request type="delete">
	 <configurations>
		<configuration pid="com.ibm.rfid.edge.config"/>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

<configurationAdmin>
 <requests>
	<request type="delete">
	 <configurations>
		<configuration filter="(service.pid=com.ibm.rfid.edge.config)"/>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

Sample 10: Create a new configuration containing properties of type other than "string" and cardinalities of "0" using the specified Factory PID. The previously mentioned properties would be stored within the configuration dictionary as arrays of primitive bytes (such as, byte[]).

<configurationAdmin>
 <requests>
	<request type="create">
	 <configurations>
		<configuration factoryPid="org.eclipse.soda.dk.symbol.bsp.device.factory.SymbolBspDeviceFactory">
		 <properties>
		 <property key="id" value="R1"/>
		 <property key="idname" value="R1"/>
		 <property key="prefix" value="R1"/>
		 <property key="ParameterBlockAntenna0SetOnlyRequest" value="FF,0,1,0" type="byte" cardinality="4"/>
 <!-- new byte[] {0xff,0x00,0x01,0x00} -->
		 <property key="ParameterBlockAntenna1SetOnlyRequest" value="FF,0,0,0" type="byte" cardinality="4"/>
 <!-- new byte[] {0xff,0x00,0x00,0x00} -->
		 <property key="ParameterBlockAntenna2SetOnlyRequest" value="FF,0,0,0" type="byte" cardinality="4"/>
 <!-- new byte[] {0xff,0x00,0x00,0x00} -->
		 <property key="ParameterBlockAntenna3SetOnlyRequest" value="FF,0,0,0" type="byte" cardinality="4"/>
 <!-- new byte[] {0xff,0x00,0x00,0x00} -->	
		 </properties>
		</configuration>
	 </configurations>
	</request>
 </requests>
</configurationAdmin>

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.