You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "Matthias Milan Strljic (Jira)" <ji...@apache.org> on 2020/06/01 23:26:00 UTC

[jira] [Commented] (PLC4X-201) OPC-UA PlcList underlying type not compatible with Eclipse Milo

    [ https://issues.apache.org/jira/browse/PLC4X-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17121399#comment-17121399 ] 

Matthias Milan Strljic commented on PLC4X-201:
----------------------------------------------

Nice one. I like the two suggestions. First i would go with your first quick fix and then bring up the topic with the enriched list types as a more generell topic in the apache list. Because it would not just effect the OPC driver. On your first fix i would just add a null-check or an assertion.

> OPC-UA PlcList underlying type not compatible with Eclipse Milo
> ---------------------------------------------------------------
>
>                 Key: PLC4X-201
>                 URL: https://issues.apache.org/jira/browse/PLC4X-201
>             Project: Apache PLC4X
>          Issue Type: Bug
>          Components: Driver-OPC-UA
>    Affects Versions: 0.7.0
>            Reporter: Alessandro Rossignoli
>            Priority: Major
>              Labels: beginner
>
> java.util.Collections$UnmodifiableRandomAccessList is not compatible with Eclipse Milo built-in types.
> When writing to the OPC-UA driver a simple array of Double, I receive the following error:
> [org.eclipse.milo.opcua.stack.core.serialization.OpcUaBinaryStreamEncoder:608]: Not a built-in type: class java.util.Collections$UnmodifiableRandomAccessList
> When writing a single value in the array the type is PlcDouble instead of PlcList, and there is no error.
>  
> I think that a possible solution could be changing the underlying type, or better to change the getter for the value.
> [https://github.com/apache/plc4x/blob/4a74ff526aeb57e978005e37c878fe55021462aa/plc4j/api/src/main/java/org/apache/plc4x/java/api/value/PlcList.java#L46]
> I will try to find myself a solution and I will keep you posted.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)