Package org.opentcs.drivers.peripherals

# Interface PeripheralCommAdapterFactory

All Superinterfaces:
  `Lifecycle`

    public interface PeripheralCommAdapterFactory
    extends Lifecycle

Provides communication adapter instances for peripheral devices to be controlled.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `PeripheralCommAdapter` | `getAdapterFor​(Location location)` | Returns a communication adapter for controlling the given location/peripheral device.
  `PeripheralCommAdapterDescription` | `getDescription()` | Returns a `PeripheralCommAdapterDescription` for the factory/the adapters provided.
  `boolean` | `providesAdapterFor​(Location location)` | Checks whether this factory can provide a communication adapter for the given location/peripheral device.

  ### Methods inherited from interface org.opentcs.components.Lifecycle

  `initialize, isInitialized, terminate`

- ## Method Details

  - ### getDescription

    @Nonnull PeripheralCommAdapterDescription getDescription()
    Returns a `PeripheralCommAdapterDescription` for the factory/the adapters provided.
    Returns:
      A `PeripheralCommAdapterDescription` for the factory/the adapters provided.

  - ### providesAdapterFor

    boolean providesAdapterFor​(@Nonnull Location location)
    Checks whether this factory can provide a communication adapter for the given location/peripheral device.
    Parameters:
      `location` - The location to check for.
    Returns:
      `true` if, and only if, this factory can provide a communication adapter to control the given location/peripheral device.

  - ### getAdapterFor

    @Nullable PeripheralCommAdapter getAdapterFor​(@Nonnull Location location)
    Returns a communication adapter for controlling the given location/peripheral device.
    Parameters:
      `location` - The location/peripheral device to be controlled.
    Returns:
      A communication adapter for controlling the given location/peripheral device, or `null`, if this factory cannot provide an adapter for it.