001/* 002 * Copyright (C) Cross The Road Electronics. All rights reserved. 003 * License information can be found in CTRE_LICENSE.txt 004 * For support and suggestions contact support@ctr-electronics.com or file 005 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases 006 */ 007package com.ctre.phoenixpro.controls.jni; 008 009public class ControlJNI { 010 public static native int JNI_RequestConfigApply( 011 String canbus, int deviceHash, double timeoutSeconds, String serializedStr, boolean forceApply); 012 public static native int JNI_RequestControlDutyCycleOut( 013 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Output, boolean EnableFOC, boolean OverrideBrakeDurNeutral); 014 public static native int JNI_RequestControlTorqueCurrentFOC( 015 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Output, double MaxAbsDutyCycle, double Deadband, boolean OverrideCoastDurNeutral); 016 public static native int JNI_RequestControlVoltageOut( 017 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Output, boolean EnableFOC, boolean OverrideBrakeDurNeutral); 018 public static native int JNI_RequestControlPositionDutyCycle( 019 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Position, boolean EnableFOC, double FeedForward, int Slot, boolean OverrideBrakeDurNeutral); 020 public static native int JNI_RequestControlPositionVoltage( 021 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Position, boolean EnableFOC, double FeedForward, int Slot, boolean OverrideBrakeDurNeutral); 022 public static native int JNI_RequestControlPositionTorqueCurrentFOC( 023 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Position, double FeedForward, int Slot, boolean OverrideCoastDurNeutral); 024 public static native int JNI_RequestControlVelocityDutyCycle( 025 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Velocity, boolean EnableFOC, double FeedForward, int Slot, boolean OverrideBrakeDurNeutral); 026 public static native int JNI_RequestControlVelocityVoltage( 027 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Velocity, boolean EnableFOC, double FeedForward, int Slot, boolean OverrideBrakeDurNeutral); 028 public static native int JNI_RequestControlVelocityTorqueCurrentFOC( 029 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Velocity, double FeedForward, int Slot, boolean OverrideCoastDurNeutral); 030 public static native int JNI_RequestControlMotionMagicDutyCycle( 031 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Position, boolean EnableFOC, double FeedForward, int Slot, boolean OverrideBrakeDurNeutral); 032 public static native int JNI_RequestControlMotionMagicVoltage( 033 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Position, boolean EnableFOC, double FeedForward, int Slot, boolean OverrideBrakeDurNeutral); 034 public static native int JNI_RequestControlMotionMagicTorqueCurrentFOC( 035 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, double Position, double FeedForward, int Slot, boolean OverrideCoastDurNeutral); 036 public static native int JNI_RequestControlFollower( 037 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, int MasterID, boolean OpposeMasterDirection); 038 public static native int JNI_RequestControlStrictFollower( 039 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, int MasterID); 040 public static native int JNI_RequestControlNeutralOut( 041 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests); 042 public static native int JNI_RequestControlCoastOut( 043 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests); 044 public static native int JNI_RequestControlStaticBrake( 045 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests); 046 public static native int JNI_RequestControlBalanceBattery( 047 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests); 048 public static native int JNI_RequestControlBMSManualIsolator( 049 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, boolean Enable); 050 public static native int JNI_RequestControlBMSManualVboost( 051 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, boolean EnableClosedLoop, double TargetVoltage, double TargetDutyCycle); 052 public static native int JNI_RequestControlBMSManualPwmJunction( 053 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests, int JunctionSelect, double JunctionDutyCycle); 054 public static native int JNI_RequestControlBMSClearFault( 055 String canbus, int deviceHash, double updateTime, boolean cancelOtherRequests); 056}