Class PeripheralProcessModel

java.lang.Object
org.opentcs.drivers.peripherals.PeripheralProcessModel
All Implemented Interfaces:
java.io.Serializable

public class PeripheralProcessModel
extends java.lang.Object
implements java.io.Serializable
A model of a peripheral device's and its communication adapter's attributes.
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • getLocation

      @Nonnull public TCSResourceReference<Location> getLocation()
      Returns the reference to the location that is attached to this model.
      Returns:
      The reference to the location that is attached to this model.
    • withLocation

      public PeripheralProcessModel withLocation​(@Nonnull TCSResourceReference<Location> location)
      Creates a copy of the object, with the given location reference.
      Parameters:
      location - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • isCommAdapterEnabled

      public boolean isCommAdapterEnabled()
      Returns whether the communication adapter is currently enabled.
      Returns:
      Whether the communication adapter is currently enabled.
    • withCommAdapterEnabled

      public PeripheralProcessModel withCommAdapterEnabled​(boolean commAdapterEnabled)
      Creates a copy of the object, with the given enabled state.
      Parameters:
      commAdapterEnabled - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • isCommAdapterConnected

      public boolean isCommAdapterConnected()
      Returns whether the communication adapter is currently connected to the peripheral device.
      Returns:
      Whether the communication adapter is currently connected to the peripheral device.
    • withCommAdapterConnected

      public PeripheralProcessModel withCommAdapterConnected​(boolean commAdapterConnected)
      Creates a copy of the object, with the given connected state.
      Parameters:
      commAdapterConnected - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.
    • getState

      public PeripheralInformation.State getState()
      Returns the peripheral device's current state.
      Returns:
      The peripheral device's current state.
    • withState

      Creates a copy of the object, with the given state.
      Parameters:
      state - The value to be set in the copy.
      Returns:
      A copy of this object, differing in the given value.