You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2018/01/23 17:45:13 UTC
[incubator-plc4x] branch master updated (c88271a -> f8fa7dc)
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git.
from c88271a - Try to merge the github changes
add 2bae256 cleanup Eclipse m2e plugin warnings
add 9ffbaff cleanup missing serialVersionUID values
add e5ee3aa cleanup unused imports
add cde4479 cleanup Resource Leak
add 5a10d2e cleanup: invoke static methods in a static way
add ad51b46 remove dup maven-scm-publish-plugin version decl
add 48ce110 cleanup: Version is duplicate of parent version
add 673aaa0 cleanup: remove unnecessary "unchecked" suppression in edgent connector
add 531766c Merge pull request #1 from dlaboss/warning-cleanup
new f8fa7dc - Merge changes from GitHub hopefully turning on the sync again
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
applications/iotree/pom.xml | 2 --
applications/plclogger/pom.xml | 2 --
applications/pom.xml | 1 -
integrations/apache-brooklyn/pom.xml | 1 -
integrations/apache-camel/pom.xml | 2 --
integrations/apache-edgent/pom.xml | 2 --
.../apache/plc4x/edgent/mock/MockConnection.java | 1 -
integrations/apache-mynewt/pom.xml | 1 -
integrations/pom.xml | 1 -
plc4c/pom.xml | 1 -
plc4j/api/pom.xml | 2 --
.../api/exceptions/PlcConnectionException.java | 1 +
.../plc4x/java/api/exceptions/PlcException.java | 1 +
.../plc4x/java/api/exceptions/PlcIoException.java | 1 +
.../java/api/exceptions/PlcProtocolException.java | 1 +
plc4j/core/pom.xml | 2 --
plc4j/pom.xml | 1 -
plc4j/protocols/pom.xml | 1 -
plc4j/protocols/s7-utils/pom.xml | 2 --
plc4j/protocols/s7/pom.xml | 2 --
.../java/s7/netty/model/types/S7TypeTests.java | 8 +++---
plc4j/protocols/utils/pom.xml | 2 --
plc4s/pom.xml | 1 -
pom.xml | 31 +++++++++++++++++++++-
24 files changed, 38 insertions(+), 32 deletions(-)
--
To stop receiving notification emails like this one, please contact
cdutz@apache.org.
[incubator-plc4x] 01/01: - Merge changes from GitHub hopefully
turning on the sync again
Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
commit f8fa7dc6bd3f3b991dea6b873c51fb3d66de9a2f
Merge: c88271a 531766c
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Jan 23 18:45:01 2018 +0100
- Merge changes from GitHub hopefully turning on the sync again
applications/iotree/pom.xml | 2 --
applications/plclogger/pom.xml | 2 --
applications/pom.xml | 1 -
integrations/apache-brooklyn/pom.xml | 1 -
integrations/apache-camel/pom.xml | 2 --
integrations/apache-edgent/pom.xml | 2 --
.../apache/plc4x/edgent/mock/MockConnection.java | 1 -
integrations/apache-mynewt/pom.xml | 1 -
integrations/pom.xml | 1 -
plc4c/pom.xml | 1 -
plc4j/api/pom.xml | 2 --
.../api/exceptions/PlcConnectionException.java | 1 +
.../plc4x/java/api/exceptions/PlcException.java | 1 +
.../plc4x/java/api/exceptions/PlcIoException.java | 1 +
.../java/api/exceptions/PlcProtocolException.java | 1 +
plc4j/core/pom.xml | 2 --
plc4j/pom.xml | 1 -
plc4j/protocols/pom.xml | 1 -
plc4j/protocols/s7-utils/pom.xml | 2 --
plc4j/protocols/s7/pom.xml | 2 --
.../java/s7/netty/model/types/S7TypeTests.java | 8 +++---
plc4j/protocols/utils/pom.xml | 2 --
plc4s/pom.xml | 1 -
pom.xml | 31 +++++++++++++++++++++-
24 files changed, 38 insertions(+), 32 deletions(-)
diff --cc integrations/apache-edgent/src/test/java/org/apache/plc4x/edgent/mock/MockConnection.java
index 78bb6b1,c1e0aac..81121ac
--- a/integrations/apache-edgent/src/test/java/org/apache/plc4x/edgent/mock/MockConnection.java
+++ b/integrations/apache-edgent/src/test/java/org/apache/plc4x/edgent/mock/MockConnection.java
@@@ -84,58 -80,45 +84,57 @@@ public class MockConnection extends Abs
@Override
public Address parseAddress(String addressString) throws PlcException {
- return new MockAddress(addressString);
+ return new MockAddress(addressString);
}
- @SuppressWarnings("unchecked")
@Override
public CompletableFuture<PlcReadResponse> read(PlcReadRequest readRequest) {
- curReadCnt++;
- if (readExceptionTriggerCount > 0 && curReadCnt == readExceptionTriggerCount) {
- curReadCnt = 0;
- CompletableFuture<PlcReadResponse> cf = new CompletableFuture<>();
- cf.completeExceptionally(new PlcIoException(readExceptionMsg));
- return cf;
- }
- List<ReadResponseItem> responseItems = new LinkedList<>();
- for (ReadRequestItem requestItem : readRequest.getReadRequestItems()) {
- ReadResponseItem responseItem = new ReadResponseItem(requestItem, ResponseCode.OK,
- Collections.singletonList(getDataValue(requestItem.getAddress())));
- responseItems.add(responseItem);
- }
- PlcReadResponse response = new PlcReadResponse(readRequest, responseItems);
- return CompletableFuture.completedFuture(response);
+ curReadCnt++;
+ if (readExceptionTriggerCount > 0 && curReadCnt == readExceptionTriggerCount) {
+ curReadCnt = 0;
+ CompletableFuture<PlcReadResponse> cf = new CompletableFuture<>();
+ cf.completeExceptionally(new PlcIoException(readExceptionMsg));
+ return cf;
+ }
+ List<ReadResponseItem<?>> responseItems = new LinkedList<>();
+ for (ReadRequestItem requestItem : readRequest.getRequestItems()) {
+ ReadResponseItem responseItem = new ReadResponseItem(requestItem, ResponseCode.OK,
+ Collections.singletonList(getDataValue(requestItem.getAddress())));
+ responseItems.add(responseItem);
+ }
+ PlcReadResponse response;
+ if (readRequest instanceof TypeSafePlcReadRequest) {
+ response = new TypeSafePlcReadResponse((TypeSafePlcReadRequest) readRequest, responseItems.isEmpty() ? null : responseItems.get(0));
+ } else {
+ response = new PlcReadResponse(readRequest, responseItems);
+ }
+ return CompletableFuture.completedFuture(response);
}
+ @SuppressWarnings("unchecked")
@Override
public CompletableFuture<PlcWriteResponse> write(PlcWriteRequest writeRequest) {
- curWriteCnt++;
- if (writeExceptionTriggerCount > 0 && curWriteCnt == writeExceptionTriggerCount) {
- curWriteCnt = 0;
- CompletableFuture<PlcWriteResponse> cf = new CompletableFuture<>();
- cf.completeExceptionally(new PlcIoException(writeExceptionMsg));
- return cf;
- }
- List<WriteResponseItem> responseItems = new LinkedList<>();
+ curWriteCnt++;
+ if (writeExceptionTriggerCount > 0 && curWriteCnt == writeExceptionTriggerCount) {
+ curWriteCnt = 0;
+ CompletableFuture<PlcWriteResponse> cf = new CompletableFuture<>();
+ cf.completeExceptionally(new PlcIoException(writeExceptionMsg));
+ return cf;
+ }
+ List<WriteResponseItem<?>> responseItems = new LinkedList<>();
for (WriteRequestItem requestItem : writeRequest.getRequestItems()) {
setDataValue(requestItem.getAddress(), requestItem.getValues());
- WriteResponseItem responseItem = new WriteResponseItem(requestItem, ResponseCode.OK);
- responseItems.add(responseItem);
+ WriteResponseItem<?> responseItem = new WriteResponseItem<>(requestItem, ResponseCode.OK);
+ responseItems.add(responseItem);
}
- PlcWriteResponse response = new PlcWriteResponse(writeRequest, responseItems);
- return CompletableFuture.completedFuture(response);
+ PlcWriteResponse response;
+ if (writeRequest instanceof TypeSafePlcWriteRequest) {
+ response = new TypeSafePlcWriteResponse((TypeSafePlcWriteRequest) writeRequest, responseItems.isEmpty() ? null : responseItems.get(0));
+ } else {
+ response = new PlcWriteResponse(writeRequest, responseItems);
+ }
+
+ return CompletableFuture.completedFuture(response);
}
public void setDataValue(Address address, Object o) {
--
To stop receiving notification emails like this one, please contact
cdutz@apache.org.