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.hardware.hal;
006
007/**
008 * Ports HAL JNI functions.
009 *
010 * @see "wpi/hal/Ports.h"
011 */
012public class PortsJNI extends JNIWrapper {
013  /**
014   * Gets the number of can buses in the current system.
015   *
016   * @return the number of can buses
017   * @see "HAL_GetNumCanBuses"
018   */
019  public static native int getNumCanBuses();
020
021  /**
022   * Gets the number of SmartIo ports in the current system.
023   *
024   * @return the number of SmartIo
025   * @see "HAL_GetNumSmartIo"
026   */
027  public static native int getNumSmartIo();
028
029  /**
030   * Gets the number of PCM modules in the current system.
031   *
032   * @return the number of PCM modules
033   * @see "HAL_GetNumCTREPCMModules"
034   */
035  public static native int getNumCTREPCMModules();
036
037  /**
038   * Gets the number of solenoid channels in the current system.
039   *
040   * @return the number of solenoid channels
041   * @see "HAL_GetNumCTRESolenoidChannels"
042   */
043  public static native int getNumCTRESolenoidChannels();
044
045  /**
046   * Gets the number of PDP modules in the current system.
047   *
048   * @return the number of PDP modules
049   * @see "HAL_GetNumCTREPDPModules"
050   */
051  public static native int getNumCTREPDPModules();
052
053  /**
054   * Gets the number of PDP channels in the current system.
055   *
056   * @return the number of PDP channels
057   * @see "HAL_GetNumCTREPDPChannels"
058   */
059  public static native int getNumCTREPDPChannels();
060
061  /**
062   * Gets the number of PDH modules in the current system.
063   *
064   * @return the number of PDH modules
065   * @see "HAL_GetNumREVPDHModules"
066   */
067  public static native int getNumREVPDHModules();
068
069  /**
070   * Gets the number of PDH channels in the current system.
071   *
072   * @return the number of PDH channels
073   * @see "HAL_GetNumREVPDHChannels"
074   */
075  public static native int getNumREVPDHChannels();
076
077  /**
078   * Gets the number of PH modules in the current system.
079   *
080   * @return the number of PH modules
081   * @see "HAL_GetNumREVPHModules"
082   */
083  public static native int getNumREVPHModules();
084
085  /**
086   * Gets the number of PH channels in the current system.
087   *
088   * @return the number of PH channels
089   * @see "HAL_GetNumREVPHChannels"
090   */
091  public static native int getNumREVPHChannels();
092
093  /** Utility class. */
094  private PortsJNI() {}
095}