Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.connecterra.ale.reader
Class DeviceUnit

    java.lang.Object
      com.connecterra.ale.reader.DeviceUnit

    public class DeviceUnit

extends Object

A logical unit of operation within a physical device. For example, each antenna on an RFID device.

Constructor Summary
`DeviceUnit(AbstractPhysicalDevice pr, PluginConfig config, String deviceUnitKeyNamePrefix, String telemetryDeviceName, int deviceUnitNumber, DeviceUnitCapabilities deviceUnitCaps)`

Method Summary
`static void` | `addToPluginMeta(DynamicConfigFactory factory, PluginMeta pluginMeta, String deviceUnitKeyNamePrefix, MessageFormat deviceUnitParameterPattern, int deviceUnitNumber, DeviceUnitCapabilities caps)`
`static void` | `addToPluginMeta(DynamicConfigFactory factory, PluginMeta pluginMeta, String deviceUnitKeyNamePrefix, MessageFormat deviceUnitParameterPattern, int deviceUnitNumber, DeviceUnitCapabilities caps, boolean isRequired)` Adds appropriate PluginParameterMeta objects to the PluginMeta as needed by the framework.
`DeviceUnitCapabilities` | `getCapabilities()`
`int` | `getDeviceUnitNumber()`
`DefaultLogicalReader` | `getLogicalReader()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DeviceUnit

    public DeviceUnit(AbstractPhysicalDevice pr,
                      PluginConfig config,
                      String deviceUnitKeyNamePrefix,
                      String telemetryDeviceName,
                      int deviceUnitNumber,
                      DeviceUnitCapabilities deviceUnitCaps)
               throws com.connecterra.ale.reader.DeviceConfigurationException,
                      com.connecterra.ale.resources.PluginLoadException

Throws:
  `com.connecterra.ale.reader.DeviceConfigurationException`
  `com.connecterra.ale.resources.PluginLoadException`

Method Detail

### addToPluginMeta

    public static void addToPluginMeta(DynamicConfigFactory factory,
                                       PluginMeta pluginMeta,
                                       String deviceUnitKeyNamePrefix,
                                       MessageFormat deviceUnitParameterPattern,
                                       int deviceUnitNumber,
                                       DeviceUnitCapabilities caps,
                                       boolean isRequired)

  Adds appropriate PluginParameterMeta objects to the PluginMeta as needed by the framework. All physical device implementations should call this method from their own getPluginMeta methods. If the driver has more than one device unit, this method should be called multiple times with a unique `deviceUnitNumber` each time.

  Currently, this adds two parameters. The exact form of the parameters are specified by the `deviceUnitParameterPattern` argument. This argument is formatted with two strings: the first is the `deviceUnitNumber`, and the second is "Logical Reader Name" for the first parameter, and "Filter Names" for the second parameter.

  The key names for these parameters are "ABCLogicalReaderName" and "ABCLogicalReaderFilterNames", where ABC is the value of the `deviceUnitKeyNamePrefix` argument. If this argument is an empty string, then the first character of the key names is made lower-case.

  Parameters:
    `factory` - a `DynamicConfigFactory` value
    `pluginMeta` - a `PluginMeta` value to which parameters are added
    `deviceUnitKeyNamePrefix` - a `String` value
    `deviceUnitParameterPattern` - a `MessageFormat` value
    `deviceUnitNumber` - an `int` value
    `caps` - the `DeviceUnitCapabilities` for the unit
    `isRequired` - true if the logical reader name parameter is required.

### addToPluginMeta

    public static void addToPluginMeta(DynamicConfigFactory factory,
                                       PluginMeta pluginMeta,
                                       String deviceUnitKeyNamePrefix,
                                       MessageFormat deviceUnitParameterPattern,
                                       int deviceUnitNumber,
                                       DeviceUnitCapabilities caps)

### getLogicalReader

    public DefaultLogicalReader getLogicalReader()

  Returns:
    the `DefaultLogicalReader` which this DeviceUnit is a part of

### getDeviceUnitNumber

    public int getDeviceUnitNumber()

  Returns:
    the number of this antenna, as specified by the physical reader.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getCapabilities

    public DeviceUnitCapabilities getCapabilities()

  Returns:
    the capabilities of this DeviceUnit

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at ${DOCSWEBROOT} Copyright 2007 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD