Xiangdong Huang created PLC4X-146:
-------------------------------------
Summary: Problem when using examples/hello-integration-edgent with
plc-simulator
Key: PLC4X-146
URL: https://issues.apache.org/jira/browse/PLC4X-146
Project: Apache PLC4X
Issue Type: Bug
Components: Integration-Edgent
Affects Versions: 0.6.0
Reporter: Xiangdong Huang
Hi, I am trying to use PLC4x (PLC4J actually) and find some errors:
# When I used `HelloPlc4x`, the clioption was: --connection-string
test://127.0.0.1 --field-addresses RANDOM/foo:BYTE
OK it works!
2. Then I tried
org.apache.plc4x.java.examples.integration.edgent.PlcLogger, and the cliOption
was: --connection-string test://127.0.0.1 --field-address RANDOM/foo:BYTE
--polling-interval 1000, then error occurs:
11:14:25.568 [pool-1-thread-1-489175fe-87ea-41a2-87c2-35b62b8ac594] ERROR
o.a.p.edgent.PlcConnectionAdapter - reading from plc device test://127.0.0.1
null failed11:14:25.568 [pool-1-thread-1-489175fe-87ea-41a2-87c2-35b62b8ac594]
ERROR o.a.p.edgent.PlcConnectionAdapter - reading from plc device
test://127.0.0.1 null
failedorg.apache.plc4x.java.api.exceptions.PlcIncompatibleDatatypeException:
Incompatible Datatype java.lang.Byte at index 0 at
org.apache.plc4x.java.base.messages.items.BaseDefaultFieldItem.getByte(BaseDefaultFieldItem.java:59)
at
org.apache.plc4x.java.base.messages.DefaultPlcReadResponse.getByte(DefaultPlcReadResponse.java:158)
at
org.apache.plc4x.java.base.messages.DefaultPlcReadResponse.getByte(DefaultPlcReadResponse.java:152)
at
org.apache.plc4x.edgent.PlcConnectionAdapter$MySupplier.get(PlcConnectionAdapter.java:175)
at
org.apache.edgent.function.Functions$ThreadSafeSupplier.get(Functions.java:165)
at
org.apache.edgent.oplet.functional.SupplierPeriodicSource.fetchTuples(SupplierPeriodicSource.java:50)
at org.apache.edgent.oplet.core.PeriodicSource.run(PeriodicSource.java:81) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at
org.apache.edgent.runtime.etiao.TrackingScheduledExecutor$TrackedFuture.run(TrackingScheduledExecutor.java:226)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at
org.apache.edgent.runtime.etiao.ThreadFactoryTracker$2.run(ThreadFactoryTracker.java:87)
at java.lang.Thread.run(Thread.java:748)
I tried some other data type like INTEGER, and got the same error.
Is there something wrong?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)