Package org.opentcs.drivers.peripherals.management

# Class PeripheralAttachmentInformation

java.lang.Object
org.opentcs.drivers.peripherals.management.PeripheralAttachmentInformation

All Implemented Interfaces:
  `java.io.Serializable`

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

Describes which communication adapter a location is currently associated with.

See Also:
  Serialized Form

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `PeripheralAttachmentInformation​(TCSResourceReference<Location> locationReference, PeripheralCommAdapterDescription attachedCommAdapter)` | Creates a new instance.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `PeripheralCommAdapterDescription` | `getAttachedCommAdapter()` | Returns the comm adapter attached to the referenced location.
  `TCSResourceReference<Location>` | `getLocationReference()` | Returns the location this attachment information belongs to.
  `PeripheralAttachmentInformation` | `withAttachedCommAdapter​(PeripheralCommAdapterDescription attachedCommAdapter)` | Creates a copy of this object with the given attached comm adapter.
  `PeripheralAttachmentInformation` | `withLocationReference​(TCSResourceReference<Location> locationReference)` | Creates a copy of this object with the given location reference.

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

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

- ## Constructor Details

  - ### PeripheralAttachmentInformation

    public PeripheralAttachmentInformation​(@Nonnull TCSResourceReference<Location> locationReference, @Nonnull PeripheralCommAdapterDescription attachedCommAdapter)
    Creates a new instance.
    Parameters:
      `locationReference` - The location this attachment information belongs to.
      `attachedCommAdapter` - The comm adapter attached to the referenced location.

- ## Method Details

  - ### getLocationReference

    @Nonnull public TCSResourceReference<Location> getLocationReference()
    Returns the location this attachment information belongs to.
    Returns:
      The location this attachment information belongs to.

  - ### withLocationReference

    public PeripheralAttachmentInformation withLocationReference​(TCSResourceReference<Location> locationReference)
    Creates a copy of this object with the given location reference.
    Parameters:
      `locationReference` - The new location reference.
    Returns:
      A copy of this object, differing in the given location reference.

  - ### getAttachedCommAdapter

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

  - ### withAttachedCommAdapter

    public PeripheralAttachmentInformation withAttachedCommAdapter​(@Nonnull PeripheralCommAdapterDescription 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.