Package org.opentcs.drivers.vehicle.management

# Class AttachmentInformation

java.lang.Object
org.opentcs.drivers.vehicle.management.AttachmentInformation

All Implemented Interfaces:
  `java.io.Serializable`

    public class AttachmentInformation
    extends java.lang.Object
    implements java.io.Serializable

Describes which communication adapter a vehicle is currently associated with and which adapters are available.

See Also:
  Serialized Form

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `AttachmentInformation​(TCSObjectReference<Vehicle> vehicleReference, java.util.List<VehicleCommAdapterDescription> availableCommAdapters, VehicleCommAdapterDescription attachedCommAdapter)` | Creates a new instance.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `VehicleCommAdapterDescription` | `getAttachedCommAdapter()` | Returns the comm adapter attached to the referenced vehicle.
  `java.util.List<VehicleCommAdapterDescription>` | `getAvailableCommAdapters()` | Returns the list of comm adapters available to be attached to the referenced vehicle.
  `TCSObjectReference<Vehicle>` | `getVehicleReference()` | Returns the vehicle this attachment information belongs to.
  `AttachmentInformation` | `withAttachedCommAdapter​(VehicleCommAdapterDescription attachedCommAdapter)` | Creates a copy of this object with the given attached comm adapter.
  `AttachmentInformation` | `withAvailableCommAdapters​(java.util.List<VehicleCommAdapterDescription> availableCommAdapters)` | Creates a copy of this object with the given available comm adapters.
  `AttachmentInformation` | `withVehicleReference​(TCSObjectReference<Vehicle> vehicleReference)` | Creates a copy of this object with the given vehicle reference.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AttachmentInformation

    public AttachmentInformation​(@Nonnull TCSObjectReference<Vehicle> vehicleReference, @Nonnull java.util.List<VehicleCommAdapterDescription> availableCommAdapters, @Nonnull VehicleCommAdapterDescription attachedCommAdapter)
    Creates a new instance.
    Parameters:
      `vehicleReference` - The vehicle this attachment information belongs to.
      `availableCommAdapters` - The list of comm adapters available to be attached to the referenced vehicle.
      `attachedCommAdapter` - The comm adapter attached to the referenced vehicle.

- ## Method Details

  - ### getVehicleReference

    @Nonnull public TCSObjectReference<Vehicle> getVehicleReference()
    Returns the vehicle this attachment information belongs to.
    Returns:
      The vehicle this attachment information belongs to.

  - ### withVehicleReference

    public AttachmentInformation withVehicleReference​(TCSObjectReference<Vehicle> vehicleReference)
    Creates a copy of this object with the given vehicle reference.
    Parameters:
      `vehicleReference` - The new vehicle reference.
    Returns:
      A copy of this object, differing in the given vehicle reference.

  - ### getAvailableCommAdapters

    @Nonnull public java.util.List<VehicleCommAdapterDescription> getAvailableCommAdapters()
    Returns the list of comm adapters available to be attached to the referenced vehicle.
    Returns:
      The list of comm adapters available to be attached to the referenced vehicle.

  - ### withAvailableCommAdapters

    public AttachmentInformation withAvailableCommAdapters​(@Nonnull java.util.List<VehicleCommAdapterDescription> availableCommAdapters)
    Creates a copy of this object with the given available comm adapters.
    Parameters:
      `availableCommAdapters` - The new available comm adapters.
    Returns:
      A copy of this object, differing in the given available comm adapters.

  - ### getAttachedCommAdapter

    @Nonnull public VehicleCommAdapterDescription getAttachedCommAdapter()
    Returns the comm adapter attached to the referenced vehicle.
    Returns:
      The comm adapter attached to the referenced vehicle.

  - ### withAttachedCommAdapter

    public AttachmentInformation withAttachedCommAdapter​(@Nonnull VehicleCommAdapterDescription attachedCommAdapter)
    Creates a copy of this object with the given attached comm adapter.
    Parameters:
      `attachedCommAdapter` - The new attached comm adapter.
    Returns:
      A copy of this object, differing in the given attached comm adapter.