summaryrefslogtreecommitdiff
path: root/base/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java
blob: ff01b72e40c8376f691cca1db2ea5e963b3f1c3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/*
 * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *
 * Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following
 * disclaimer in the documentation and/or other materials provided with the
 * distribution.
 *
 * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from this 
 * software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package com.smartdevicelink.proxy.rpc;

import androidx.annotation.NonNull;

import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;

import java.util.Hashtable;

/** The status of the seat belts.
 *
 * <p><b>Parameter List</b></p>
 * 
 * <table border="1" rules="all">
 * 		<tr>
 * 			<th>Param Name</th>
 * 			<th>Type</th>
 * 			<th>Mandatory</th>
 * 			<th>Description</th>
 * 		</tr>
 * 		<tr>
 * 			<td>driverBeltDeployed</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The driver seat belt is deployed.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>passengerBeltDeployed</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The passenger seat belt is deployed.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>passengerBuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The passenger seat belt is buckled.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>driverBuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The driver seat belt is buckled.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>leftRow2BuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The left seat belt of the 2nd row is buckled.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>passengerChildDetected</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The child passenger is detected.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>rightRow2BuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The right seat belt of the 2nd row is buckled.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>middleRow2BuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The middle seat belt of the 2nd row is buckled.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>middleRow3BuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The middle seat belt of the 3rd row is buckled.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>leftRow3BuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The left seat belt of the 3rd row is buckled.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>rightRow3BuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The right seat belt of the 3rd row is buckled.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>leftRearInflatableBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The left rear inflatable is belted.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>rightRearInflatableBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The right rear inflatable is belted.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>middleRow1BeltDeployed</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The seat belt of the middle row is deployed.</td>
 * 		</tr>
 * 		<tr>
 * 			<td>middleRow1BuckleBelted</td>
 * 			<td>VehicleDataEventStatus</td>
 * 			<td>false</td>
 * 			<td>The seat belt of the middle row is buckled.</td>
 * 		</tr>
 *  </table>
* @since SmartDeviceLink 2.0
* @see VehicleDataEventStatus
* @see GetVehicleData 
* @see OnVehicleData
 * @see SubscribeVehicleData
 */

public class BeltStatus extends RPCStruct {
    public static final String KEY_DRIVER_BELT_DEPLOYED = "driverBeltDeployed";
    public static final String KEY_PASSENGER_BELT_DEPLOYED = "passengerBeltDeployed";
    public static final String KEY_PASSENGER_BUCKLE_BELTED = "passengerBuckleBelted";
    public static final String KEY_DRIVER_BUCKLE_BELTED = "driverBuckleBelted";
    public static final String KEY_LEFT_ROW_2_BUCKLE_BELTED = "leftRow2BuckleBelted";
    public static final String KEY_PASSENGER_CHILD_DETECTED = "passengerChildDetected";
    public static final String KEY_RIGHT_ROW_2_BUCKLE_BELTED = "rightRow2BuckleBelted";
    public static final String KEY_MIDDLE_ROW_2_BUCKLE_BELTED = "middleRow2BuckleBelted";
    public static final String KEY_MIDDLE_ROW_3_BUCKLE_BELTED = "middleRow3BuckleBelted";
    public static final String KEY_LEFT_ROW_3_BUCKLE_BELTED = "leftRow3BuckleBelted";

    public static final String KEY_RIGHT_ROW_3_BUCKLE_BELTED = "rightRow3BuckleBelted";
    public static final String KEY_LEFT_REAR_INFLATABLE_BELTED = "leftRearInflatableBelted";
    public static final String KEY_RIGHT_REAR_INFLATABLE_BELTED = "rightRearInflatableBelted";
    public static final String KEY_MIDDLE_ROW_1_BELT_DEPLOYED = "middleRow1BeltDeployed";
    public static final String KEY_MIDDLE_ROW_1_BUCKLE_BELTED = "middleRow1BuckleBelted";

    public BeltStatus() { }

