1 package com.smartdevicelink.proxy.rpc;
\r
3 import java.util.Hashtable;
\r
4 import java.util.Vector;
\r
6 import com.smartdevicelink.proxy.RPCRequest;
\r
7 import com.smartdevicelink.proxy.constants.Names;
\r
10 * Non periodic vehicle data read request. This is an RPC to get diagnostics
\r
11 * data from certain vehicle modules. DIDs of a certain module might differ from
\r
12 * vehicle type to vehicle type
\r
14 * Function Group: ProprietaryData
\r
16 * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
\r
19 * @since SmartDeviceLink 2.0
\r
21 public class ReadDID extends RPCRequest {
\r
24 * Constructs a new ReadDID object
\r
31 * Constructs a new ReadDID object indicated by the Hashtable parameter
\r
35 * The Hashtable to use
\r
37 public ReadDID(Hashtable hash) {
\r
42 * Sets an ID of the vehicle module
\r
45 * an Integer value representing the ID of the vehicle module
\r
47 * <b>Notes: </b>Minvalue:0; Maxvalue:65535
\r
49 public void setEcuName(Integer ecuName) {
\r
50 if (ecuName != null) {
\r
51 parameters.put(Names.ecuName, ecuName);
\r
53 parameters.remove(Names.ecuName);
\r
58 * Gets the ID of the vehicle module
\r
60 * @return Integer -an Integer value representing the ID of the vehicle
\r
63 public Integer getEcuName() {
\r
64 return (Integer) parameters.get(Names.ecuName);
\r
68 * Sets raw data from vehicle data DID location(s)
\r
70 * @param didLocation
\r
71 * a Vector<Integer> value representing raw data from vehicle
\r
72 * data DID location(s)
\r
76 * <li>Minvalue:0; Maxvalue:65535</li>
\r
77 * <li>ArrayMin:0; ArrayMax:1000</li>
\r
80 public void setDidLocation(Vector<Integer> didLocation) {
\r
81 if (didLocation != null) {
\r
82 parameters.put(Names.didLocation, didLocation);
\r
84 parameters.remove(Names.didLocation);
\r
89 * Gets raw data from vehicle data DID location(s)
\r
91 * @return Vector<Integer> -a Vector<Integer> value representing raw data
\r
92 * from vehicle data DID location(s)
\r
94 public Vector<Integer> getDidLocation() {
\r
95 if (parameters.get(Names.didLocation) instanceof Vector<?>) {
\r
96 Vector<?> list = (Vector<?>)parameters.get(Names.didLocation);
\r
97 if (list != null && list.size() > 0) {
\r
98 Object obj = list.get(0);
\r
99 if (obj instanceof Integer) {
\r
100 return (Vector<Integer>) list;
\r