The Device Access provides default implementation for device configurations.To use it, you should install and start com.prosyst.mbs.da.config.jar bundle. The default implementation allows you to create configurations in declarative form. That is the configurations are stored in XML files validated by the following XSD Schema. The XML configurations are provided by separated bundle. This bundle has specific manifest header which is described further bellow.
The configuration XML file semantically can be separated into three logical parts:
The main idea is to describe a restriction for which Devices to be applied the configuration using device filtering and device item filtering. The device filtering and item filtering together determine whether the device matches the configuration. After the device is matched to the configuration, it should be configured using the descriptions in the device configuring section. The device items configuration are going to be applied after the device and device item filtering have matched.
Detailed information for device configuring is organized in the following sections:
Manifest Header
The bundle that provides XML device configurations should have special manifest header - "DAConfig" that has two attributes:
org.osgi.framework.Version) format. The version attribute, except as a XML file version, is used for the configuration version. It is possible to have more than one configurations in one XML file. This means that these configurations will have the same versions – the version of the XML file.The following examples show valid manifest headers:
DAConfig:
The next example shows the manifest header of the Device Access Configuration Demo bundle.
DAConfig:
xml=/xml/config/device-configuration.xml;version = "1.0.0",
xml=/xml/config/device-item-configuration.xml;version = "1.0.0",
xml=/xml/config/device-item-configuration-retry.xml;version = "1.0.0"