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.onewire.internal.device;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.onewire.internal.DigitalIoConfig;
17 import org.openhab.binding.onewire.internal.OwException;
18 import org.openhab.binding.onewire.internal.SensorId;
19 import org.openhab.binding.onewire.internal.handler.OwBaseThingHandler;
20 import org.openhab.binding.onewire.internal.owserver.OwserverDeviceParameter;
23 * The {@link DS2408} class defines a DS2408 device
25 * @author Jan N. Klug - Initial contribution
28 public class DS2408 extends AbstractDigitalOwDevice {
29 public DS2408(SensorId sensorId, OwBaseThingHandler callback) {
30 super(sensorId, callback);
34 public void configureChannels() throws OwException {
37 for (int i = 0; i < 8; i++) {
38 ioConfig.add(new DigitalIoConfig(callback.getThing(), i,
39 new OwserverDeviceParameter("uncached/", String.format("/sensed.%d", i)),
40 new OwserverDeviceParameter(String.format("/PIO.%d", i))));
43 fullInParam = new OwserverDeviceParameter("uncached/", "/sensed.BYTE");
44 fullOutParam = new OwserverDeviceParameter("/PIO.BYTE");
46 super.configureChannels();