chrisdutz commented on a change in pull request #14: WIP: Api Refactoring
URL: https://github.com/apache/incubator-plc4x/pull/14#discussion_r215170519
 
 

 ##########
 File path: 
plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcReadResponse.java
 ##########
 @@ -18,40 +18,81 @@ Licensed to the Apache Software Foundation (ASF) under one
 */
 package org.apache.plc4x.java.api.messages;
 
-import org.apache.plc4x.java.api.messages.items.ReadRequestItem;
-import org.apache.plc4x.java.api.messages.items.ReadResponseItem;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Optional;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.util.Collection;
 
 /**
  * Response to a {@link PlcReadRequest}.
- * Contains the values read from the PLC but untyped.
- * <p>
- * Values are extracted using the {@link ReadRequestItem}s that were send in 
the read request.
- * <p>
- * If only a variables of one type are requested it is better to use
- * {@link org.apache.plc4x.java.api.messages.specific.TypeSafePlcReadRequest} 
which leads to a
- * {@link org.apache.plc4x.java.api.messages.specific.TypeSafePlcReadResponse}.
  */
-public class PlcReadResponse extends PlcResponse<PlcReadRequest, 
ReadResponseItem<?>, ReadRequestItem<?>> {
+public interface PlcReadResponse extends PlcFieldResponse<PlcReadRequest> {
+
+    int getNumValues(String name);
+
+    boolean isRaw(String name);
 
 Review comment:
   Because that way we could also use "get(Hurz.class, "hurz")" and stuff like 
that ... people could start using all sorts of types and sub-types. As soon as 
I am done with the payload processing, I think you will see how complex this 
is. As I already mentioned to Julian, I am fine with adding a generic is, get 
and getAll method, but would like this to be check against the fixed types and 
to simply act as proxy to calling isXYZ, getXYZ and getAllXYZ.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to