// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_hids.py. DO NOT MODIFY

package org.wpilib.simulation;

import org.wpilib.driverstation.NiDsXboxController;

/** Class to control a simulated NiDsXbox controller. */
public class NiDsXboxControllerSim extends GenericHIDSim {
  /**
   * Constructs from a NiDsXboxController object.
   *
   * @param joystick controller to simulate
   */
  @SuppressWarnings("this-escape")
  public NiDsXboxControllerSim(NiDsXboxController joystick) {
    super(joystick);
    setAxesMaximumIndex(6);
    setButtonsMaximumIndex(10);
    setPOVsMaximumIndex(1);
  }

  /**
   * Constructs from a joystick port number.
   *
   * @param port port number
   */
  @SuppressWarnings("this-escape")
  public NiDsXboxControllerSim(int port) {
    super(port);
    setAxesMaximumIndex(6);
    setButtonsMaximumIndex(10);
    setPOVsMaximumIndex(1);
  }

  /**
   * Change the left X value of the controller's joystick.
   *
   * @param value the new value
   */
  public void setLeftX(double value) {
    setRawAxis(NiDsXboxController.Axis.kLeftX.value, value);
  }

  /**
   * Change the right X value of the controller's joystick.
   *
   * @param value the new value
   */
  public void setRightX(double value) {
    setRawAxis(NiDsXboxController.Axis.kRightX.value, value);
  }

  /**
   * Change the left Y value of the controller's joystick.
   *
   * @param value the new value
   */
  public void setLeftY(double value) {
    setRawAxis(NiDsXboxController.Axis.kLeftY.value, value);
  }

  /**
   * Change the right Y value of the controller's joystick.
   *
   * @param value the new value
   */
  public void setRightY(double value) {
    setRawAxis(NiDsXboxController.Axis.kRightY.value, value);
  }

  /**
   * Change the value of the left trigger axis on the controller.
   *
   * @param value the new value
   */
  public void setLeftTriggerAxis(double value) {
    setRawAxis(NiDsXboxController.Axis.kLeftTrigger.value, value);
  }

  /**
   * Change the value of the right trigger axis on the controller.
   *
   * @param value the new value
   */
  public void setRightTriggerAxis(double value) {
    setRawAxis(NiDsXboxController.Axis.kRightTrigger.value, value);
  }

  /**
   * Change the value of the A button on the controller.
   *
   * @param value the new value
   */
  public void setAButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kA.value, value);
  }

  /**
   * Change the value of the B button on the controller.
   *
   * @param value the new value
   */
  public void setBButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kB.value, value);
  }

  /**
   * Change the value of the X button on the controller.
   *
   * @param value the new value
   */
  public void setXButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kX.value, value);
  }

  /**
   * Change the value of the Y button on the controller.
   *
   * @param value the new value
   */
  public void setYButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kY.value, value);
  }

  /**
   * Change the value of the left bumper button on the controller.
   *
   * @param value the new value
   */
  public void setLeftBumperButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kLeftBumper.value, value);
  }

  /**
   * Change the value of the right bumper button on the controller.
   *
   * @param value the new value
   */
  public void setRightBumperButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kRightBumper.value, value);
  }

  /**
   * Change the value of the back button on the controller.
   *
   * @param value the new value
   */
  public void setBackButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kBack.value, value);
  }

  /**
   * Change the value of the start button on the controller.
   *
   * @param value the new value
   */
  public void setStartButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kStart.value, value);
  }

  /**
   * Change the value of the left stick button on the controller.
   *
   * @param value the new value
   */
  public void setLeftStickButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kLeftStick.value, value);
  }

  /**
   * Change the value of the right stick button on the controller.
   *
   * @param value the new value
   */
  public void setRightStickButton(boolean value) {
    setRawButton(NiDsXboxController.Button.kRightStick.value, value);
  }
}
