Class HAL

public final class HAL
extends JNIWrapper
JNI Wrapper for HAL
  • Field Details

  • Method Details

    • waitForDSData

      public static void waitForDSData()
    • initialize

      public static boolean initialize​(int timeout, int mode)
    • shutdown

      public static void shutdown()
    • hasMain

      public static boolean hasMain()
    • runMain

      public static void runMain()
    • exitMain

      public static void exitMain()
    • simPeriodicBefore

      public static void simPeriodicBefore()
      Runs SimPeriodicBefore callbacks. IterativeRobotBase calls this prior to the user's simulationPeriodic code.
    • simPeriodicAfter

      public static void simPeriodicAfter()
      Runs SimPeriodicAfter callbacks. IterativeRobotBase calls this after the user's simulationPeriodic code.
    • observeUserProgramStarting

      public static void observeUserProgramStarting()
    • observeUserProgramDisabled

      public static void observeUserProgramDisabled()
    • observeUserProgramAutonomous

      public static void observeUserProgramAutonomous()
    • observeUserProgramTeleop

      public static void observeUserProgramTeleop()
    • observeUserProgramTest

      public static void observeUserProgramTest()
    • report

      public static void report​(int resource, int instanceNumber)
    • report

      public static void report​(int resource, int instanceNumber, int context)
    • report

      public static int report​(int resource, int instanceNumber, int context, String feature)
      Report the usage of a resource of interest.

      Original signature: uint32_t report(tResourceType, uint8_t, uint8_t, const char*)

      resource - one of the values in the tResourceType above (max value 51).
      instanceNumber - an index that identifies the resource instance.
      context - an optional additional context number for some cases (such as module number). Set to 0 to omit.
      feature - a string to be included describing features in use on a specific resource. Setting the same resource more than once allows you to change the feature string.
    • nativeGetControlWord

      public static int nativeGetControlWord()
    • getControlWord

      public static void getControlWord​(ControlWord controlWord)
    • getAllianceStation

      public static AllianceStationID getAllianceStation()
    • isNewControlData

      public static boolean isNewControlData()
    • releaseDSMutex

      public static void releaseDSMutex()
    • waitForDSDataTimeout

      public static boolean waitForDSDataTimeout​(double timeout)
    • getJoystickAxes

      public static short getJoystickAxes​(byte joystickNum, float[] axesArray)
    • getJoystickPOVs

      public static short getJoystickPOVs​(byte joystickNum, short[] povsArray)
    • getJoystickButtons

      public static int getJoystickButtons​(byte joystickNum, ByteBuffer count)
    • setJoystickOutputs

      public static int setJoystickOutputs​(byte joystickNum, int outputs, short leftRumble, short rightRumble)
    • getJoystickIsXbox

      public static int getJoystickIsXbox​(byte joystickNum)
    • getJoystickType

      public static int getJoystickType​(byte joystickNum)
    • getJoystickName

      public static String getJoystickName​(byte joystickNum)
    • getJoystickAxisType

      public static int getJoystickAxisType​(byte joystickNum, byte axis)
    • getMatchTime

      public static double getMatchTime()
    • getSystemActive

      public static boolean getSystemActive()
    • getBrownedOut

      public static boolean getBrownedOut()
    • getMatchInfo

      public static int getMatchInfo​(MatchInfoData info)
    • sendError

      public static int sendError​(boolean isError, int errorCode, boolean isLVCode, String details, String location, String callStack, boolean printMsg)
    • sendConsoleLine

      public static int sendConsoleLine​(String line)
    • getPortWithModule

      public static int getPortWithModule​(byte module, byte channel)
    • getPort

      public static int getPort​(byte channel)