001package edu.wpi.first.wpilibj.hal; 002 003import java.nio.ByteBuffer; 004import java.nio.IntBuffer; 005 006public class CompressorJNI extends JNIWrapper { 007 public static native ByteBuffer initializeCompressor(byte module); 008 public static native boolean checkCompressorModule(byte module); 009 010 public static native boolean getCompressor(ByteBuffer pcm_pointer, IntBuffer status); 011 012 public static native void setClosedLoopControl(ByteBuffer pcm_pointer, boolean value, IntBuffer status); 013 public static native boolean getClosedLoopControl(ByteBuffer pcm_pointer, IntBuffer status); 014 015 public static native boolean getPressureSwitch(ByteBuffer pcm_pointer, IntBuffer status); 016 public static native float getCompressorCurrent(ByteBuffer pcm_pointer, IntBuffer status); 017 018 public static native boolean getCompressorCurrentTooHighFault(ByteBuffer pcm_pointer, IntBuffer status); 019 public static native boolean getCompressorCurrentTooHighStickyFault(ByteBuffer pcm_pointer, IntBuffer status); 020 public static native boolean getCompressorShortedStickyFault(ByteBuffer pcm_pointer, IntBuffer status); 021 public static native boolean getCompressorShortedFault(ByteBuffer pcm_pointer, IntBuffer status); 022 public static native boolean getCompressorNotConnectedStickyFault(ByteBuffer pcm_pointer, IntBuffer status); 023 public static native boolean getCompressorNotConnectedFault(ByteBuffer pcm_pointer, IntBuffer status); 024 public static native void clearAllPCMStickyFaults(ByteBuffer pcm_pointer, IntBuffer status); 025}