]> git.basschouten.com Git - openhab-addons.git/blob
79f7ce7b9afdcc3fad7051e717f3700f467e5102
[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.plclogo.internal.config;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link PLCCommonConfiguration} is a base class for configuration
19  * of Siemens LOGO! PLC blocks.
20  *
21  * @author Alexander Falkenstern - Initial contribution
22  */
23 @NonNullByDefault
24 abstract class PLCCommonConfiguration {
25
26     private Boolean force = false;
27
28     /**
29      * Returns if Siemens LOGO! channels update must be forced.
30      *
31      * @return True, if channels update to be forced and false otherwise
32      */
33     public Boolean isUpdateForced() {
34         return force;
35     }
36
37     /**
38      * Set Siemens LOGO! channels update must be forced.
39      *
40      * @param force Force update of Siemens LOGO! block
41      */
42     public void setForceUpdate(final Boolean force) {
43         this.force = force;
44     }
45
46     /**
47      * Return channel type accepted by thing.
48      * Can be Contact, Switch, Number, DateTime or String
49      *
50      * @return Accepted channel type
51      */
52     public abstract String getChannelType();
53
54     /**
55      * Get configured Siemens LOGO! blocks kind.
56      * Can be I, Q, M, NI or NQ for digital blocks, AI, AM,
57      * AQ, NAI or NAQ for analog and VB, VW or VD for memory
58      *
59      * @return Configured Siemens LOGO! blocks kind
60      */
61     public abstract String getBlockKind();
62 }