]> git.basschouten.com Git - openhab-addons.git/blob
c558d590847658b82205ac938f450d90321e8a7e
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.bluetooth.am43.internal.data;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * The {@link MotorSettings} is contains the settings which are sent in batch to
20  * {@link org.openhab.binding.bluetooth.am43.internal.command.SetSettingsCommand}.
21  * These settings cannot be changed individually and must be sent together in the same command.
22  *
23  * @author Connor Petty - Initial contribution
24  */
25 @NonNullByDefault
26 public class MotorSettings {
27
28     @Nullable
29     private Direction direction;
30     @Nullable
31     private OperationMode operationMode;
32
33     private boolean topLimitSet;
34
35     private boolean bottomLimitSet;
36
37     private int type = 0;
38     // speed by rpm
39     private int speed = 0;
40     // lengh in mm
41     private int length;
42     // diameter in mm
43     private int diameter;
44
45     @Nullable
46     public Direction getDirection() {
47         return direction;
48     }
49
50     public void setDirection(Direction direction) {
51         this.direction = direction;
52     }
53
54     @Nullable
55     public OperationMode getOperationMode() {
56         return operationMode;
57     }
58
59     public void setOperationMode(OperationMode operationMode) {
60         this.operationMode = operationMode;
61     }
62
63     public boolean isTopLimitSet() {
64         return topLimitSet;
65     }
66
67     public void setTopLimitSet(boolean value) {
68         this.topLimitSet = value;
69     }
70
71     public boolean isBottomLimitSet() {
72         return bottomLimitSet;
73     }
74
75     public void setBottomLimitSet(boolean value) {
76         this.bottomLimitSet = value;
77     }
78
79     public int getType() {
80         return type;
81     }
82
83     public void setType(int type) {
84         this.type = type;
85     }
86
87     public int getSpeed() {
88         return speed;
89     }
90
91     public void setSpeed(int speed) {
92         this.speed = speed;
93     }
94
95     public int getLength() {
96         return length;
97     }
98
99     public void setLength(int length) {
100         this.length = length;
101     }
102
103     public int getDiameter() {
104         return diameter;
105     }
106
107     public void setDiameter(int diameter) {
108         this.diameter = diameter;
109     }
110 }