    /** Constructs a new BeltStatus object indicated by the Hashtable
	 * parameter
	 * @param hash hashtable filled with params to create an instance of this RPC
	 * The hash table to use
	 */
    public BeltStatus(Hashtable<String, Object> hash) {
        super(hash);
    }

    public BeltStatus(@NonNull VehicleDataEventStatus driverBeltDeployed, @NonNull VehicleDataEventStatus passengerBeltDeployed, @NonNull VehicleDataEventStatus passengerBuckleBelted,
                      @NonNull VehicleDataEventStatus driverBuckleBelted, @NonNull VehicleDataEventStatus leftRow2BuckleBelted, @NonNull VehicleDataEventStatus passengerChildDetected,
                      @NonNull VehicleDataEventStatus rightRow2BuckleBelted, @NonNull VehicleDataEventStatus middleRow2BuckleBelted, @NonNull VehicleDataEventStatus middleRow3BuckleBelted,
                      @NonNull VehicleDataEventStatus leftRow3BuckleBelted, @NonNull VehicleDataEventStatus rightRow3BuckleBelted, @NonNull VehicleDataEventStatus leftRearInflatableBelted,
                      @NonNull VehicleDataEventStatus rightRearInflatableBelted, @NonNull VehicleDataEventStatus middleRow1BeltDeployed, @NonNull VehicleDataEventStatus middleRow1BuckleBelted
    ) {
        this();
        setDriverBeltDeployed(driverBeltDeployed);
        setPassengerBeltDeployed(passengerBeltDeployed);
        setPassengerBuckleBelted(passengerBuckleBelted);
        setDriverBuckleBelted(driverBuckleBelted);
        setLeftRow2BuckleBelted(leftRow2BuckleBelted);
        setPassengerChildDetected(passengerChildDetected);
        setRightRow2BuckleBelted(rightRow2BuckleBelted);
        setMiddleRow2BuckleBelted(middleRow2BuckleBelted);
        setMiddleRow3BuckleBelted(middleRow3BuckleBelted);
        setLeftRow3BuckleBelted(leftRow3BuckleBelted);
        setRightRow3BuckleBelted(rightRow3BuckleBelted);
        setLeftRearInflatableBelted(leftRearInflatableBelted);
        setRightRearInflatableBelted(rightRearInflatableBelted);
        setMiddleRow1BeltDeployed(middleRow1BeltDeployed);
        setMiddleRow1BuckleBelted(middleRow1BuckleBelted);
    }

