001/*----------------------------------------------------------------------------*/
002/* Copyright (c) FIRST 2008-2017. All Rights Reserved.                        */
003/* Open Source Software - may be modified and shared by FRC teams. The code   */
004/* must be accompanied by the FIRST BSD license file in the root directory of */
005/* the project.                                                               */
006/*----------------------------------------------------------------------------*/
007
008package edu.wpi.first.wpilibj;
009
010/**
011 * This interface allows for PIDController to automatically read from this object.
012 */
013public interface PIDSource {
014  /**
015   * Set which parameter of the device you are using as a process control variable.
016   *
017   * @param pidSource An enum to select the parameter.
018   */
019  void setPIDSourceType(PIDSourceType pidSource);
020
021  /**
022   * Get which parameter of the device you are using as a process control variable.
023   *
024   * @return the currently selected PID source parameter
025   */
026  PIDSourceType getPIDSourceType();
027
028  /**
029   * Get the result to use in PIDController.
030   *
031   * @return the result to use in PIDController
032   */
033  double pidGet();
034}