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