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, java.util.List<PeripheralCommAdapterDescription> availableCommAdapters, PeripheralCommAdapterDescription attachedCommAdapter)
Creates a new instance.PeripheralAttachmentInformation(TCSResourceReference<Location> locationReference, PeripheralCommAdapterDescription attachedCommAdapter)
Deprecated.Use three-parameter constructor, instead. -
Method Summary
Modifier and Type Method Description PeripheralCommAdapterDescription
getAttachedCommAdapter()
Returns the comm adapter attached to the referenced location.java.util.List<PeripheralCommAdapterDescription>
getAvailableCommAdapters()
Returns the list of comm adapters available to be attached to the referenced location.TCSResourceReference<Location>
getLocationReference()
Returns the location this attachment information belongs to.java.lang.String
toString()
PeripheralAttachmentInformation
withAttachedCommAdapter(PeripheralCommAdapterDescription attachedCommAdapter)
Creates a copy of this object with the given attached comm adapter.PeripheralAttachmentInformation
withAvailableCommAdapters(java.util.List<PeripheralCommAdapterDescription> availableCommAdapters)
Creates a copy of this object with the given available comm adapters.PeripheralAttachmentInformation
withLocationReference(TCSResourceReference<Location> locationReference)
Creates a copy of this object with the given location reference.
-
Constructor Details
-
PeripheralAttachmentInformation
public PeripheralAttachmentInformation(@Nonnull TCSResourceReference<Location> locationReference, @Nonnull java.util.List<PeripheralCommAdapterDescription> availableCommAdapters, @Nonnull PeripheralCommAdapterDescription attachedCommAdapter)Creates a new instance.- Parameters:
locationReference
- The location this attachment information belongs to.availableCommAdapters
- The list of comm adapters available to be attached to the referenced location.attachedCommAdapter
- The comm adapter attached to the referenced location.
-
PeripheralAttachmentInformation
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed") public PeripheralAttachmentInformation(@Nonnull TCSResourceReference<Location> locationReference, @Nonnull PeripheralCommAdapterDescription attachedCommAdapter)Deprecated.Use three-parameter constructor, instead.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
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.
-
getAvailableCommAdapters
Returns the list of comm adapters available to be attached to the referenced location.- Returns:
- The list of comm adapters available to be attached to the referenced location.
-
withAvailableCommAdapters
public PeripheralAttachmentInformation withAvailableCommAdapters(@Nonnull java.util.List<PeripheralCommAdapterDescription> 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
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.
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-