Package org.opentcs.drivers.vehicle
Interface MovementCommand
@ScheduledApiChange(when="6.0", details="Will become a class with \'with\' methods.") public interface MovementCommand
A command for moving a step.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MOVE_OPERATION
A constant indicating the vehicle should basically just move to a point without a location associated to it.static java.lang.String
NO_OPERATION
A constant indicating there is no operation to be executed after moving.static java.lang.String
PARK_OPERATION
A constant for parking the vehicle. -
Method Summary
Modifier and Type Method Description default boolean
equalsInMovement(MovementCommand command)
Compares the given movement command to this movement command, ignoring rerouting-related properties.DriveOrder
getDriveOrder()
Returns the drive order this movement belongs to.Point
getFinalDestination()
Returns the final destination of the drive order this MovementCommand was created for.Location
getFinalDestinationLocation()
Returns the destination location of the whole drive order.java.lang.String
getFinalOperation()
Returns the operation to be executed at the final destination position.java.lang.String
getOperation()
Returns the operation to be executed after moving.Location
getOpLocation()
Returns the location at which the operation is to be executed.java.util.Map<java.lang.String,java.lang.String>
getProperties()
Returns the properties of the order this command is part of.default Route
getRoute()
Deprecated.Use the route provided as part ofgetDriveOrder()
, instead.Route.Step
getStep()
Returns the step describing the movement.TransportOrder
getTransportOrder()
Returns the transport order this movement belongs to.default boolean
hasEmptyOperation()
Indicates whether an operation is to be executed in addition to moving or not.boolean
isFinalMovement()
Indicates whether this movement is the final one in the driver order it belongs to.boolean
isWithoutOperation()
Deprecated.UsehasEmptyOperation()
instead.
-
Field Details
-
NO_OPERATION
static final java.lang.String NO_OPERATIONA constant indicating there is no operation to be executed after moving.- See Also:
- Constant Field Values
-
MOVE_OPERATION
static final java.lang.String MOVE_OPERATIONA constant indicating the vehicle should basically just move to a point without a location associated to it.- See Also:
- Constant Field Values
-
PARK_OPERATION
static final java.lang.String PARK_OPERATIONA constant for parking the vehicle. (Again, basically doing nothing at the destination.)- See Also:
- Constant Field Values
-
-
Method Details
-
getTransportOrder
TransportOrder getTransportOrder()Returns the transport order this movement belongs to.- Returns:
- The transport order this movement belongs to.
-
getDriveOrder
DriveOrder getDriveOrder()Returns the drive order this movement belongs to.- Returns:
- The drive order this movement belongs to.
-
getRoute
Deprecated.Use the route provided as part ofgetDriveOrder()
, instead.Returns the route that this movement belongs to.- Returns:
- The route that this movement belongs to.
-
getStep
Returns the step describing the movement.- Returns:
- The step describing the movement.
-
getOperation
@Nonnull java.lang.String getOperation()Returns the operation to be executed after moving.- Returns:
- The operation to be executed after moving.
-
isWithoutOperation
@Deprecated @ScheduledApiChange(when="6.0", details="Will be removed.") boolean isWithoutOperation()Deprecated.UsehasEmptyOperation()
instead.Checks whether an operation is to be executed in addition to moving or not.- Returns:
true
if, and only if, no operation is to be executed.
-
hasEmptyOperation
default boolean hasEmptyOperation()Indicates whether an operation is to be executed in addition to moving or not.- Returns:
true
if, and only if, no operation is to be executed.
-
getOpLocation
Returns the location at which the operation is to be executed. (May benull
if operation isNO_OPERATION
.)- Returns:
- The location at which the operation is to be executed.
-
isFinalMovement
boolean isFinalMovement()Indicates whether this movement is the final one in the driver order it belongs to.- Returns:
true
if, and only if, this movement is the final one.
-
getFinalDestination
Returns the final destination of the drive order this MovementCommand was created for.- Returns:
- The final destination of the drive order this MovementCommand was created for.
-
getFinalDestinationLocation
Returns the destination location of the whole drive order.- Returns:
- The destination location of the whole drive order.
-
getFinalOperation
@Nonnull java.lang.String getFinalOperation()Returns the operation to be executed at the final destination position.- Returns:
- The operation to be executed at the final destination position.
-
equalsInMovement
Compares the given movement command to this movement command, ignoring rerouting-related properties.- Parameters:
command
- The movement command to compare to.- Returns:
true
, if the given movement command is equal to this movement command (ignoring rerouting-related properties), otherwisefalse
.
-
getProperties
@Nonnull java.util.Map<java.lang.String,java.lang.String> getProperties()Returns the properties of the order this command is part of.- Returns:
- The properties of the order this command is part of.
-