Klasse MovementCommand

java.lang.Object
org.opentcs.drivers.vehicle.MovementCommand

public class MovementCommand extends Object
A command for moving a step.
  • Felddetails

    • NO_OPERATION

      public static final String NO_OPERATION
      A constant indicating there is no operation to be executed after moving.
      Siehe auch:
    • MOVE_OPERATION

      public static final String MOVE_OPERATION
      A constant indicating the vehicle should basically just move to a point without a location associated to it.
      Siehe auch:
    • PARK_OPERATION

      public static final String PARK_OPERATION
      A constant for parking the vehicle. (Again, basically doing nothing at the destination.)
      Siehe auch:
  • Konstruktordetails

    • MovementCommand

      public MovementCommand(@Nonnull TransportOrder transportOrder, @Nonnull DriveOrder driveOrder, @Nonnull Route.Step step, @Nonnull String operation, @Nullable Location opLocation, boolean finalMovement, @Nullable Location finalDestinationLocation, @Nonnull Point finalDestination, @Nonnull String finalOperation, @Nonnull Map<String,String> properties)
      Creates a new instance.
      Parameter:
      transportOrder - The transport order this movement belongs to.
      driveOrder - The drive order this movement belongs to.
      step - The step describing the movement.
      operation - The operation to be executed after moving.
      opLocation - The location at which the operation is to be executed. May be null if the movement command's operation is considred an empty operation (i.e. is NO_OPERATION, MOVE_OPERATION or PARK_OPERATION).
      finalMovement - Indicates whether this movement is the final one in the drive order it belongs to.
      finalDestinationLocation - The destination location of the whole drive order.
      finalDestination - The destination position of the whole drive order.
      finalOperation - The operation to be executed at the destination position.
      properties - Properties of the order this command is part of.
  • Methodendetails

    • getTransportOrder

      @Nonnull public TransportOrder getTransportOrder()
      Returns the transport order this movement belongs to.
      Gibt zurück:
      The transport order this movement belongs to.
    • withTransportOrder

      public MovementCommand withTransportOrder(@Nonnull TransportOrder transportOrder)
      Creates a copy of this object, with the given transport order.
      Parameter:
      transportOrder - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getDriveOrder

      @Nonnull public DriveOrder getDriveOrder()
      Returns the drive order this movement belongs to.
      Gibt zurück:
      The drive order this movement belongs to.
    • withDriveOrder

      public MovementCommand withDriveOrder(@Nonnull DriveOrder driveOrder)
      Creates a copy of this object, with the given drive order.
      Parameter:
      driveOrder - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getStep

      @Nonnull public Route.Step getStep()
      Returns the step describing the movement.
      Gibt zurück:
      The step describing the movement.
    • withStep

      public MovementCommand withStep(@Nonnull Route.Step step)
      Creates a copy of this object, with the given step.
      Parameter:
      step - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getOperation

      @Nonnull public String getOperation()
      Returns the operation to be executed after moving.
      Gibt zurück:
      The operation to be executed after moving.
    • withOperation

      public MovementCommand withOperation(@Nonnull String operation)
      Creates a copy of this object, with the given operation.
      Parameter:
      operation - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • hasEmptyOperation

      public boolean hasEmptyOperation()
      Indicates whether an operation is to be executed in addition to moving or not.
      Gibt zurück:
      true if, and only if, no operation is to be executed.
    • getOpLocation

      @Nullable public Location getOpLocation()
      Returns the location at which the operation is to be executed.

      May be null if the movement command's operation is considred an empty operation (i.e. is NO_OPERATION, MOVE_OPERATION or PARK_OPERATION).

      Gibt zurück:
      The location at which the operation is to be executed.
    • withOpLocation

      public MovementCommand withOpLocation(@Nullable Location opLocation)
      Creates a copy of this object, with the given location at which the operation is to be executed.

      May be null if the movement command's operation is considred an empty operation (i.e. is NO_OPERATION, MOVE_OPERATION or PARK_OPERATION).

      Parameter:
      opLocation - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • isFinalMovement

      public boolean isFinalMovement()
      Indicates whether this movement is the final one in the driver order it belongs to.
      Gibt zurück:
      true if, and only if, this movement is the final one.
    • withFinalMovement

      public MovementCommand withFinalMovement(boolean finalMovement)
      Creates a copy of this object, with the given final movement flag.
      Parameter:
      finalMovement - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getFinalDestination

      @Nonnull public Point getFinalDestination()
      Returns the final destination of the drive order this MovementCommand was created for.
      Gibt zurück:
      The final destination of the drive order this MovementCommand was created for.
    • withFinalDestination

      public MovementCommand withFinalDestination(@Nonnull Point finalDestination)
      Creates a copy of this object, with the given final destination.
      Parameter:
      finalDestination - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getFinalDestinationLocation

      @Nullable public Location getFinalDestinationLocation()
      Returns the destination location of the whole drive order.
      Gibt zurück:
      The destination location of the whole drive order.
    • withFinalDestinationLocation

      public MovementCommand withFinalDestinationLocation(@Nullable Location finalDestinationLocation)
      Creates a copy of this object, with the given final destination location.
      Parameter:
      finalDestinationLocation - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getFinalOperation

      @Nonnull public String getFinalOperation()
      Returns the operation to be executed at the final destination position.
      Gibt zurück:
      The operation to be executed at the final destination position.
    • withFinalOperation

      public MovementCommand withFinalOperation(@Nonnull String finalOperation)
      Creates a copy of this object, with the given final operation.
      Parameter:
      finalOperation - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • getProperties

      @Nonnull public Map<String,String> getProperties()
      Returns the properties of the order this command is part of.
      Gibt zurück:
      The properties of the order this command is part of.
    • withProperties

      public MovementCommand withProperties(@Nonnull Map<String,String> properties)
      Creates a copy of this object, with the given properties.
      Parameter:
      properties - The value to be set in the copy.
      Gibt zurück:
      A copy of this object, differing in the given value.
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • equalsInMovement

      public boolean equalsInMovement(MovementCommand command)
      Compares the given movement command to this movement command, ignoring rerouting-related properties.
      Parameter:
      command - The movement command to compare to.
      Gibt zurück:
      true, if the given movement command is equal to this movement command (ignoring rerouting-related properties), otherwise false.
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object