Class PeripheralAttachmentInformation
java.lang.Object
org.opentcs.drivers.peripherals.management.PeripheralAttachmentInformation
- All Implemented Interfaces:
Serializable
Describes which communication adapter a location is currently associated with.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPeripheralAttachmentInformation
(TCSResourceReference<Location> locationReference, List<PeripheralCommAdapterDescription> availableCommAdapters, PeripheralCommAdapterDescription attachedCommAdapter) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the comm adapter attached to the referenced location.Returns the list of comm adapters available to be attached to the referenced location.Returns the location this attachment information belongs to.toString()
withAttachedCommAdapter
(PeripheralCommAdapterDescription attachedCommAdapter) Creates a copy of this object with the given attached comm adapter.withAvailableCommAdapters
(List<PeripheralCommAdapterDescription> availableCommAdapters) Creates a copy of this object with the given available comm adapters.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 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.
-
-
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 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
-