Class HardwareUtil
- java.lang.Object
-
- com.google.blocks.ftcrobotcontroller.hardware.HardwareUtil
-
public class HardwareUtil extends Object
A class that provides utility methods related to hardware.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HardwareUtil.Capability
-
Field Summary
Fields Modifier and Type Field Description static String
IDENTIFIERS_USED_PREFIX
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
fetchJavaScriptForHardware()
Returns the JavaScript code related to the hardware in the active configuration.static String
fetchJavaScriptForHardware(HardwareItemMap hardwareItemMap)
Returns the JavaScript code related to the hardware in the givenHardwareItem
.static Map<HardwareUtil.Capability,Boolean>
getCapabilities(HardwareItemMap hardwareItemMap)
static String
getConfigurationName()
Returns the name of the active configuration.static String[]
getParameterDefaultValues(Method method)
static String[]
getParameterLabels(Method method)
static String
upgradeJs(String jsContent, HardwareItemMap hardwareItemMap)
Upgrades the given js content based on the givenHardwareItemMap
.
-
-
-
Field Detail
-
IDENTIFIERS_USED_PREFIX
public static final String IDENTIFIERS_USED_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
fetchJavaScriptForHardware
public static String fetchJavaScriptForHardware() throws IOException
Returns the JavaScript code related to the hardware in the active configuration.- Throws:
IOException
-
fetchJavaScriptForHardware
public static String fetchJavaScriptForHardware(HardwareItemMap hardwareItemMap) throws IOException
Returns the JavaScript code related to the hardware in the givenHardwareItem
.- Throws:
IOException
-
getCapabilities
public static Map<HardwareUtil.Capability,Boolean> getCapabilities(HardwareItemMap hardwareItemMap)
-
upgradeJs
public static String upgradeJs(String jsContent, HardwareItemMap hardwareItemMap)
Upgrades the given js content based on the givenHardwareItemMap
.
-
getConfigurationName
public static String getConfigurationName()
Returns the name of the active configuration.
-
-