Class Match


  • public class Match
    extends java.lang.Object
    Methods for reading Match data
    • Constructor Summary

      Constructors 
      Constructor Description
      Match()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static edu.wpi.first.wpilibj.DriverStation.Alliance getAlliance()
      Get the current alliance
      static int getAllianceStationID()
      Get the alliance station ID of the humans (where we are set up on the field)
      static java.lang.String getEventName()
      Get the FRC event name
      static java.lang.String getGSM()
      Get the game specific message (data sent by FMS about current match)
      static int getMatchNumber()
      Get the current match number
      static double getMatchTime()
      Get an estimation of the time remaining in the current match (current mode)
      static edu.wpi.first.wpilibj.DriverStation.MatchType getMatchType()
      Get the match type
      static int getReplayNumber()
      Get the current match replay number
      static boolean isOfficialMatch()
      Check if the robot is currently on a field
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Match

        public Match()
    • Method Detail

      • getGSM

        public static java.lang.String getGSM()
        Get the game specific message (data sent by FMS about current match)
        Returns:
        Current GSM
      • getMatchTime

        public static double getMatchTime()
        Get an estimation of the time remaining in the current match (current mode)
        Returns:
        Estimated time left in match
      • isOfficialMatch

        public static boolean isOfficialMatch()
        Check if the robot is currently on a field
        Returns:
        Is the robot on a field
      • getEventName

        public static java.lang.String getEventName()
        Get the FRC event name
        Returns:
        Event name
      • getMatchType

        public static edu.wpi.first.wpilibj.DriverStation.MatchType getMatchType()
        Get the match type
        Returns:
        Match type
      • getMatchNumber

        public static int getMatchNumber()
        Get the current match number
        Returns:
        Current match number
      • getReplayNumber

        public static int getReplayNumber()
        Get the current match replay number
        Returns:
        Match replay number
      • getAlliance

        public static edu.wpi.first.wpilibj.DriverStation.Alliance getAlliance()
        Get the current alliance
        Returns:
        Current alliance
      • getAllianceStationID

        public static int getAllianceStationID()
        Get the alliance station ID of the humans (where we are set up on the field)
        Returns:
        Alliance station ID