Hi everyone,
I have two questions regarding the PLC4J OPC UA driver. I am connecting to the 
Eclipse Milo Server using the standard syntax as described 
here<https://plc4x.apache.org/users/protocols/opc-ua.html>.

  1.  I'm not able to read arrays (or their elements). All other data types 
work fine, but I don't understand how to add array fields as items to the 
readRequestBuilder. I'm either (obviously) getting a ClassCastException when 
I'm trying .additem(.../BooleanArray) or an PlcInvalidFieldException when 
trying to access a field of the array like addItem(...BooleanArray[0]).

The response.getObject(fieldName) call mentioned under the "Getting 
Started<https://plc4x.apache.org/users/plc4j/gettingstarted.html>" section on 
the website is not helping, because compilation already fails before getting 
the response.

If the reading of arrays is already implemented, could you please point me in 
the right direction here?



  1.  Likewise, I'm not able to write all data types. Apart from unsigned 
types, I'm having problems with Array, CustomStructTypeVariable, 
CustomUnionTypeVariable, AnalogValue, Object, Byte, ByteString, DateTime, Guid, 
QualifiedName, SByte, UtcTime, Variant and XmlElement.

I'm either getting an AccessDenied-error, probably because I'm trying to write 
the wrong data type to a field (which is especially strange for Byte), or a 
"java.lang.IllegalArgumentException: no field handler for class ... found" 
exception.

I could provide my code if needed, but as I'm generally following the suggested 
path for writing a writeRequest/Response, and it is working fine for simpler 
file types, I'd like to know whether these other types are already supported by 
the PLC4J library or not.
Lastly, if these features are not implemented in PLC4J, are there any plans to 
do so in the future, or would you recommend using Eclipse Milo to a wider 
extent, even if that meant neglecting the PLC4X-API in part? If it is the 
former and it would be appreciated, we could imagine helping you in your 
efforts.
Thanks for your time!
Best regards
Gregor Minuge

Reply via email to