Package org.opentcs.data.peripherals

# Class PeripheralOperation

java.lang.Object
org.opentcs.data.peripherals.PeripheralOperation

All Implemented Interfaces:
  `java.io.Serializable`

    public class PeripheralOperation
    extends java.lang.Object
    implements java.io.Serializable

Describes an operation that is to be executed by a peripheral device.

See Also:
  Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `PeripheralOperation.ExecutionTrigger` | Defines the various moments at which an operation may be executed.

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `PeripheralOperation​(TCSResourceReference<Location> location, java.lang.String operation, PeripheralOperation.ExecutionTrigger executionTrigger, boolean completionRequired)` | Creates a new instance.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `PeripheralOperation.ExecutionTrigger` | `getExecutionTrigger()` | Returns the moment at which this operation is to be executed.
  `TCSResourceReference<Location>` | `getLocation()` | Returns the location the peripheral device is associated with.
  `java.lang.String` | `getOperation()` | Returns the actual operation to be executed by the peripheral device.
  `boolean` | `isCompletionRequired()` | Returns whether the completion of this operation is required to allow a vehicle to continue driving.
  `java.lang.String` | `toString()` |

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### PeripheralOperation

    public PeripheralOperation​(@Nonnull TCSResourceReference<Location> location, @Nonnull java.lang.String operation, @Nonnull PeripheralOperation.ExecutionTrigger executionTrigger, boolean completionRequired)
    Creates a new instance.
    Parameters:
      `location` - The location the peripheral device is associated with.
      `operation` - The actual operation to be executed by the peripheral device.
      `executionTrigger` - The moment at which this operation is to be executed.
      `completionRequired` - Whether the completion of this operation is required to allow a vehicle to continue driving.

- ## Method Details

  - ### getLocation

    @Nonnull public TCSResourceReference<Location> getLocation()
    Returns the location the peripheral device is associated with.
    Returns:
      The location the peripheral device is associated with.

  - ### getOperation

    @Nonnull public java.lang.String getOperation()
    Returns the actual operation to be executed by the peripheral device.
    Returns:
      The actual operation to be executed by the peripheral device.

  - ### getExecutionTrigger

    @Nonnull public PeripheralOperation.ExecutionTrigger getExecutionTrigger()
    Returns the moment at which this operation is to be executed.
    Returns:
      The moment at which this operation is to be executed.

  - ### 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.

  - ### toString

    public java.lang.String toString()
    Overrides:
      `toString` in class `java.lang.Object`