Package edu.wpi.first.hal
Class PowerDistributionJNI
- java.lang.Object
-
- edu.wpi.first.hal.JNIWrapper
-
- edu.wpi.first.hal.PowerDistributionJNI
-
public class PowerDistributionJNI extends JNIWrapper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.wpi.first.hal.JNIWrapper
JNIWrapper.Helper
-
-
Field Summary
Fields Modifier and Type Field Description static int
AUTOMATIC_TYPE
static int
CTRE_TYPE
static int
DEFAULT_MODULE
static int
REV_TYPE
-
Constructor Summary
Constructors Constructor Description PowerDistributionJNI()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkChannel(int handle, int channel)
static boolean
checkModule(int module, int type)
static void
clearStickyFaults(int handle)
static void
free(int handle)
static void
getAllCurrents(int handle, double[] currents)
static double
getChannelCurrent(int handle, int channel)
static double
getChannelCurrentNoError(int handle, int channel)
static PowerDistributionFaults
getFaults(int handle)
static int
getFaultsNative(int handle)
static int
getModuleNumber(int handle)
static int
getNumChannels(int handle)
static PowerDistributionStickyFaults
getStickyFaults(int handle)
static int
getStickyFaultsNative(int handle)
static boolean
getSwitchableChannel(int handle)
static boolean
getSwitchableChannelNoError(int handle)
static double
getTemperature(int handle)
static double
getTotalCurrent(int handle)
static double
getTotalCurrentNoError(int handle)
static double
getTotalEnergy(int handle)
static double
getTotalPower(int handle)
static int
getType(int handle)
static PowerDistributionVersion
getVersion(int handle)
static double
getVoltage(int handle)
static double
getVoltageNoError(int handle)
static int
initialize(int module, int type)
static void
resetTotalEnergy(int handle)
static void
setSwitchableChannel(int handle, boolean enabled)
static void
setSwitchableChannelNoError(int handle, boolean enabled)
-
Methods inherited from class edu.wpi.first.hal.JNIWrapper
forceLoad, suppressUnused
-
-
-
-
Field Detail
-
AUTOMATIC_TYPE
public static final int AUTOMATIC_TYPE
- See Also:
- Constant Field Values
-
CTRE_TYPE
public static final int CTRE_TYPE
- See Also:
- Constant Field Values
-
REV_TYPE
public static final int REV_TYPE
- See Also:
- Constant Field Values
-
DEFAULT_MODULE
public static final int DEFAULT_MODULE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PowerDistributionJNI
public PowerDistributionJNI()
-
-
Method Detail
-
initialize
public static int initialize(int module, int type)
-
free
public static void free(int handle)
-
getModuleNumber
public static int getModuleNumber(int handle)
-
checkModule
public static boolean checkModule(int module, int type)
-
checkChannel
public static boolean checkChannel(int handle, int channel)
-
getType
public static int getType(int handle)
-
getNumChannels
public static int getNumChannels(int handle)
-
getTemperature
public static double getTemperature(int handle)
-
getVoltage
public static double getVoltage(int handle)
-
getChannelCurrent
public static double getChannelCurrent(int handle, int channel)
-
getAllCurrents
public static void getAllCurrents(int handle, double[] currents)
-
getTotalCurrent
public static double getTotalCurrent(int handle)
-
getTotalPower
public static double getTotalPower(int handle)
-
getTotalEnergy
public static double getTotalEnergy(int handle)
-
resetTotalEnergy
public static void resetTotalEnergy(int handle)
-
clearStickyFaults
public static void clearStickyFaults(int handle)
-
getSwitchableChannel
public static boolean getSwitchableChannel(int handle)
-
setSwitchableChannel
public static void setSwitchableChannel(int handle, boolean enabled)
-
getVoltageNoError
public static double getVoltageNoError(int handle)
-
getChannelCurrentNoError
public static double getChannelCurrentNoError(int handle, int channel)
-
getTotalCurrentNoError
public static double getTotalCurrentNoError(int handle)
-
getSwitchableChannelNoError
public static boolean getSwitchableChannelNoError(int handle)
-
setSwitchableChannelNoError
public static void setSwitchableChannelNoError(int handle, boolean enabled)
-
getFaultsNative
public static int getFaultsNative(int handle)
-
getFaults
public static PowerDistributionFaults getFaults(int handle)
-
getStickyFaultsNative
public static int getStickyFaultsNative(int handle)
-
getStickyFaults
public static PowerDistributionStickyFaults getStickyFaults(int handle)
-
getVersion
public static PowerDistributionVersion getVersion(int handle)
-
-