You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/01/04 16:26:40 UTC

[incubator-plc4x] 01/01: added unchecked variants of plc requests.

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch refactoring/java_generify
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit 71fecb8a22d9a1d7e2d3e695813b0885ae9c817a
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Jan 4 17:25:46 2018 +0100

    added unchecked variants of plc requests.
---
 .../java/api/messages/UncheckedPlcReadRequest.java | 48 ++++++++++++++++++++++
 .../api/messages/UncheckedPlcWriteRequest.java     | 48 ++++++++++++++++++++++
 2 files changed, 96 insertions(+)

diff --git a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/UncheckedPlcReadRequest.java b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/UncheckedPlcReadRequest.java
new file mode 100644
index 0000000..a60995f
--- /dev/null
+++ b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/UncheckedPlcReadRequest.java
@@ -0,0 +1,48 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.api.messages;
+
+import org.apache.plc4x.java.api.messages.items.ReadRequestItem;
+import org.apache.plc4x.java.api.model.Address;
+
+import java.util.List;
+
+@SuppressWarnings("unchecked")
+public class UncheckedPlcReadRequest extends PlcReadRequest<Object> {
+
+    public UncheckedPlcReadRequest() {
+    }
+
+    public UncheckedPlcReadRequest(Class dataType, Address address) {
+        super(dataType, address);
+    }
+
+    public UncheckedPlcReadRequest(Class dataType, Address address, int size) {
+        super(dataType, address, size);
+    }
+
+    public UncheckedPlcReadRequest(List list) {
+        super(list);
+    }
+
+    @Override
+    public void addItem(ReadRequestItem readRequestItem) {
+        super.addItem(readRequestItem);
+    }
+}
diff --git a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/UncheckedPlcWriteRequest.java b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/UncheckedPlcWriteRequest.java
new file mode 100644
index 0000000..83ac035
--- /dev/null
+++ b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/UncheckedPlcWriteRequest.java
@@ -0,0 +1,48 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+package org.apache.plc4x.java.api.messages;
+
+import org.apache.plc4x.java.api.messages.items.WriteRequestItem;
+import org.apache.plc4x.java.api.model.Address;
+
+import java.util.List;
+
+@SuppressWarnings("unchecked")
+public class UncheckedPlcWriteRequest extends PlcWriteRequest<Object> {
+
+    public UncheckedPlcWriteRequest() {
+    }
+
+    public UncheckedPlcWriteRequest(Class<Object> dataType, Address address, Object value) {
+        super(dataType, address, value);
+    }
+
+    public UncheckedPlcWriteRequest(Class<Object> dataType, Address address, Object[] values) {
+        super(dataType, address, values);
+    }
+
+    public UncheckedPlcWriteRequest(List<WriteRequestItem<Object>> writeRequestItems) {
+        super(writeRequestItems);
+    }
+
+    @Override
+    public void addItem(WriteRequestItem requestItem) {
+        super.addItem(requestItem);
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
"commits@plc4x.apache.org" <co...@plc4x.apache.org>.