Class PeripheralOperationCreationTO
java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.peripherals.PeripheralOperationCreationTO
- All Implemented Interfaces:
Serializable
A transfer object describing an operation to be performed by a peripheral device.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPeripheralOperationCreationTO
(String operation, String locationName) Creates a new instance withexecutionTrigger
set toPeripheralOperation.ExecutionTrigger.IMMEDIATE
andcompletionRequired
set tofalse
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the moment at which this operation is to be performed.Returns the name of the location the peripheral device is associated with.Returns the operation to be performed by the peripheral device.boolean
Returns whether the completion of this operation is required to allow a vehicle to continue driving.withCompletionRequired
(boolean completionRequired) Creates a copy of this object, with the given completion required flag.withExecutionTrigger
(PeripheralOperation.ExecutionTrigger executionTrigger) Creates a copy of this object, with the given execution trigger.withLocationName
(String locationName) Creates a copy of this object, with the given location name.Creates a copy of this object with the given name.withOperation
(String operation) Creates a copy of this object, with the given operation.withProperties
(Map<String, String> properties) Creates a copy of this object with the given properties.withProperty
(String key, String value) Creates a copy of this object with the given property.Methods inherited from class org.opentcs.access.to.CreationTO
getModifiableProperties, getName, getProperties, listWithAppendix, mapWithMapping, propertiesWith
-
Constructor Details
-
PeripheralOperationCreationTO
Creates a new instance withexecutionTrigger
set toPeripheralOperation.ExecutionTrigger.IMMEDIATE
andcompletionRequired
set tofalse
.- Parameters:
operation
- The operation to be performed by the peripheral device.locationName
- The name of the location the peripheral device is associated with.
-
-
Method Details
-
withName
Description copied from class:CreationTO
Creates a copy of this object with the given name.- Overrides:
withName
in classCreationTO
- Parameters:
name
- the new name- Returns:
- A copy of this object, differing in the given value.
-
withProperties
Description copied from class:CreationTO
Creates a copy of this object with the given properties.- Overrides:
withProperties
in classCreationTO
- Parameters:
properties
- The properties.- Returns:
- A copy of this object with the given properties.
-
withProperty
Description copied from class:CreationTO
Creates a copy of this object with the given property. If value == null is true then the key-value pair is removed from the properties.- Overrides:
withProperty
in classCreationTO
- Parameters:
key
- the key.value
- the value- Returns:
- A copy of this object that includes the given property or removes the entry, if value == null.
-
getOperation
Returns the operation to be performed by the peripheral device.- Returns:
- The operation to be performed by the peripheral device.
-
withOperation
Creates a copy of this object, with the given operation.- Parameters:
operation
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getLocationName
Returns the name of the location the peripheral device is associated with.- Returns:
- The name of the location the peripheral device is associated with.
-
withLocationName
Creates a copy of this object, with the given location name.- Parameters:
locationName
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
getExecutionTrigger
Returns the moment at which this operation is to be performed.- Returns:
- The moment at which this operation is to be performed.
-
withExecutionTrigger
public PeripheralOperationCreationTO withExecutionTrigger(@Nonnull PeripheralOperation.ExecutionTrigger executionTrigger) Creates a copy of this object, with the given execution trigger.This method should only be used by the vehicle controller component of the baseline project.
- Parameters:
executionTrigger
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-
isCompletionRequired
public boolean isCompletionRequired()Returns whether the completion of this operation is required to allow a vehicle to continue driving.- Returns:
- Whether the completion of this operation is required to allow a vehicle to continue driving.
-
withCompletionRequired
Creates a copy of this object, with the given completion required flag.This method should only be used by the vehicle controller component of the baseline project.
- Parameters:
completionRequired
- The value to be set in the copy.- Returns:
- A copy of this object, differing in the given value.
-