Enum HardwareType
- java.lang.Object
-
- java.lang.Enum<HardwareType>
-
- com.google.blocks.ftcrobotcontroller.hardware.HardwareType
-
- All Implemented Interfaces:
Serializable
,Comparable<HardwareType>
public enum HardwareType extends Enum<HardwareType>
An enum to represent a specific type of hardware.
-
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description String
blockTypePrefix
The prefix of all block types associated with this HardwareType.String
createDropdownFunctionName
The name of the javascript function which creates a block dropdown showing the names of all hardware items of this HardwareType.Class<? extends com.qualcomm.robotcore.hardware.HardwareDevice>
deviceType
The common type shared by all instances of this HardwareType.String
identifierSuffixForFtcJava
The suffix appended, only if necessary to make them unique, to FtcJava identifiers for devices of this HardwareType.String
identifierSuffixForJavaScript
The suffix of all JavaScript identifiers for devices of this HardwareType.String
toolboxCategoryName
The name of the toolbox category associated with this HardwareType.ToolboxFolder
toolboxFolder
The toolbox folder that will contain the toolbox category associated with this HardwareType.ToolboxIcon
toolboxIcon
The toolbox icon enum associated with this HardwareType.String[]
xmlTags
The xmlTags corresponding to this HardwareType.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HardwareType
fromIdentifierSuffixForJavaScript(String identifierSuffixForJavaScript)
String
makeIdentifier(String deviceName)
static HardwareType
valueOf(String name)
Returns the enum constant of this type with the specified name.static HardwareType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ACCELERATION_SENSOR
public static final HardwareType ACCELERATION_SENSOR
-
ANALOG_INPUT
public static final HardwareType ANALOG_INPUT
-
BNO055IMU
public static final HardwareType BNO055IMU
-
COLOR_RANGE_SENSOR
public static final HardwareType COLOR_RANGE_SENSOR
-
COLOR_SENSOR
public static final HardwareType COLOR_SENSOR
-
COMPASS_SENSOR
public static final HardwareType COMPASS_SENSOR
-
CR_SERVO
public static final HardwareType CR_SERVO
-
DC_MOTOR
public static final HardwareType DC_MOTOR
-
DIGITAL_CHANNEL
public static final HardwareType DIGITAL_CHANNEL
-
DISTANCE_SENSOR
public static final HardwareType DISTANCE_SENSOR
-
GYRO_SENSOR
public static final HardwareType GYRO_SENSOR
-
HUSKY_LENS
public static final HardwareType HUSKY_LENS
-
IMU
public static final HardwareType IMU
-
IR_SEEKER_SENSOR
public static final HardwareType IR_SEEKER_SENSOR
-
LED
public static final HardwareType LED
-
LIGHT_SENSOR
public static final HardwareType LIGHT_SENSOR
-
LYNX_MODULE
public static final HardwareType LYNX_MODULE
-
MR_I2C_COMPASS_SENSOR
public static final HardwareType MR_I2C_COMPASS_SENSOR
-
MR_I2C_RANGE_SENSOR
public static final HardwareType MR_I2C_RANGE_SENSOR
-
OPTICAL_DISTANCE_SENSOR
public static final HardwareType OPTICAL_DISTANCE_SENSOR
-
REV_BLINKIN_LED_DRIVER
public static final HardwareType REV_BLINKIN_LED_DRIVER
-
SERVO
public static final HardwareType SERVO
-
SERVO_CONTROLLER
public static final HardwareType SERVO_CONTROLLER
-
TOUCH_SENSOR
public static final HardwareType TOUCH_SENSOR
-
ULTRASONIC_SENSOR
public static final HardwareType ULTRASONIC_SENSOR
-
VOLTAGE_SENSOR
public static final HardwareType VOLTAGE_SENSOR
-
WEBCAM_NAME
public static final HardwareType WEBCAM_NAME
-
-
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 inHardwareUtil.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 inToolboxUtil
. 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 nameNullPointerException
- if the argument is null
-
fromIdentifierSuffixForJavaScript
public static HardwareType fromIdentifierSuffixForJavaScript(String identifierSuffixForJavaScript)
-
-