Class VehicleAttachmentInformation
java.lang.Object
org.opentcs.drivers.vehicle.management.AttachmentInformation
org.opentcs.drivers.vehicle.management.VehicleAttachmentInformation
- All Implemented Interfaces:
java.io.Serializable
public class VehicleAttachmentInformation extends AttachmentInformation
Describes which communication adapter a vehicle is currently associated with and which adapters
are available.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description VehicleAttachmentInformation(TCSObjectReference<Vehicle> vehicleReference, java.util.List<VehicleCommAdapterDescription> availableCommAdapters, VehicleCommAdapterDescription attachedCommAdapter)Creates a new instance. -
Method Summary
Modifier and Type Method Description VehicleAttachmentInformationwithAttachedCommAdapter(VehicleCommAdapterDescription attachedCommAdapter)Creates a copy of this object with the given attached comm adapter.VehicleAttachmentInformationwithAvailableCommAdapters(java.util.List<VehicleCommAdapterDescription> availableCommAdapters)Creates a copy of this object with the given available comm adapters.VehicleAttachmentInformationwithVehicleReference(TCSObjectReference<Vehicle> vehicleReference)Creates a copy of this object with the given vehicle reference.Methods inherited from class org.opentcs.drivers.vehicle.management.AttachmentInformation
getAttachedCommAdapter, getAvailableCommAdapters, getVehicleReference
-
Constructor Details
-
VehicleAttachmentInformation
public VehicleAttachmentInformation(@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
-
withVehicleReference
public VehicleAttachmentInformation withVehicleReference(TCSObjectReference<Vehicle> vehicleReference)Creates a copy of this object with the given vehicle reference.- Overrides:
withVehicleReferencein classAttachmentInformation- Parameters:
vehicleReference- The new vehicle reference.- Returns:
- A copy of this object, differing in the given vehicle reference.
-
withAvailableCommAdapters
public VehicleAttachmentInformation withAvailableCommAdapters(@Nonnull java.util.List<VehicleCommAdapterDescription> availableCommAdapters)Creates a copy of this object with the given available comm adapters.- Overrides:
withAvailableCommAdaptersin classAttachmentInformation- Parameters:
availableCommAdapters- The new available comm adapters.- Returns:
- A copy of this object, differing in the given available comm adapters.
-
withAttachedCommAdapter
public VehicleAttachmentInformation withAttachedCommAdapter(@Nonnull VehicleCommAdapterDescription attachedCommAdapter)Creates a copy of this object with the given attached comm adapter.- Overrides:
withAttachedCommAdapterin classAttachmentInformation- Parameters:
attachedCommAdapter- The new attached comm adapter.- Returns:
- A copy of this object, differing in the given attached comm adapter.
-