public class FaultCodeCommon extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FaultCodeCommon.Bus
Enumeration of the different CAN buses exposed by the WVA.
|
static class |
FaultCodeCommon.FaultCodeType
Enumeration of the different fault code message types.
|
Modifier and Type | Field and Description |
---|---|
static String |
FAULT_CODE_BASE
The base URL path for all fault code data in the WVA device web services.
|
Constructor and Description |
---|
FaultCodeCommon() |
Modifier and Type | Method and Description |
---|---|
static String |
createEcuPath(FaultCodeCommon.Bus bus,
FaultCodeCommon.FaultCodeType type,
String ecu)
Given the bus, message type, and ECU name, return the
vehicle/dtc/ sub-path to the
specified ECU data. |
static String |
createUri(FaultCodeCommon.Bus bus,
FaultCodeCommon.FaultCodeType type,
String ecu)
Given the bus, message type, and ECU name, return the full web services path to the specified ECU
data.
|
static String |
createUri(String ecuPath)
Given the ECU URI path, return the full web services path to the specified ECU data.
|
public static final String FAULT_CODE_BASE
public static String createEcuPath(FaultCodeCommon.Bus bus, FaultCodeCommon.FaultCodeType type, String ecu)
vehicle/dtc/
sub-path to the
specified ECU data. An example return value is
can0_active/ecu0
.bus
- the CAN bus usedtype
- the message type (active or inactive)ecu
- the ECU nameString.format("%s_%s/%s", bus, type, ecu)
NullPointerException
- if ecu is null or 0-length. The path generated using such values
would be meaninglesspublic static String createUri(String ecuPath)
can0_active/ecu0
, this method will return
vehicle/dtc/can0_active/ecu0
.ecuPath
- the path to the desired ECU URIString.format("vehicle/dtc/%s", ecuPath)
NullPointerException
- if ecuPath is null or 0-length. The path generated using such values
would be meaninglesspublic static String createUri(FaultCodeCommon.Bus bus, FaultCodeCommon.FaultCodeType type, String ecu)
vehicle/dtc/can0_active/ecu0
.bus
- the CAN bus usedtype
- the message type (active or inactive)ecu
- the ECU nameString.format("vehicle/dtc/%s", createEcuPath(bus, type, ecu))
NullPointerException
- if ecu is null or 0-length. The path generated using such values
would be meaningless