    public void setDriverBeltDeployed(@NonNull VehicleDataEventStatus driverBeltDeployed) {
        setValue(KEY_DRIVER_BELT_DEPLOYED, driverBeltDeployed);
    }
    public VehicleDataEventStatus getDriverBeltDeployed() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_DRIVER_BELT_DEPLOYED);
    }
    public void setPassengerBeltDeployed(@NonNull VehicleDataEventStatus passengerBeltDeployed) {
        setValue(KEY_PASSENGER_BELT_DEPLOYED, passengerBeltDeployed);
    }
    public VehicleDataEventStatus getPassengerBeltDeployed() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_PASSENGER_BELT_DEPLOYED);
    }
    public void setPassengerBuckleBelted(@NonNull VehicleDataEventStatus passengerBuckleBelted) {
        setValue(KEY_PASSENGER_BUCKLE_BELTED, passengerBuckleBelted);
    }
    public VehicleDataEventStatus getPassengerBuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_PASSENGER_BUCKLE_BELTED);
    }
    public void setDriverBuckleBelted(VehicleDataEventStatus driverBuckleBelted) {
        setValue(KEY_DRIVER_BUCKLE_BELTED, driverBuckleBelted);
    }
    public VehicleDataEventStatus getDriverBuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_DRIVER_BUCKLE_BELTED);
    }
    public void setLeftRow2BuckleBelted(VehicleDataEventStatus leftRow2BuckleBelted) {
        setValue(KEY_LEFT_ROW_2_BUCKLE_BELTED, leftRow2BuckleBelted);
    }
    public VehicleDataEventStatus getLeftRow2BuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_LEFT_ROW_2_BUCKLE_BELTED);
    }
    public void setPassengerChildDetected(@NonNull VehicleDataEventStatus passengerChildDetected) {
        setValue(KEY_PASSENGER_CHILD_DETECTED, passengerChildDetected);
    }
    public VehicleDataEventStatus getPassengerChildDetected() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_PASSENGER_CHILD_DETECTED);
    }
    public void setRightRow2BuckleBelted(@NonNull VehicleDataEventStatus rightRow2BuckleBelted) {
        setValue(KEY_RIGHT_ROW_2_BUCKLE_BELTED, rightRow2BuckleBelted);
    }
    public VehicleDataEventStatus getRightRow2BuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_RIGHT_ROW_2_BUCKLE_BELTED);
    }
    public void setMiddleRow2BuckleBelted(@NonNull VehicleDataEventStatus middleRow2BuckleBelted) {
        setValue(KEY_MIDDLE_ROW_2_BUCKLE_BELTED, middleRow2BuckleBelted);
    }
    public VehicleDataEventStatus getMiddleRow2BuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_MIDDLE_ROW_2_BUCKLE_BELTED);
    }
    public void setMiddleRow3BuckleBelted(@NonNull VehicleDataEventStatus middleRow3BuckleBelted) {
        setValue(KEY_MIDDLE_ROW_3_BUCKLE_BELTED, middleRow3BuckleBelted);
    }
    public VehicleDataEventStatus getMiddleRow3BuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_MIDDLE_ROW_3_BUCKLE_BELTED);
    }
    public void setLeftRow3BuckleBelted(@NonNull VehicleDataEventStatus leftRow3BuckleBelted) {
        setValue(KEY_LEFT_ROW_3_BUCKLE_BELTED, leftRow3BuckleBelted);
    }
    public VehicleDataEventStatus getLeftRow3BuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_LEFT_ROW_3_BUCKLE_BELTED);
    }
    public void setRightRow3BuckleBelted(@NonNull VehicleDataEventStatus rightRow3BuckleBelted) {
        setValue(KEY_RIGHT_ROW_3_BUCKLE_BELTED, rightRow3BuckleBelted);
    }
    public VehicleDataEventStatus getRightRow3BuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_RIGHT_ROW_3_BUCKLE_BELTED);
    }
    public void setLeftRearInflatableBelted(@NonNull VehicleDataEventStatus rearInflatableBelted) {
        setValue(KEY_LEFT_REAR_INFLATABLE_BELTED, rearInflatableBelted);
    }
    public VehicleDataEventStatus getLeftRearInflatableBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_LEFT_REAR_INFLATABLE_BELTED);
    }
    public void setRightRearInflatableBelted(@NonNull VehicleDataEventStatus rightRearInflatableBelted) {
        setValue(KEY_RIGHT_REAR_INFLATABLE_BELTED, rightRearInflatableBelted);
    }
    public VehicleDataEventStatus getRightRearInflatableBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_RIGHT_REAR_INFLATABLE_BELTED);
    }
    public void setMiddleRow1BeltDeployed(@NonNull VehicleDataEventStatus middleRow1BeltDeployed) {
        setValue(KEY_MIDDLE_ROW_1_BELT_DEPLOYED, middleRow1BeltDeployed);
    }
    public VehicleDataEventStatus getMiddleRow1BeltDeployed() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_MIDDLE_ROW_1_BELT_DEPLOYED);
    }
    public void setMiddleRow1BuckleBelted(@NonNull VehicleDataEventStatus middleRow1BuckleBelted) {
        setValue(KEY_MIDDLE_ROW_1_BUCKLE_BELTED, middleRow1BuckleBelted);
    }
    public VehicleDataEventStatus getMiddleRow1BuckleBelted() {
        return (VehicleDataEventStatus) getObject(VehicleDataEventStatus.class, KEY_MIDDLE_ROW_1_BUCKLE_BELTED);
    }
}