[modbus] Moved modbus transport from addons to core (#9268)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
@@ -21,11 +21,5 @@
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openhab.addons.bundles</groupId>
|
||||
<artifactId>org.openhab.io.transport.modbus</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<features name="org.openhab.binding.modbus.e3dc-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
|
||||
<repository>file:${basedirRoot}/bundles/org.openhab.io.transport.modbus/target/feature/feature.xml</repository>
|
||||
|
||||
<feature name="openhab-binding-modbus-e3dc" description="E3DC Modbus Binding" version="${project.version}">
|
||||
<feature>openhab-runtime-base</feature>
|
||||
<feature>openhab-transport-modbus</feature>
|
||||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.modbus/${project.version}</bundle>
|
||||
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.modbus.e3dc/${project.version}</bundle>
|
||||
</feature>
|
||||
</features>
|
||||
@@ -16,8 +16,8 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.BitSet;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.io.transport.modbus.ModbusBitUtilities;
|
||||
import org.openhab.io.transport.modbus.ValueBuffer;
|
||||
import org.openhab.core.io.transport.modbus.ModbusBitUtilities;
|
||||
import org.openhab.core.io.transport.modbus.ValueBuffer;
|
||||
|
||||
/**
|
||||
* The {@link DataConverter} Helper class to convert bytes from modbus into desired data format
|
||||
|
||||
@@ -18,9 +18,9 @@ import java.util.BitSet;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Data;
|
||||
import org.openhab.core.io.transport.modbus.ModbusBitUtilities;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.io.transport.modbus.ModbusBitUtilities;
|
||||
|
||||
/**
|
||||
* The {@link EmergencyBlock} Data object for E3DC Info Block
|
||||
|
||||
@@ -14,10 +14,10 @@ package org.openhab.binding.modbus.e3dc.internal.dto;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Data;
|
||||
import org.openhab.core.io.transport.modbus.ValueBuffer;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.util.HexUtils;
|
||||
import org.openhab.io.transport.modbus.ValueBuffer;
|
||||
|
||||
/**
|
||||
* The {@link InfoBlock} Data object for E3DC Info Block
|
||||
|
||||
@@ -17,9 +17,9 @@ import javax.measure.quantity.Power;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Data;
|
||||
import org.openhab.core.io.transport.modbus.ValueBuffer;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
import org.openhab.io.transport.modbus.ValueBuffer;
|
||||
|
||||
/**
|
||||
* The {@link PowerBlock} Data object for E3DC Info Block
|
||||
|
||||
@@ -18,9 +18,9 @@ import javax.measure.quantity.Power;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Data;
|
||||
import org.openhab.core.io.transport.modbus.ValueBuffer;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.unit.Units;
|
||||
import org.openhab.io.transport.modbus.ValueBuffer;
|
||||
|
||||
/**
|
||||
* The {@link StringBlock} Data object for E3DC Info Block
|
||||
|
||||
@@ -30,6 +30,12 @@ import org.openhab.binding.modbus.e3dc.internal.modbus.Data.DataType;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Parser;
|
||||
import org.openhab.binding.modbus.handler.EndpointNotInitializedException;
|
||||
import org.openhab.binding.modbus.handler.ModbusEndpointThingHandler;
|
||||
import org.openhab.core.io.transport.modbus.AsyncModbusFailure;
|
||||
import org.openhab.core.io.transport.modbus.AsyncModbusReadResult;
|
||||
import org.openhab.core.io.transport.modbus.ModbusCommunicationInterface;
|
||||
import org.openhab.core.io.transport.modbus.ModbusReadFunctionCode;
|
||||
import org.openhab.core.io.transport.modbus.ModbusReadRequestBlueprint;
|
||||
import org.openhab.core.io.transport.modbus.PollTask;
|
||||
import org.openhab.core.thing.Bridge;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.Thing;
|
||||
@@ -38,12 +44,6 @@ import org.openhab.core.thing.ThingStatusDetail;
|
||||
import org.openhab.core.thing.binding.BaseBridgeHandler;
|
||||
import org.openhab.core.thing.binding.ThingHandler;
|
||||
import org.openhab.core.types.Command;
|
||||
import org.openhab.io.transport.modbus.AsyncModbusFailure;
|
||||
import org.openhab.io.transport.modbus.AsyncModbusReadResult;
|
||||
import org.openhab.io.transport.modbus.ModbusCommunicationInterface;
|
||||
import org.openhab.io.transport.modbus.ModbusReadFunctionCode;
|
||||
import org.openhab.io.transport.modbus.ModbusReadRequestBlueprint;
|
||||
import org.openhab.io.transport.modbus.PollTask;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -28,6 +28,12 @@ import org.openhab.binding.modbus.e3dc.internal.dto.WallboxBlock;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Data;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Data.DataType;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Parser;
|
||||
import org.openhab.core.io.transport.modbus.AsyncModbusFailure;
|
||||
import org.openhab.core.io.transport.modbus.AsyncModbusReadResult;
|
||||
import org.openhab.core.io.transport.modbus.ModbusCommunicationInterface;
|
||||
import org.openhab.core.io.transport.modbus.ModbusReadRequestBlueprint;
|
||||
import org.openhab.core.io.transport.modbus.ModbusRegisterArray;
|
||||
import org.openhab.core.io.transport.modbus.ModbusWriteRegisterRequestBlueprint;
|
||||
import org.openhab.core.library.types.OnOffType;
|
||||
import org.openhab.core.thing.Bridge;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
@@ -37,12 +43,6 @@ import org.openhab.core.thing.ThingStatusDetail;
|
||||
import org.openhab.core.thing.binding.BaseThingHandler;
|
||||
import org.openhab.core.thing.binding.ThingHandler;
|
||||
import org.openhab.core.types.Command;
|
||||
import org.openhab.io.transport.modbus.AsyncModbusFailure;
|
||||
import org.openhab.io.transport.modbus.AsyncModbusReadResult;
|
||||
import org.openhab.io.transport.modbus.ModbusCommunicationInterface;
|
||||
import org.openhab.io.transport.modbus.ModbusReadRequestBlueprint;
|
||||
import org.openhab.io.transport.modbus.ModbusRegisterArray;
|
||||
import org.openhab.io.transport.modbus.ModbusWriteRegisterRequestBlueprint;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import org.openhab.binding.modbus.e3dc.internal.dto.PowerBlock;
|
||||
import org.openhab.binding.modbus.e3dc.internal.dto.StringBlock;
|
||||
import org.openhab.binding.modbus.e3dc.internal.dto.WallboxArray;
|
||||
import org.openhab.binding.modbus.e3dc.internal.modbus.Data.DataType;
|
||||
import org.openhab.io.transport.modbus.AsyncModbusReadResult;
|
||||
import org.openhab.io.transport.modbus.ModbusRegisterArray;
|
||||
import org.openhab.core.io.transport.modbus.AsyncModbusReadResult;
|
||||
import org.openhab.core.io.transport.modbus.ModbusRegisterArray;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.ArgumentMatchers;
|
||||
import org.openhab.core.config.core.Configuration;
|
||||
import org.openhab.core.io.transport.modbus.AsyncModbusFailure;
|
||||
import org.openhab.core.io.transport.modbus.AsyncModbusReadResult;
|
||||
import org.openhab.core.io.transport.modbus.ModbusReadRequestBlueprint;
|
||||
import org.openhab.core.io.transport.modbus.ModbusRegisterArray;
|
||||
import org.openhab.core.thing.Bridge;
|
||||
import org.openhab.core.thing.Thing;
|
||||
import org.openhab.core.thing.ThingStatus;
|
||||
@@ -27,10 +31,6 @@ import org.openhab.core.thing.ThingStatusDetail;
|
||||
import org.openhab.core.thing.ThingStatusInfo;
|
||||
import org.openhab.core.thing.ThingUID;
|
||||
import org.openhab.core.thing.binding.ThingHandlerCallback;
|
||||
import org.openhab.io.transport.modbus.AsyncModbusFailure;
|
||||
import org.openhab.io.transport.modbus.AsyncModbusReadResult;
|
||||
import org.openhab.io.transport.modbus.ModbusReadRequestBlueprint;
|
||||
import org.openhab.io.transport.modbus.ModbusRegisterArray;
|
||||
|
||||
/**
|
||||
* The {@link E3DCHandlerStateTest} Test State handling of Handler if different results occurs
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.BitSet;
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.modbus.e3dc.internal.dto.DataConverter;
|
||||
import org.openhab.io.transport.modbus.ValueBuffer;
|
||||
import org.openhab.core.io.transport.modbus.ValueBuffer;
|
||||
|
||||
/**
|
||||
* The {@link DataConverterTest} Test data conversions
|
||||
|
||||
Reference in New Issue
Block a user