2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.plclogo.internal.config;
15 import static org.openhab.binding.plclogo.internal.PLCLogoBindingConstants.DATE_TIME_ITEM;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
20 * The {@link PLCDateTimeConfiguration} holds configuration of Siemens LOGO! PLC
21 * analog input/outputs blocks.
23 * @author Alexander Falkenstern - Initial contribution
26 public class PLCDateTimeConfiguration extends PLCCommonConfiguration {
28 private String block = "";
29 private String type = "";
32 * Get configured Siemens LOGO! block name.
34 * @return Configured Siemens LOGO! block name
36 public String getBlockName() {
41 * Set Siemens LOGO! block name.
43 * @param name Siemens LOGO! block name
45 public void setBlockName(final String name) {
46 this.block = name.trim();
50 * Get configured Siemens LOGO! block name.
52 * @return Configured Siemens LOGO! block name
54 public String getBlockType() {
59 * Set Siemens LOGO! block name.
61 * @param type Siemens LOGO! output block type
63 public void setBlockType(final String type) {
64 this.type = type.trim();
68 public String getChannelType() {
69 return DATE_TIME_ITEM;
73 public String getBlockKind() {
74 return block.substring(0, 2);