This topic provides information about the XML schema definition and sample XML configuration files that you can use as a reference when configuring your WebSphere® Sensor Events.
You can configure the server using the Import Configuration link in the WebSphere Sensor Events Administrative Console, by using a command line utility, or by posting a valid XML configuration file to the XMLConfigAdmin servlet. To post an XML configuration file, use the following link:
http://premises_server_host_name:port/ibmrfidadmin/XMLConfigAdmin
The XML schema defines the rules for headless configuration of the WebSphere Sensor Events. The IBMRFIDConfigAdmin.xsd schema file is located in the IBM_RFID_HOME\premises\tools\xsdschemas directory. It was installed as part of the WebSphere Sensor Events installation and contains the actual rules used on the server.
The request element
The request element defines the request type that the server executes when receiving the XML configuration. The valid request types are create, update, and delete. When receiving a create request type, the server attempts to create the requested system object. If that system object already exists, the request type fails with a “system object already exists” error. The update request type performs a hard update, meaning that if the system object already exists, the system object is updated. Otherwise, the system object is created. In most cases, use the update request type. The delete request type deletes the specified system object. The other attribute on the Request element is cascade. Cascade applies only to the update of agent configurations. It is ignored with all other elements. When cascade is equal to true, all update to any agents specified cause an update to this agent's configuration in all configuration groups.
The agentconfigurations element
The agentconfiguration element defines one or more agents that are updated, created, or deleted based on the request type. A subelement of the agentconfigurations element is the configuration element. This element defines the actual agent system object with its property set that the operation is performed against. When defining properties, you must have an understanding of how to define special properties such as ID and name. These properties are usually substituted at runtime with real values. Below, is a list of macro names that are substitutable at runtime. You may use any of these names when defining properties.
ControllerAgent string substitution name ( Macros ) | Value |
---|---|
%PREMISES_IP% | WebSphere Sensor Events IP address |
%CONTROLLER_ID% | Controller ID from table sage.controller.controller_id |
%CONTROLLER_NAME% | Controller name from table sage.controller.username |
%LOGGING_THRESHOLD% | Logging threshold from table sage.controller.alertagentthreshold |
%LOCATION_ID% | Location ID from table sage.location.location_id |
%LOCATION_NAME% | Location name from table sage.location.username |
%SELFTEST_MODE% | Self test mode from table sage.location.Isinselftestmode |
%READER_ID% | Reader ID from table sage.reader.reader_id |
%READER_NAME% | Reader name from table sage.reader.username |
%READER_COM_PORT% | Reader serial port number from table sage.reader.serialport |
%READER_IP% | Reader IP address from table sage.reader.ipaddress |
%READER_REMOTE_PORT% | Reader IP port number from table sage.reader.ipport |
%READER_TRANSPORT_CLASS% | Reader communication protocol package name from table sage.reader.commprotocol |
%PRINTER_ID% | Printer ID from table sage.printer.printer_id |
%PRINTER_NAME% | Printer name from table sage.printer.username |
%PRINTER_COM_PORT% | Printer serial port number from table sage.printer.serialport |
%PRINTER_IP% | Printer IP address from table sage.printer.ipaddress |
%PRINTER_REMOTE_PORT% | Printer IP port number from table sage.printer.ipport |
%PRINTER_TRANSPORT_CLASS% | Printer communication protocol package name from table sage.printer.commprotocol |
%READERS_STR% | All reader IDs belong to specific edge id. separate with "," |
%LOCATIONS_STR% | All location IDs belong to specific edge id. separate with "," |
<agentconfigurations> <configuration name="HealthCheckAgent" factoryPid="com.ibm.rfid.agent.healthcheck.bundle.HealthCheckAgentManagedServiceFactoryActivator" config-group-type="LocationType"> <properties> <property key="portal.id" value="%LOCATION_ID%"/> <property key="portal.initial" value="ON"/> <property key="portal.name" value="%LOCATION_NAME%"/> <property key="reader.id" value="%READER_ID%"/> <property key="tracing" value="false"/> <property key="device.names" value="motionsensor,barrier,switch,reset"/> </properties> </configuration> </agentconfigurations>
The configurationgroup element
The configurationgroup element defines a configuration group. When defining a configuration group, you can define the agents to associate with the configuration group. The list of agents specified for a configuration must be a complete list of agents with their complete property set definition, not just a subset of the agents or their properties. Creating agents associated with a configuration group also creates the default agent definition using the specified properties. This agent is then available when other configuration groups of that type are created. IBM® recommends that you create configuration groups first because all system objects must be associated with some existing configuration group.
The device element
The device element defines a device system object. If the device is of the reader or printer category, the XML must contain the following device metadata or the device will not operate:
COMMPROTOCOL with a value of TCPIP or SERIAL
<serverconfigurations> <devices> <device config-group-name="Samsys" deviceid="81" deviceidprefix="R" devicename="Door 1"> <device-category-metadata name="IPADDRESS" value="127.0.0.1" description="ipaddress"/> <device-category-metadata name="IPPORT" value="2101" description="ipport"/> <device-category-metadata name="COMMPROTOCOL" value="TCPIP" description="protocol"/> </device> </devices> </serverconfigurations>
All sample XML configurations are located in IBM_RFID_HOME\premises\install\conf directory.