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 edu.wpi.first.hal; 006 007@SuppressWarnings("AbbreviationAsWordInName") 008public class CTREPCMJNI extends JNIWrapper { 009 public static native int initialize(int module); 010 011 public static native void free(int handle); 012 013 public static native boolean checkSolenoidChannel(int channel); 014 015 public static native boolean getCompressor(int handle); 016 017 public static native void setClosedLoopControl(int handle, boolean enabled); 018 019 public static native boolean getClosedLoopControl(int handle); 020 021 public static native boolean getPressureSwitch(int handle); 022 023 public static native double getCompressorCurrent(int handle); 024 025 public static native boolean getCompressorCurrentTooHighFault(int handle); 026 027 public static native boolean getCompressorCurrentTooHighStickyFault(int handle); 028 029 public static native boolean getCompressorShortedFault(int handle); 030 031 public static native boolean getCompressorShortedStickyFault(int handle); 032 033 public static native boolean getCompressorNotConnectedFault(int handle); 034 035 public static native boolean getCompressorNotConnectedStickyFault(int handle); 036 037 public static native int getSolenoids(int handle); 038 039 public static native void setSolenoids(int handle, int mask, int values); 040 041 public static native int getSolenoidDisabledList(int handle); 042 043 public static native boolean getSolenoidVoltageFault(int handle); 044 045 public static native boolean getSolenoidVoltageStickyFault(int handle); 046 047 public static native void clearAllStickyFaults(int handle); 048 049 public static native void fireOneShot(int handle, int index); 050 051 public static native void setOneShotDuration(int handle, int index, int durMs); 052}