opc ua client implementation using eclipse milo

0

I am trying to do the implementation of opc ua client using eclipse milo sdk and the reference link am using is:

https://community.hortonworks.com/questions/176894/opc-ua-client-performance-with-eclipse-milo.html

for the Publish/Subscribe code since am having multiple nodes am not able to make out the data that I get corresponds to which node id and also the timestamp I am getting am not able to make out its in which format.

Item: org.eclipse.milo.opcua.sdk.client.subscriptions.OpcUaMonitoredItem@2b2c39b1
Value: DataValue{value=Variant{value=11}, status=StatusCode{name=Good, value=0x00000000, quality=good}, 
sourceTime=DateTime{utcTime=131771575305048867, javaDate=Fri Jul 27 15:02:10 IST 2018},
serverTime=DateTime{utcTime=131771575305048867, javaDate=Fri Jul 27 15:02:10 IST 2018}}

and when am using Async Read code am not getting timestamp.

[DataValue{value=Variant{value=3}, 
status=StatusCode{name=Good, value=0x00000000, quality=good}, sourceTime=DateTime{utcTime=0, javaDate=Mon Jan 01 05:30:00 IST 1601}, serverTime=DateTime{utcTime=0, javaDate=Mon Jan 01 05:30:00 IST 1601}}, 

DataValue{value=Variant{value=11}, status=StatusCode{name=Good, value=0x00000000, quality=good}, sourceTime=DateTime{utcTime=0, javaDate=Mon Jan 01 05:30:00 IST 1601}, 
serverTime=DateTime{utcTime=0, javaDate=Mon Jan 01 05:30:00 IST 1601}}, 

DataValue{value=Variant{value=8}, status=StatusCode{name=Good, value=0x00000000, quality=good}, 
sourceTime=DateTime{utcTime=0, javaDate=Mon Jan 01 05:30:00 IST 1601}, serverTime=DateTime{utcTime=0, javaDate=Mon Jan 01 05:30:00 IST 1601}}]

can anyone give me some idea on where am going wrong?

java
opc-ua
milo
asked on Stack Overflow Jul 27, 2018 by sanil mendonca • edited Dec 19, 2018 by Ahmed Ashour

1 Answer

1

It might be easier to understand if you started with the examples from Milo itself, rather than a random benchmark someone wrote using Milo that you happened to stumble across.

Check out the examples:

Subscribe Example

Read Example

answered on Stack Overflow Jul 27, 2018 by Kevin Herron

User contributions licensed under CC BY-SA 3.0