Class VehicleAttachmentInformation
java.lang.Object
org.opentcs.drivers.vehicle.management.VehicleAttachmentInformation
- All Implemented Interfaces:
Serializable
Describes which communication adapter a vehicle is currently associated with and which adapters
are available.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVehicleAttachmentInformation
(TCSObjectReference<Vehicle> vehicleReference, List<VehicleCommAdapterDescription> availableCommAdapters, VehicleCommAdapterDescription attachedCommAdapter) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the comm adapter attached to the referenced vehicle.Returns the list of comm adapters available to be attached to the referenced vehicle.Returns the vehicle this attachment information belongs to.withAttachedCommAdapter
(VehicleCommAdapterDescription attachedCommAdapter) Creates a copy of this object with the given attached comm adapter.withAvailableCommAdapters
(List<VehicleCommAdapterDescription> availableCommAdapters) Creates a copy of this object with the given available comm adapters.withVehicleReference
(TCSObjectReference<Vehicle> vehicleReference) Creates a copy of this object with the given vehicle reference.
-
Constructor Details
-
VehicleAttachmentInformation
public VehicleAttachmentInformation(@Nonnull TCSObjectReference<Vehicle> vehicleReference, @Nonnull 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
Returns the vehicle this attachment information belongs to.- Returns:
- The vehicle this attachment information belongs to.
-
withVehicleReference
public VehicleAttachmentInformation 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
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 VehicleAttachmentInformation withAvailableCommAdapters(@Nonnull 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
Returns the comm adapter attached to the referenced vehicle.- Returns:
- The comm adapter attached to the referenced vehicle.
-
withAttachedCommAdapter
public VehicleAttachmentInformation 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.
-