001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package org.wpilib.driverstation;
006
007import org.wpilib.datalog.DataLog;
008import org.wpilib.driverstation.internal.DriverStationBackend;
009
010/** Provides access to Driver Station functionality. */
011public final class DriverStation {
012  private DriverStation() {}
013
014  /**
015   * Starts logging DriverStation data to data log, including joystick data. Repeated calls are
016   * ignored.
017   *
018   * @param log data log
019   */
020  public static void startDataLog(DataLog log) {
021    DriverStationBackend.startDataLog(log);
022  }
023
024  /**
025   * Starts logging DriverStation data to data log. Repeated calls are ignored.
026   *
027   * @param log data log
028   * @param logJoysticks if true, log joystick data
029   */
030  public static void startDataLog(DataLog log, boolean logJoysticks) {
031    DriverStationBackend.startDataLog(log, logJoysticks);
032  }
033
034  /**
035   * Registers the given handle for DS data refresh notifications.
036   *
037   * @param handle The event handle.
038   */
039  public static void provideRefreshedDataEventHandle(int handle) {
040    DriverStationBackend.provideRefreshedDataEventHandle(handle);
041  }
042
043  /**
044   * Unregisters the given handle from DS data refresh notifications.
045   *
046   * @param handle The event handle.
047   */
048  public static void removeRefreshedDataEventHandle(int handle) {
049    DriverStationBackend.removeRefreshedDataEventHandle(handle);
050  }
051}