All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentcs.access.Kernel Maven / Gradle / Ivy

// SPDX-FileCopyrightText: The openTCS Authors
// SPDX-License-Identifier: MIT
package org.opentcs.access;

/**
 * Declares the methods an openTCS kernel implements.
 */
public interface Kernel {

  /**
   * The default name used for the empty model created on startup.
   */
  String DEFAULT_MODEL_NAME = "unnamed";

  /**
   * Returns the current state of the kernel.
   *
   * @return The current state of the kernel.
   * @throws CredentialsException If the calling client is not allowed to
   * execute this method.
   */
  State getState()
      throws CredentialsException;

  /**
   * Sets the current state of the kernel.
   * 

* Note: This method should only be used internally by the Kernel application. *

* * @param newState The state the kernel is to be set to. * @throws IllegalArgumentException If setting the new state is not possible, * e.g. because a transition from the current to the new state is not allowed. * @throws CredentialsException If the calling client is not allowed to * execute this method. */ void setState(State newState) throws IllegalArgumentException, CredentialsException; /** * The various states a kernel instance may be running in. */ enum State { /** * The state in which the model/topology is created and parameters are set. */ MODELLING, /** * The normal mode of operation in which transport orders may be accepted * and dispatched to vehicles. */ OPERATING, /** * A transitional state the kernel is in while shutting down. */ SHUTDOWN } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy