org.opengts.db.dmtp
Class ClientDiagnostics

java.lang.Object
  extended by org.opengts.db.dmtp.ClientDiagnostics
All Implemented Interfaces:
org.opendmtp.codes.ClientDiagnostics

public class ClientDiagnostics
extends java.lang.Object
implements org.opendmtp.codes.ClientDiagnostics


Field Summary
 
Fields inherited from interface org.opendmtp.codes.ClientDiagnostics
DIAG_INTERNAL_DIAG_E000, DIAG_INTERNAL_DIAG_FFFF, DIAG_OBC_J1708_VALUE, DIAG_UPLOAD_ACK
 
Method Summary
static java.lang.String getDescription(int diagCode)
          Gets the code description
static java.lang.String getStringValue(int diagCode, boolean inclDesc, byte[] diagData)
          Gets the Description and/or converts the specified binary value to a String
static java.lang.String getStringValue(int diagCode, boolean inclDesc, byte[] diagData, java.util.TimeZone tz)
          Gets the Description and/or converts the specified binary value to a String
static java.lang.String getStringValue(int diagCode, byte[] diagData)
          Gets the String representation of the specified data for the specified diagnostic code
static java.lang.String getStringValue(int diagCode, byte[] diagData, java.util.TimeZone tz)
          Gets the String representation of the specified data for the specified diagnostic code
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDescription

public static java.lang.String getDescription(int diagCode)
Gets the code description

Parameters:
diagCode - The diagnostic code
Returns:
The diagnostic description

getStringValue

public static java.lang.String getStringValue(int diagCode,
                                              byte[] diagData)
Gets the String representation of the specified data for the specified diagnostic code

Parameters:
diagCode - The diagnostic code
diagData - The binary payload data
Returns:
The value String representation

getStringValue

public static java.lang.String getStringValue(int diagCode,
                                              byte[] diagData,
                                              java.util.TimeZone tz)
Gets the String representation of the specified data for the specified diagnostic code

Parameters:
diagCode - The diagnostic code
diagData - The binary payload data
tz - A TimeZone used convert any dates encountered
Returns:
The value String representation

getStringValue

public static java.lang.String getStringValue(int diagCode,
                                              boolean inclDesc,
                                              byte[] diagData)
Gets the Description and/or converts the specified binary value to a String

Parameters:
diagCode - The diagnostic code
inclDesc - True to include the description, false to omit
diagData - The binary payload data
Returns:
The value String representation

getStringValue

public static java.lang.String getStringValue(int diagCode,
                                              boolean inclDesc,
                                              byte[] diagData,
                                              java.util.TimeZone tz)
Gets the Description and/or converts the specified binary value to a String

Parameters:
diagCode - The diagnostic code
inclDesc - True to include the description, false to omit
diagData - The binary payload data
tz - A TimeZone used convert any dates encountered
Returns:
The Description and/or value String representation