Sami Salonen 265fd30ba1
[modbus] Gain-offset profile (QuantityType support) and writing of individual bits of holding registers (#9980)
* [modbus] gainOffset and bitMask profiles for working with modbus data

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] README trailing whitespaces

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] README and some final renaming

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] log error with incompatible units

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] gainOffset profile: test for incompatible unit

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] example renamed

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Remove unused fields

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] gainOffset profile: make configuration parameters optional

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] xml indentantion fix

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] static code analysis fixes

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Minor fixes for null checking

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] remove comment

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] bit profile README disclaimer with many commands

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Grammar fixes in README

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Fix bit profile UI configuration

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Bit profile: Added possibility to invert value on read/write

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] fix typo with explanation of inverted

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] bit profile: unit tests for inverted parameter

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] spotless:apply

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] static checker fixes

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] write bit feature in data thing

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* wip

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] resolve itest

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] fixes

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Remove bit profile

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Fix data thing readStart validation

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] readme fix

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Remove bit profile test

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Invalidate REFRESH data cache with cacheful writes

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] cleanup

- abort if command is not convertible to 0/1 (previously wrote the
  cached data)
- fail fast conditionals instead of deep if's

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] README Fix typo in example

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] fix data thing write when child of endpoint

Also added regression test

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* Update bundles/org.openhab.binding.modbus/src/main/resources/OH-INF/config/gainOffset.xml

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>

* [modbus] performance-optimized logging

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] README: Removing xtend syntax hint, not needed anymore

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] generics typing added

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] dead code

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] avoid supressing generic type warnings

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] unnecessary generics

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] rename type parameter name

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] QU (short for quantity output) generic type instead of Q2

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] Remove unused localization

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] profile constant visibility harmonized

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

* [modbus] spotless:apply

Signed-off-by: Sami Salonen <ssalonen@gmail.com>

Co-authored-by: Fabian Wolter <github@fabian-wolter.de>
2021-04-16 22:59:55 +02:00

72 lines
3.2 KiB
Plaintext

-include: ../itest-common.bndrun
Bundle-SymbolicName: ${project.artifactId}
Fragment-Host: org.openhab.binding.modbus
-runrequires: \
bnd.identity;id='org.openhab.binding.modbus.tests',\
bnd.identity;id='org.openhab.core.binding.xml',\
bnd.identity;id='org.openhab.core.thing.xml'
# 1) We would like to use the "volatile" storage only, drop other storage
-runblacklist: \
bnd.identity;id='org.openhab.core.storage.json',\
bnd.identity;id='org.openhab.core.storage.mapdb'
#
# done
#
-runbundles: \
javax.measure.unit-api;version='[1.0.0,1.0.1)',\
org.eclipse.equinox.event;version='[1.4.300,1.4.301)',\
org.osgi.service.event;version='[1.4.0,1.4.1)',\
tec.uom.lib.uom-lib-common;version='[1.0.3,1.0.4)',\
tec.uom.se;version='[1.0.10,1.0.11)',\
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
nrjavaserial;version='[5.2.1,5.2.2)',\
org.hamcrest;version='[2.2.0,2.2.1)',\
org.opentest4j;version='[1.2.0,1.2.1)',\
com.sun.xml.bind.jaxb-osgi;version='[2.3.3,2.3.4)',\
jakarta.xml.bind-api;version='[2.3.3,2.3.4)',\
org.apache.servicemix.specs.activation-api-1.2.1;version='[1.2.1,1.2.2)',\
org.openhab.binding.modbus;version='[3.1.0,3.1.1)',\
org.openhab.binding.modbus.tests;version='[3.1.0,3.1.1)',\
org.openhab.core;version='[3.1.0,3.1.1)',\
org.openhab.core.binding.xml;version='[3.1.0,3.1.1)',\
org.openhab.core.config.core;version='[3.1.0,3.1.1)',\
org.openhab.core.config.discovery;version='[3.1.0,3.1.1)',\
org.openhab.core.config.xml;version='[3.1.0,3.1.1)',\
org.openhab.core.io.console;version='[3.1.0,3.1.1)',\
org.openhab.core.io.transport.modbus;version='[3.1.0,3.1.1)',\
org.openhab.core.test;version='[3.1.0,3.1.1)',\
org.openhab.core.thing;version='[3.1.0,3.1.1)',\
org.openhab.core.thing.xml;version='[3.1.0,3.1.1)',\
org.openhab.core.transform;version='[3.1.0,3.1.1)',\
xstream;version='[1.4.15,1.4.16)',\
junit-jupiter-api;version='[5.7.0,5.7.1)',\
junit-jupiter-engine;version='[5.7.0,5.7.1)',\
junit-platform-commons;version='[1.7.0,1.7.1)',\
junit-platform-engine;version='[1.7.0,1.7.1)',\
junit-platform-launcher;version='[1.7.0,1.7.1)',\
net.bytebuddy.byte-buddy;version='[1.10.19,1.10.20)',\
net.bytebuddy.byte-buddy-agent;version='[1.10.19,1.10.20)',\
org.mockito.mockito-core;version='[3.7.0,3.7.1)',\
org.objenesis;version='[3.1.0,3.1.1)',\
org.mockito.junit-jupiter;version='[3.7.0,3.7.1)',\
junit-jupiter-params;version='[5.7.0,5.7.1)',\
org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\
biz.aQute.tester.junit-platform;version='[5.3.0,5.3.1)',\
com.google.gson;version='[2.8.6,2.8.7)',\
org.apache.felix.configadmin;version='[1.9.20,1.9.21)',\
org.apache.felix.scr;version='[2.1.26,2.1.27)',\
org.eclipse.jetty.http;version='[9.4.38,9.4.39)',\
org.eclipse.jetty.io;version='[9.4.38,9.4.39)',\
org.eclipse.jetty.security;version='[9.4.38,9.4.39)',\
org.eclipse.jetty.server;version='[9.4.38,9.4.39)',\
org.eclipse.jetty.servlet;version='[9.4.38,9.4.39)',\
org.eclipse.jetty.util;version='[9.4.38,9.4.39)',\
org.eclipse.jetty.util.ajax;version='[9.4.38,9.4.39)',\
org.ops4j.pax.logging.pax-logging-api;version='[2.0.8,2.0.9)',\
org.osgi.util.function;version='[1.1.0,1.1.1)',\
org.osgi.util.promise;version='[1.1.1,1.1.2)'