Enum HardwareType

    • Field Detail

      • createDropdownFunctionName

        public final String createDropdownFunctionName
        The name of the javascript function which creates a block dropdown showing the names of all hardware items of this HardwareType. The javascript code is produced dynamically in HardwareUtil.fetchJavaScriptForHardware(). This must match the function name used in the appropriate js file.
      • blockTypePrefix

        public final String blockTypePrefix
        The prefix of all block types associated with this HardwareType. The toolbox xml is produced dynamically in ToolboxUtil. This must match the prefix used in the appropriate js file.
      • identifierSuffixForJavaScript

        public final String identifierSuffixForJavaScript
        The suffix of all JavaScript identifiers for devices of this HardwareType.
      • identifierSuffixForFtcJava

        public final String identifierSuffixForFtcJava
        The suffix appended, only if necessary to make them unique, to FtcJava identifiers for devices of this HardwareType.
      • toolboxFolder

        public final ToolboxFolder toolboxFolder
        The toolbox folder that will contain the toolbox category associated with this HardwareType.
      • toolboxCategoryName

        public final String toolboxCategoryName
        The name of the toolbox category associated with this HardwareType.
      • toolboxIcon

        public final ToolboxIcon toolboxIcon
        The toolbox icon enum associated with this HardwareType.
      • deviceType

        public final Class<? extends com.qualcomm.robotcore.hardware.HardwareDevice> deviceType
        The common type shared by all instances of this HardwareType.
      • xmlTags

        public final String[] xmlTags
        The xmlTags corresponding to this HardwareType.
    • Method Detail

      • values

        public static HardwareType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (HardwareType c : HardwareType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static HardwareType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • makeIdentifier

        public String makeIdentifier​(String deviceName)
      • fromIdentifierSuffixForJavaScript

        public static HardwareType fromIdentifierSuffixForJavaScript​(String identifierSuffixForJavaScript)