Package org.opentcs.components.kernel.services

# Interface PeripheralService

All Superinterfaces:
  `TCSObjectService`

All Known Subinterfaces:
  `InternalPeripheralService`

    public interface PeripheralService
    extends TCSObjectService

Provides methods concerning peripheral devices represented by `Location`s.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `void` | `attachCommAdapter​(TCSResourceReference<Location> ref, PeripheralCommAdapterDescription description)` | Attaches the described comm adapter to the referenced location.
  `void` | `disableCommAdapter​(TCSResourceReference<Location> ref)` | Disables the comm adapter attached to the referenced location.
  `void` | `enableCommAdapter​(TCSResourceReference<Location> ref)` | Enables the comm adapter attached to the referenced location.
  `PeripheralAttachmentInformation` | `fetchAttachmentInformation​(TCSResourceReference<Location> ref)` | Returns attachment information for the referenced location.
  `PeripheralProcessModel` | `fetchProcessModel​(TCSResourceReference<Location> ref)` | Returns the process model for the referenced location.
  `void` | `sendCommAdapterCommand​(TCSResourceReference<Location> ref, PeripheralAdapterCommand command)` | Sends a `PeripheralAdapterCommand` to the comm adapter attached to the referenced location.

  ### Methods inherited from interface org.opentcs.components.kernel.services.TCSObjectService

  `appendObjectHistoryEntry, fetchObject, fetchObject, fetchObjects, fetchObjects, updateObjectProperty`

- ## Method Details

  - ### attachCommAdapter

    void attachCommAdapter​(TCSResourceReference<Location> ref, PeripheralCommAdapterDescription description) throws ObjectUnknownException, KernelRuntimeException
    Attaches the described comm adapter to the referenced location.
    Parameters:
      `ref` - A reference to the location.
      `description` - The description for the comm adapter to be attached.
    Throws:
      `ObjectUnknownException` - If the referenced location does not exist.
      `KernelRuntimeException` - In case there is an exception executing this method.

  - ### disableCommAdapter

    void disableCommAdapter​(TCSResourceReference<Location> ref) throws ObjectUnknownException, KernelRuntimeException
    Disables the comm adapter attached to the referenced location.
    Parameters:
      `ref` - A reference to the location the comm adapter is attached to.
    Throws:
      `ObjectUnknownException` - If the referenced location does not exist.
      `KernelRuntimeException` - In case there is an exception executing this method.

  - ### enableCommAdapter

    void enableCommAdapter​(TCSResourceReference<Location> ref) throws ObjectUnknownException, KernelRuntimeException
    Enables the comm adapter attached to the referenced location.
    Parameters:
      `ref` - A reference to the location the comm adapter is attached to.
    Throws:
      `ObjectUnknownException` - If the referenced location does not exist.
      `KernelRuntimeException` - In case there is an exception executing this method.

  - ### fetchAttachmentInformation

    PeripheralAttachmentInformation fetchAttachmentInformation​(TCSResourceReference<Location> ref) throws ObjectUnknownException, KernelRuntimeException
    Returns attachment information for the referenced location.
    Parameters:
      `ref` - A reference to the location.
    Returns:
      The attachment information.
    Throws:
      `ObjectUnknownException` - If the referenced location does not exist.
      `KernelRuntimeException` - In case there is an exception executing this method.

  - ### fetchProcessModel

    PeripheralProcessModel fetchProcessModel​(TCSResourceReference<Location> ref) throws ObjectUnknownException, KernelRuntimeException
    Returns the process model for the referenced location.
    Parameters:
      `ref` - A reference to the location.
    Returns:
      The process model.
    Throws:
      `ObjectUnknownException` - If the referenced location does not exist.
      `KernelRuntimeException` - In case there is an exception executing this method.

  - ### sendCommAdapterCommand

    void sendCommAdapterCommand​(TCSResourceReference<Location> ref, PeripheralAdapterCommand command) throws ObjectUnknownException, KernelRuntimeException
    Sends a `PeripheralAdapterCommand` to the comm adapter attached to the referenced location.
    Parameters:
      `ref` - A reference to the location.
      `command` - The adapter command to send.
    Throws:
      `ObjectUnknownException` - If the referenced location does not exist.
      `KernelRuntimeException` - In case there is an exception executing this method.
    See Also:
      `PeripheralAdapterCommand.execute(PeripheralCommAdapter)`