Class PeripheralOperationCreationTO
java.lang.Object
org.opentcs.access.to.CreationTO
org.opentcs.access.to.peripherals.PeripheralOperationCreationTO
- All Implemented Interfaces:
java.io.Serializable
public class PeripheralOperationCreationTO extends CreationTO implements java.io.Serializable
A transfer object describing an operation to be performed by a peripheral device.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description PeripheralOperationCreationTO(java.lang.String operation, java.lang.String locationName)
Creates a new instance withexecutionTrigger
set toPeripheralOperation.ExecutionTrigger.IMMEDIATE
andcompletionRequired
set tofalse
. -
Method Summary
Modifier and Type Method Description PeripheralOperation.ExecutionTrigger
getExecutionTrigger()
Returns the moment at which this operation is to be performed.java.lang.String
getLocationName()
Returns the name of the location the peripheral device is associated with.java.lang.String
getOperation()
Returns the operation to be performed by the peripheral device.boolean
isCompletionRequired()
Returns whether the completion of this operation is required to allow a vehicle to continue driving.PeripheralOperationCreationTO
withCompletionRequired(boolean completionRequired)
Creates a copy of this object, with the given completion required flag.PeripheralOperationCreationTO
withExecutionTrigger(PeripheralOperation.ExecutionTrigger executionTrigger)
Creates a copy of this object, with the given execution trigger.PeripheralOperationCreationTO
withLocationName(java.lang.String locationName)
Creates a copy of this object, with the given location name.PeripheralOperationCreationTO
withName(java.lang.String name)
Creates a copy of this object with the given name.PeripheralOperationCreationTO
withOperation(java.lang.String operation)
Creates a copy of this object, with the given operation.PeripheralOperationCreationTO
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a copy of this object with the given properties.PeripheralOperationCreationTO
withProperty(java.lang.String key, java.lang.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
public PeripheralOperationCreationTO(@Nonnull java.lang.String operation, @Nonnull java.lang.String locationName)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
public PeripheralOperationCreationTO withProperties(@Nonnull java.util.Map<java.lang.String,java.lang.String> properties)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
public PeripheralOperationCreationTO withProperty(@Nonnull java.lang.String key, @Nonnull java.lang.String value)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
@Nonnull public java.lang.String 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
@Nonnull public java.lang.String 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.
-