]> git.basschouten.com Git - openhab-addons.git/blob
81b0e358abeb483eac0be9f8a258ced07a755362
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.lgtvserial.internal.protocol.serial.responses;
14
15 import org.openhab.binding.lgtvserial.internal.protocol.serial.LGSerialResponse;
16 import org.openhab.core.library.types.QuantityType;
17 import org.openhab.core.types.State;
18
19 /**
20  * This class represents a percentage response.
21  *
22  * @author Richard Lavoie - Initial contribution
23  *
24  */
25 public class QuantityResponse implements LGSerialResponse {
26
27     private int setId;
28
29     private boolean success;
30
31     private State state;
32
33     public QuantityResponse(int setId, boolean success, QuantityType<?> state) {
34         this.setId = setId;
35         this.success = success;
36         this.state = state;
37     }
38
39     @Override
40     public int getSetID() {
41         return setId;
42     }
43
44     @Override
45     public State getState() {
46         return state;
47     }
48
49     @Override
50     public boolean isSuccess() {
51         return success;
52     }
53 }