[GitHub] [plc4x] modraedlau opened a new issue, #568: (plc4j opcua driver) Unable to read when node id contains unicode characters

2022-11-02 Thread GitBox


modraedlau opened a new issue, #568:
URL: https://github.com/apache/plc4x/issues/568

   Unable to read when node id contains unicode characters. 
   For example: 
   The nodeid is `ns=2;s=设备1`, the read result will be `NOT_FOUND`.
   
   Look at the generated class 
`org.apache.plc4x.java.opcua.readwrite.PascalString`, the `getStringLength` 
equals to string length, should this be equal to `getBytes().length`?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] hutcheb commented on issue #568: (plc4j opcua driver) Unable to read when node id contains unicode characters

2022-11-02 Thread GitBox


hutcheb commented on issue #568:
URL: https://github.com/apache/plc4x/issues/568#issuecomment-1301592493

   Thanks modraediau, You are right, the OPCUA standard doesn't seem to define 
the format of the Node Id string Identifier.
   
   It would be great if you could create a PR for this. The PascalString class 
is defined in the mspec/xslt file here 
https://github.com/apache/plc4x/blob/develop/protocols/opcua/src/main/xslt/opc-manual.xsl
   
   If you have any issues, or need some help let us know.
   
   If you aren't in a position to create a PR, I'd be more than happy to test 
the change in the next few days.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] splatch commented on issue #568: (plc4j opcua driver) Unable to read when node id contains unicode characters

2022-11-03 Thread GitBox


splatch commented on issue #568:
URL: https://github.com/apache/plc4x/issues/568#issuecomment-1302151843

   @modraedlau It might be related to utf-8 vs utf-16. What's your platform jvm 
setting in this regard?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #580: ADS Big-Endian Support

2022-11-09 Thread GitBox


ottlukas opened a new issue, #580:
URL: https://github.com/apache/plc4x/issues/580

   For some reason the response of the PLC seems not to be in *LITTLE_ENDIAN* 
format.
   Therefore, the Byte to Integer conversion in [1] results in a negative 
number.
    
   The issue occurs during the *symbolHandle* creation process in [2].
    
   I had a look at the ADS specification [3] and the response should be in 
*LITTLE_ENDIAN* format, but for some reason it is not.
    
   As suggested by [~cdutz] we should create an option to override the 
endianness in the connection-string.
    
   [1] 
[https://github.com/apache/plc4x/blob/develop/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java#L39](https://github.com/apache/plc4x/blob/develop/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java#L39)
   [2] 
[https://github.com/apache/plc4x/blob/develop/plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsAbstractPlcConnection.java#L187](https://github.com/apache/plc4x/blob/develop/plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsAbstractPlcConnection.java#L187)
   [3] 
[https://infosys.beckhoff.com/index.php?content=../content/1031/tcplclibutilities/html/TcPlcLibUtilities_AddOn_ByteOrder.htm&id=](https://infosys.beckhoff.com/index.php?content=../content/1031/tcplclibutilities/html/TcPlcLibUtilities_AddOn_ByteOrder.htm&id=)
    
   
   Imported from Jira 
[PLC4X-133](https://issues.apache.org/jira/browse/PLC4X-133). Original Jira may 
contain additional context.
   Reported by: millecker.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #582: Substitution of returning null-Values by throwing e.g. UnsupportedOperationException

2022-11-09 Thread GitBox


ottlukas opened a new issue, #582:
URL: https://github.com/apache/plc4x/issues/582

   abstract FieldItem class holds non abstract methods that return null values 
- this might cause strange behavior if some of the subClasses have not 
overridden those methods.
   
   It may be more intuitive that instead of returning null-values an exception 
is thrown to make clear that operation fails due to a specific reason 
   
   Imported from Jira 
[PLC4X-63](https://issues.apache.org/jira/browse/PLC4X-63). Original Jira may 
contain additional context.
   Reported by: timbo2k.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #583: Create a set of connection-tests that potentially could lead to crash or leak

2022-11-09 Thread GitBox


ottlukas opened a new issue, #583:
URL: https://github.com/apache/plc4x/issues/583

   set of connection-tests to
* different drivers
* different conditions (not available, avab then not avab, firewall issues)
* heavy load
* ...
   
   Imported from Jira 
[PLC4X-140](https://issues.apache.org/jira/browse/PLC4X-140). Original Jira may 
contain additional context.
   Reported by: timbo2k.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #581: Implement the Profinet Protocol

2022-11-09 Thread GitBox


ottlukas opened a new issue, #581:
URL: https://github.com/apache/plc4x/issues/581

   In contrast to the already implemented S7 communication, the Profinet 
Protocol is a different Protocol with different feature set. In order to 
implement a Profinet driver it is required to become Member of the Profinet 
Consortium. This membership is ties with an annual membership fee. The ASF 
could become a member. The problem with this is however that the ASF doesn't 
become  member in things that cost the ASF money. I have discussed this issue 
with the CEO of Profinet Europe and there might be an option for the ASF to 
become a member and someone else paying the bill. Only members seem to be 
allowed to advertise with the Profinet Logo and call their products Profinet 
Compatible.
   
   Imported from Jira [PLC4X-8](https://issues.apache.org/jira/browse/PLC4X-8). 
Original Jira may contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #584: Add Async API for new Connections

2022-11-09 Thread GitBox


ottlukas opened a new issue, #584:
URL: https://github.com/apache/plc4x/issues/584

   Currently we only support an async API for Requests.
   But as creating a new Connection is sometimes even slower it would be good 
to provide an additional asyc API which returns a Future and 
leaves it to the Client to handle asynchronity.
   
   Imported from Jira 
[PLC4X-136](https://issues.apache.org/jira/browse/PLC4X-136). Original Jira may 
contain additional context.
   Reported by: julian.feinauer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #585: Add minimal idiomatic Scala API

2022-11-09 Thread GitBox


ottlukas opened a new issue, #585:
URL: https://github.com/apache/plc4x/issues/585

   We want to implement an idiomatic Scala API:
   
   - no use of Java std library types
   - no use of PLC4X Java API types
   - no use of exceptions, instead of that use of Either
   - no use of Java futures, instead use of scala future
   
   Imported from Jira 
[PLC4X-12](https://issues.apache.org/jira/browse/PLC4X-12). Original Jira may 
contain additional context.
   Reported by: britter.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #586: [S7] Communication to S7 PLC dies in some situations

2022-11-09 Thread GitBox


ottlukas opened a new issue, #586:
URL: https://github.com/apache/plc4x/issues/586

   The following is from the Mailing Thread [1]:
   
   In the last weeks we observed multiple times strange behavior when 
connecting to Siemens S7 devices.
   We have not yet been able to trace it down entirely but I have the 
assumption that it is an issue with the PooledPlcDriverManager.
   
   Whats the issue?
   When doing requests (either via OPM or the “regular” API) we come at a point 
where all subsequent requests simply fail (and in some cases we were no longer 
able to send requests to the PLC from other instances, so it looks like the 
internal server went down).
   
   Whats the setup?
   When I remember correctly, all situations where this occurred used the Pool 
as Basis.
   We had it both with OPM and the normal API but NOT with the Scraper.
   
   I remember that I spent like a hole day at the Hackathon in Mallorca to get 
all timeout things to work correctly, as the S7 does not like when you simply 
cancel your request futures.
   Currently there are two “suspects” from my side.
   
   First, the pool calls the “.connect()” method on a now Connection it 
establishes but by API convention you also have to do that in your code so it 
gets called multiple times, which could fuck up stuff.
   Second, connection can also time out (but its no future in our API) so in 
the Scraper I implemented it as Future with timeout (as I’m unsure how 
everything behaes if the pool starts to initialize a connection but then the 
“waitTime” times out and it abandons this).
   
   [1] 
https://lists.apache.org/thread.html/328a6780b34b4fd2e3298e9e70340293ebb397b1978a7b631030067e@%3Cdev.plc4x.apache.org%3E
   
   Imported from Jira 
[PLC4X-132](https://issues.apache.org/jira/browse/PLC4X-132). Original Jira may 
contain additional context.
   Reported by: julian.feinauer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #588: Reading LREAL from S7 causes PlcRuntimeException

2022-11-09 Thread GitBox


ottlukas opened a new issue, #588:
URL: https://github.com/apache/plc4x/issues/588

   Reading an LREAL in my demo project 
https://github.com/sewiendl/plc4j-demo/tree/feature/read-lreal causes the 
following exception:```
   org.apache.plc4x.java.api.exceptions.PlcRuntimeException: Field 'LReal' 
could not be fetched, response
   was INVALID_DATATYPE
at 
org.apache.plc4x.java.base.messages.DefaultPlcReadResponse.getFieldInternal(DefaultPlcReadResponse.java:577)
at
   
org.apache.plc4x.java.base.messages.DefaultPlcReadResponse.getObject(DefaultPlcReadResponse.java:81)
at
   com.example.plc4jdemo.Main.main(Main.java:39)
   ```
   The field was added with ```
   builder.addItem("LReal", "%DB101.DBX110:LREAL");
   ```
   
   
   Imported from Jira 
[PLC4X-154](https://issues.apache.org/jira/browse/PLC4X-154). Original Jira may 
contain additional context.
   Reported by: swiendl.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #587: The connection pool should respect the entire URL

2022-11-09 Thread GitBox


ottlukas opened a new issue, #587:
URL: https://github.com/apache/plc4x/issues/587

   Currently the Connection pool only seems to work on the connection string 
but ignoring the parameters. As the parameters might contain important 
information (Rack & Slot for S7 or other things like the location of the 
KNXProj File for KNX or EDE File locations for BACnet) it should treat the 
entire connection string as pool key. 
   
   Imported from Jira 
[PLC4X-170](https://issues.apache.org/jira/browse/PLC4X-170). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #590: The RequestTransactionManagerTest.abortTransactionFromExternally seems to be a little flaky

2022-11-09 Thread GitBox


ottlukas opened a new issue, #590:
URL: https://github.com/apache/plc4x/issues/590

   The build on jenkins randomly seems to fail because of this test:
   
   RequestTransactionManagerTest.abortTransactionFromExternally
   ### Stacktrace
   
   java.lang.AssertionError at 
org.apache.plc4x.java.spi.optimizer.RequestTransactionManagerTest.abortTransactionFromExternally(RequestTransactionManagerTest.java:153)
   
    
   
   Imported from Jira 
[PLC4X-171](https://issues.apache.org/jira/browse/PLC4X-171). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #589: Exception on S7 disconnect

2022-11-09 Thread GitBox


ottlukas opened a new issue, #589:
URL: https://github.com/apache/plc4x/issues/589

   My PLC4J demo project at https://github.com/sewiendl/plc4j-demo yields the 
following output after/during disconnecting from the PLC:```
   all requests took PT2M6.261S
   
   Nov 14, 2019 10:05:13 AM io.netty.channel.DefaultChannelPipeline 
onUnhandledInboundException
   WARNUNG:
   An exceptionCaught() event was fired, and it reached at the tail of the 
pipeline. It usually means the
   last handler in the pipeline did not handle the exception.
   java.io.IOException: Eine vorhandene Verbindung
   wurde vom Remotehost geschlossen
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at
   sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at
   sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at 
io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
at
   io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1125)
at 
io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
at
   
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
at
   io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:682)
at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:617)
at
   io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:534)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at
   
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906)
at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at
   
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
   
   disconnected
   ```
   This bug report relates to my questions on the mailing list. I will also try 
to hand in a wireshark dump later.
   
   Imported from Jira 
[PLC4X-153](https://issues.apache.org/jira/browse/PLC4X-153). Original Jira may 
contain additional context.
   Reported by: swiendl.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #591: Request split / Message Split

2022-11-09 Thread GitBox


ottlukas opened a new issue, #591:
URL: https://github.com/apache/plc4x/issues/591

   - A request with many Items is divided within the limits allowed by the size 
of the PDU.
- If one of the requested Items exceeds the size of the PDU it is trimmed 
to the maximum size of the PDU. The existing code tries to split the message, 
but it fails. This generates an unsafe condition.
   
- Rethink the routine for handling long messages, as an additional layer in 
Netty.
   
   Imported from Jira 
[PLC4X-182](https://issues.apache.org/jira/browse/PLC4X-182). Original Jira may 
contain additional context.
   Reported by: cgarcia.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #592: Subscription to Items

2022-11-09 Thread GitBox


ottlukas opened a new issue, #592:
URL: https://github.com/apache/plc4x/issues/592

   This version implements the subscription to PLC Items under the philosophy 
"Don't call me, I'll call you".
The requested items are sent periodically by the PLC to the driver. The 
driver collects the data and sends it to the client.
This solution is ideal for systems that need rapid data updating and low 
resource consumption.
   
   Currently only S7-300 and S7-400.
   S7-1500 the next revision.
   
   Imported from Jira 
[PLC4X-184](https://issues.apache.org/jira/browse/PLC4X-184). Original Jira may 
contain additional context.
   Reported by: cgarcia.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #593: Apache NiFi integration should allow Expression Language

2022-11-09 Thread GitBox


ottlukas opened a new issue, #593:
URL: https://github.com/apache/plc4x/issues/593

   Apache NiFi integration should allow us to use Expression Language for PLC 
connection string and PLC resource address string.
   
   We sometimes need to get data from 100 different addresses. Current 
processors doesn't allow us to create those strings on the fly. So we need to 
enter them manually or we need utilize NiFi API to create flows automatically. 
   
   If those parameters allows us to use expression language, we can read a list 
from csv file or from database and then we can read them in a loop in Apache 
NiFi.  
   
   So it will be very handy feature to dynamically specify the connection 
string and the address string.
   
   For starting point PutFile processor can be examined. This processor 
utilizes expression language for it's "Directory" parameter.
   
   
[https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFile.java](https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutFile.java)
   
   Notable Lines:
   
   import org.apache.nifi.expression.ExpressionLanguageScope;
   
   ...
   
   Define the parameter as expression language supported.
   
   public static final PropertyDescriptor DIRECTORY = new 
PropertyDescriptor.Builder()
.name("Directory")
.description("The directory to which files should be written. You may use 
expression language such as /aa/bb/${path}")
.required(true)
.addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
*.expressionLanguageSupported(ExpressionLanguageScope.FLOWFILE_ATTRIBUTES)*
.build();
   
   ...
   
   And then script can be evaluated in the onTrigger event like
   
   
context.getProperty(DIRECTORY).evaluateAttributeExpressions(flowFile).getValue()
   
   Imported from Jira 
[PLC4X-196](https://issues.apache.org/jira/browse/PLC4X-196). Original Jira may 
contain additional context.
   Reported by: turker.tunali.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #594: Subscription to system events.

2022-11-09 Thread GitBox


ottlukas opened a new issue, #594:
URL: https://github.com/apache/plc4x/issues/594

   * This version allows the subscription to the following types of events:
   MODE: Report status of PLC.
   SYS: Report system events.
   USR: Report user events.
   ALM_S: Report ALARM_SQ,ALARM_S,ALARM_SC,ALARM_DQ,ALARM_D.
   ALM_8: Report NOTIFY_8P, ALARM,ALARM_8P, NOTIFY
   
* The ALM_S events are generated by the S7-300. The S7-400 PLCs support 
ALM_S and ALM_8.
* S7-1200 PLCs do not have a message system.
* It does not support messages for S7-1500. Next review.
   
   Imported from Jira 
[PLC4X-183](https://issues.apache.org/jira/browse/PLC4X-183). Original Jira may 
contain additional context.
   Reported by: cgarcia.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #595: OPC UA Driver should support client certificates

2022-11-09 Thread GitBox


ottlukas opened a new issue, #595:
URL: https://github.com/apache/plc4x/issues/595

   For an application we need to support Cert based Security in the OPC UA 
Driver.
   
   Imported from Jira 
[PLC4X-185](https://issues.apache.org/jira/browse/PLC4X-185). Original Jira may 
contain additional context.
   Reported by: jfeinauer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #597: Incorrect shutdown sequence on error

2022-11-09 Thread GitBox


ottlukas opened a new issue, #597:
URL: https://github.com/apache/plc4x/issues/597

   
   In the testcase below, there is a permission problem and I think because of 
that the closing of channel and buffers are out of order/state.
   
   
   [code]
   11:59:51.855 [pool-1-thread-1] WARN  i.n.c.AbstractChannelHandlerContext - 
Failed to mark a promise as failure because it has succeeded already: 
DefaultChannelPromise@63ab80ee(success)
   java.lang.IllegalStateException: close() must be invoked after the channel 
is closed.
   at 
io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:683)
   at 
io.netty.channel.ChannelOutboundBuffer.close(ChannelOutboundBuffer.java:711)
   at 
io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:741)
   at 
io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:607)
   at 
io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1352)
   at 
io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:622)
   at 
io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:606)
   at 
io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:472)
   at 
io.netty.channel.DefaultChannelPipeline.close(DefaultChannelPipeline.java:957)
   at io.netty.channel.AbstractChannel.close(AbstractChannel.java:232)
   at 
io.netty.channel.ChannelFutureListener$2.operationComplete(ChannelFutureListener.java:56)
   at 
io.netty.channel.ChannelFutureListener$2.operationComplete(ChannelFutureListener.java:52)
   at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577)
   at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:551)
   at 
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490)
   at 
io.netty.util.concurrent.DefaultPromise.addListener(DefaultPromise.java:183)
   at 
io.netty.channel.DefaultChannelPromise.addListener(DefaultChannelPromise.java:95)
   at io.netty.bootstrap.Bootstrap$3.run(Bootstrap.java:248)
   at 
io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:69)
   at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
   at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   at java.lang.Thread.run(Thread.java:748)
   [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.26 
s <<< FAILURE! - in 
org.apache.plc4x.java.utils.rawsockets.netty.RawSocketChannelTest
   [ERROR] doConnect  Time elapsed: 2.478 s  <<< ERROR!
   org.pcap4j.core.PcapNativeException: lo: You don't have permission to 
capture on that device (socket: Operation not permitted)
   [code]
   
   Imported from Jira 
[PLC4X-205](https://issues.apache.org/jira/browse/PLC4X-205). Original Jira may 
contain additional context.
   Reported by: niclas.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #598: ADS connection issue, Help wanted

2022-11-09 Thread GitBox


ottlukas opened a new issue, #598:
URL: https://github.com/apache/plc4x/issues/598

   I ran twincat simulator on my local host machine with ip 192.168.x.x 
subnetwork and the similator has the ip address 172.21.97.81, and then i have 
used the ads server connection string: 
ads:tcp://localhost/172.21.97.81.1.1:851, which seems not to be connected and i 
receive the error message as shown in the logs. Can someone point out what the 
problem is or the bug is ?
   
    
   
   Best Regards
   
   Vikram Gopu 
   
    
   
    
   
    
   
   [main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating new PLC 
Driver Manager with class loader 
jdk.internal.loader.ClassLoaders$AppClassLoader@2626b418[main] INFO 
org.apache.plc4x.java.PlcDriverManager - Instantiating new PLC Driver Manager 
with class loader 
jdk.internal.loader.ClassLoaders$AppClassLoader@2626b418[main] INFO 
org.apache.plc4x.java.PlcDriverManager - Registering available drivers...[main] 
INFO org.apache.plc4x.java.PlcDriverManager - Registering driver for Protocol 
modbus (Modbus (TCP / Serial))[main] INFO 
org.apache.plc4x.java.PlcDriverManager - Registering driver for Protocol s7 
(Siemens S7 (Basic))[main] INFO org.apache.plc4x.java.PlcDriverManager - 
Registering driver for Protocol ads (Beckhoff Twincat ADS)[main] INFO 
org.apache.plc4x.java.scraper.config.triggeredscraper.ScraperConfigurationTriggeredImpl
 - Assuming job as triggered job because triggerConfig has been set[main] INFO 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl - 
 Starting jobs...[main] INFO 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperImpl - Task 
TriggeredScraperTask\{driverManager=org.apache.plc4x.java.utils.connectionpool.PooledPlcDriverManager@4b9e255,
 jobName='ScheduleJob', connectionAlias='DeviceSource', 
connectionString='ads:tcp://localhost/172.21.97.81.1.1:851', 
requestTimeoutMs=1000, 
executorService=java.util.concurrent.ThreadPoolExecutor@5e57643e[Running, pool 
size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], 
resultHandler=eu.cloudplug.cpe.plc4x.PLC4XScrapper$$Lambda$67/0x000800bcac40@133e16fd,
 
triggerHandler=org.apache.plc4x.java.scraper.triggeredscraper.triggerhandler.TriggerHandlerImpl@51b279c9}
 added to scheduling[triggeredscraper-scheduling-thread-1] WARN 
org.apache.plc4x.java.scraper.triggeredscraper.TriggeredScraperTask - Exception 
during scraping of Job ScheduleJob, Connection-Alias DeviceSource: 
Error-message: null - for stack-trace change logging to 
DEBUG[nioEventLoopGroup-3-1] WAR
 N io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was 
fired, and it reached at the tail of the pipeline. It usually means the last 
handler in the pipeline did not handle the 
exception.io.netty.handler.codec.DecoderException: 
java.lang.IndexOutOfBoundsException at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98)
 at 
io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
 at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
 at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
 at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
 at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
 at 
io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
 at io.netty.channe
 
l.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
 at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
 at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
 at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1421)
 at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
 at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
 at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
 at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
 at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697) 
at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
 at io.netty.chann
 el.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549) at 
io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511) at 
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
 at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 
at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:

[GitHub] [plc4x] ottlukas opened a new issue, #600: NIFI processors should only work with specific attributes

2022-11-09 Thread GitBox


ottlukas opened a new issue, #600:
URL: https://github.com/apache/plc4x/issues/600

   NIFI Flowfiles have 'automatic' attributes, that are there even if they 
aren't explicitly created by a flow processor.
   
   The PLC4x processors use all the attributes when writing, this is incorrect. 
 They will be writing the wrong things.
   
   The usual pattern in NIFI is to have the attribute name follow a pattern, 
that can be read as a prefix, such as :
   
   plc4x.address.
   
   Then the processor looks for any attributes that start with that, and get 
the end of the address to use as the field name.
   
   As is I would not think this processor would work in production.
   
   Example of this pattern in NIFI: 
   
https://github.com/apache/nifi/blob/7d20c03f89358a5d5c6db63e631013e1c4be4bc4/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java#L132
   
   This is slightly different, as the processor above is looking for configured 
values, where I believe that the plc4x processor just want to write anything 
with the attribute name value.
   
   This is doubly wrong, as attributes are kept in a map.  There will never be 
more than one named value.
   
   The proposed fix would be -\>
   
   - change the reads attribute to use a prefix pattern as  above
   - only write out those that match through regex / capture
   
   
   
   
   Imported from Jira 
[PLC4X-219](https://issues.apache.org/jira/browse/PLC4X-219). Original Jira may 
contain additional context.
   Reported by: otto.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #601: Request future never returns when ResponseCode not OK for Siemes S7

2022-11-09 Thread GitBox


ottlukas opened a new issue, #601:
URL: https://github.com/apache/plc4x/issues/601

   When a request is made against a PLC which returns a ResponseCode other than 
OK the future will never complete and hang forever.
   
   Imported from Jira 
[PLC4X-199](https://issues.apache.org/jira/browse/PLC4X-199). Original Jira may 
contain additional context.
   Reported by: julian.feinauer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #603: Handling of FLOAT and DOUBLE has issues with generated code

2022-11-09 Thread GitBox


ottlukas opened a new issue, #603:
URL: https://github.com/apache/plc4x/issues/603

   Currently the code generation still uses the Supplier-Based reading of 
floating-point values. This code seems to have issues with the value "0.0", 
which is displayed as an extremely small floating-point value.
   
   When switching to ReadBuffer readFloat and readDouble implementation they 
seem to be causing errors.
   
   Imported from Jira 
[PLC4X-254](https://issues.apache.org/jira/browse/PLC4X-254). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #599: [S7] When trying to write to a S7 device and writing is not explicitly enabled, the PLC will respond with an error code

2022-11-09 Thread GitBox


ottlukas opened a new issue, #599:
URL: https://github.com/apache/plc4x/issues/599

   The S7 will respond with:
* Error Class: 0x83
* Error Code: 0x04 
   
   if the user tries a write request and this is not explicitly enabled, we can 
definitely handle this in a nicer way.
   
   To fix the problem, you need to select the PLC in TIA, go into the 
Properties dialog, select "Protection". You will probably notice there's an 
Access Level Table, but you need to scroll down (even if it looks as if there 
is nothing). There check the box in: "Permit access with PUT/GET communications 
from remote partner"
   
   Would be cool if we could give our users a hint on this.
   
   Imported from Jira 
[PLC4X-208](https://issues.apache.org/jira/browse/PLC4X-208). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #602: Pending threads after connection.close

2022-11-09 Thread GitBox


ottlukas opened a new issue, #602:
URL: https://github.com/apache/plc4x/issues/602

   I’m facing some issue when I try to quit my application. It seems 
connection.close() is not stopping all pending threads. Is this a known issue 
or am I doing something wrong?
   
   
   ```
   
   String url = "s7://...";
   PlcDriverManager manager = new PlcDriverManager();
   PlcConnection connection
   = manager.getConnection(url);
   connection.close();
   System.out.println("closed”);  // gets printed but
   hangs afterwards
   ```
   
   I created a thread dump which is attached.
   
   Imported from Jira 
[PLC4X-249](https://issues.apache.org/jira/browse/PLC4X-249). Original Jira may 
contain additional context.
   Reported by: svoss.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #604: [Modbus] Apache NiFi processor throws java.io.IOException after a while

2022-11-09 Thread GitBox


ottlukas opened a new issue, #604:
URL: https://github.com/apache/plc4x/issues/604

   My Plc4xSourceProcessor's, PLC connection String is 
"modbus:tcp://[10.0.2.238:502?slave=1](http://10.0.2.238:502/?slave=1)" and PLC 
resource address String is "test1=holding-register:1"
 
I can get the values for 5-10 times with 5 second intervals but then I get 
below exception. I can read the values with the Modbus Poll application, so 
most probably the PLC4X side has a problem.
 
I may also get some other exceptions when starting the processor, which are 
also below.
 
   PS: Wireshark trace is attached. I've read 16 times then I get the exception.
 
* 
\-- This is the exception which I get after some successful read 
operations.*
2020-08-27 13:19:06,091 WARN [nioEventLoopGroup-8-1] 
io.netty.channel.DefaultChannelPipeline An exceptionCaught() event was fired, 
and it reached at the tail of the pipeline. It usually means the last handler 
in the pipeline did not handle the exception.
java.io.IOException: An existing connection was forcibly closed by the 
remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1133)
at 
io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
 
 
\-- This is the exception which I get sometimes when starting up the 
processor.*
2020-08-27 13:17:16,813 WARN [Timer-Driven Process Thread-11] 
o.a.n.controller.tasks.ConnectableTask Administratively Yielding 
Plc4xSourceProcessor[id=2f12f5b4-0174-1000-724e-a53ba0fc1652] due to uncaught 
Exception: java.lang.NullPointerException
java.lang.NullPointerException: null
at 
org.apache.plc4x.nifi.Plc4xSourceProcessor.onTrigger(Plc4xSourceProcessor.java:50)
at 
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at 
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1174)
at 
org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
at 
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown
 Source)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
 Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
   
   Imported from Jira 
[PLC4X-245](https://issues.apache.org/jira/browse/PLC4X-245). Original Jira may 
contain additional context.
   Reported by: turker.tunali.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #605: Reading long Int Array

2022-11-09 Thread GitBox


ottlukas opened a new issue, #605:
URL: https://github.com/apache/plc4x/issues/605

   Dear Chris,
   
   I need to report an another bug. 
   As you know I am trying to read a very complex Data Bloc from a S7-1200, in 
the future I will try with a 1500. A picture of one of this block in in the 
attached picture.
   I found a problem which actually is similar to the String problem I reported 
in [PLC4X-240](https://issues.apache.org/jira/projects/PLC4X/issues/PLC4X-240), 
in reading long array of Int. 
   The software running in the PLC as a component which actually samples an 
analog value a store the data in long Array of Integer or Real. An example is:
   
   ```
   
   PLC_CellValue_2[400]='%DB2:928.0:INT[400]'
   
   ```
   
   
   or 
   
   ```
   
   PLC_SpeedNotSafety[400]='%DB2:6542.0:REAL[400]'
   
   ```
   
   
   Reading such a long array of values is not possible because the request on 
the wire is for a too huge payload (probably this is the same problem we had 
with the string). 
   I have attached the wireshark capture for you.
   
   I did the comparison with the 0.6.0 version of the library and the array is 
correctly read. On the wire I see 3 read of 110 Integer and a last one of 70 
which are my 400 Integer. 
   As for this reading I have captured the wireshark.
   
   just to complete the big picture my final target is to read a big DB. In 
this complex scenario there a similar problem that I think is a data request 
size problem too. 
   If I try to read a list of variables like this one: 
   
   ```
   
   PLC_ReportColpoDateLast='%DB2:0.0:DATE_AND_TIME'
   PLC_@timestamp='%DB2:12.0:DATE_AND_TIME'
   PLC_ReportColpoDateLastID='%DB2:24.0:DINT'
   PLC_ReportColpoDateID='%DB2:28.0:DINT'
   PLC_RichiestaCurva='%DB2:32.0:INT'
   PLC_TrasferimentoCurva='%DB2:34.0:BOOL'
   PLC_ArchiveReport='%DB2:36.0:BOOL'
   PLC_DeleteReport='%DB2:36.1:BOOL'
   PLC_Report='%DB2:36.2:BOOL'
   PLC_Enable='%DB2:36.3:BOOL'
   PLC_SetCelloffset='%DB2:36.4:BOOL'
   PLC_ResCelloffset='%DB2:36.5:BOOL'
   PLC_IDX='%DB2:38.0:INT'
   PLC_KW='%DB2:40.0:BOOL'
   PLC_TemCen='%DB2:42.0:REAL'
   PLC_TemBiella='%DB2:46.0:REAL'
   PLC_TemBroDx='%DB2:50.0:REAL'
   PLC_TemBroSx='%DB2:54.0:REAL'
   PLC_PreCen='%DB2:58.0:REAL'
   PLC_PreFreno='%DB2:62.0:REAL'
   PLC_PreCil='%DB2:66.0:REAL'
   PLC_EncPosAct='%DB2:70.0:REAL'
   PLC_EncPosActSafety='%DB2:74.0:REAL'
   PLC_EncSpeedSafety='%DB2:78.0:REAL'
   PLC_EncSpeed='%DB2:82.0:REAL'
   PLC_CellValue[5]='%DB2:86.0:INT[5]'
   PLC_CellValueOffset[5]='%DB2:96.0:INT[5]'
   PLC_N_TotPezzi='%DB2:106.0:DINT'
   PLC_N_TotColpi='%DB2:110.0:DINT'
   PLC_KW_Max='%DB2:114.0:INT'
   PLC_CellValueMax[5]='%DB2:116.0:INT[5]'
   PLC_CellValue_1[2]='%DB2:126.0:INT[2]'
   PLC_CellValue_2[400]='%DB2:928.0:INT[100]'
   
   ```
   
   
   The error I find on the wire is the same. Pleas note that in the list of 
variables there are no array of 400 samples but, I suppose, that the sum of all 
the request fire the same bug about the request of more than 240 byte length. 
   I have attached a wireshark capture of this scenario too. 
   
   Hope this analysis could help to find an universal solution for this 
problem. 
   
   Regards,
   Stefano 
   
   P.S. As usual I am using the HellpPlc4x code and the latest compiled version 
of the 0.8.0 library. 
   
   Imported from Jira 
[PLC4X-241](https://issues.apache.org/jira/browse/PLC4X-241). Original Jira may 
contain additional context.
   Reported by: fox_pluto.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #607: Implement the Fatek protocol

2022-11-09 Thread GitBox


ottlukas opened a new issue, #607:
URL: https://github.com/apache/plc4x/issues/607

   It would be cool if we could implement the Fatek protocol.
   
   Protocol Spec:
   
   
[http://fatek.com.tr/downloads/yuklemeler/Manual_2_Appendix1.pdf](http://fatek.com.tr/downloads/yuklemeler/Manual_2_Appendix1.pdf)
   
   Open-Source Project (Apache 2.0 Licensed)
   
   [https://github.com/s4u/jfatek](https://github.com/s4u/jfatek)
   
   [https://www.simplify4u.org/jfatek/](https://www.simplify4u.org/jfatek/)
   
    
   
   Imported from Jira 
[PLC4X-269](https://issues.apache.org/jira/browse/PLC4X-269). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #606: Scraper Statistics show Incomplete Requests as Failed

2022-11-09 Thread GitBox


ottlukas opened a new issue, #606:
URL: https://github.com/apache/plc4x/issues/606

   Looking at the statistics debug log, the statistics occasionally report 
failed requests but on the next cycle may show as all have completed.
   
   4 (3 success, 25.0 % failed, 0.0 % too slow)
   
   Then on the next reporting cycle may show.
   
   7 (7 success, 0.0 % failed, 0.0 % too slow)
   
   I'm assuming that it is showing requests that haven't completed as failed 
requests when it shouldn't count incomplete ones.
   
    
   
   
plc4j/tools/scraper/src/main/java/org/apache/plc4x/java/scraper/ScraperImpl.java
 - Line 146.
   
   Imported from Jira 
[PLC4X-260](https://issues.apache.org/jira/browse/PLC4X-260). Original Jira may 
contain additional context.
   Reported by: hutcheb.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #611: Mock driver always writes null value

2022-11-09 Thread GitBox


ottlukas opened a new issue, #611:
URL: https://github.com/apache/plc4x/issues/611

   The Mock driver is usefull for developing applications without available 
hardware. Reads from Mock devices work, but writes seem broken.
   
   Scenario:
   
   implement *MockDevice* interface and the *write* method. See that this 
device is set in the connection using the *MockConnection*.*setDevice* method.
   
   When a WriteRequest is issued on the connection, the *MockDevice*.*write* 
method is indeed called, but the *value* parameter is always _*null*_. The 
given value to write is not passed through.
   
   Debugging and looking into the sourcecode shows following:
   
   *MockConnection.write* uses following statement to retrieve the value:
   
    
   ```
   
   // MockConnection:147
   ((MockField) writeRequest.getField(name)).getPlcValue()
   
   ```
   
   This retrieves the *plcValue* member from the MockField object. This  
*plcValue* is written to by constructor *MockField(String address, MockPlcValue 
plcValue)* only. However, I did not find any call to this constructor.
   
    
   
   Note:
   
   Other Drivers seem to use
   ```
   
   writeRequest.getPlcValue(fieldName) 
   
   ```
   
   instead and do not have a value member in the Field class. (e.g. Simulator, 
Modbus )
   
   Imported from Jira 
[PLC4X-288](https://issues.apache.org/jira/browse/PLC4X-288). Original Jira may 
contain additional context.
   Reported by: teslanet-nl.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #610: org.apache.plc4x.java.opm.OPMException: Timeout during fetching values

2022-11-09 Thread GitBox


ottlukas opened a new issue, #610:
URL: https://github.com/apache/plc4x/issues/610

   When use OPM of plc4j,sometimes meet error 
“org.apache.plc4x.java.opm.OPMException: Timeout during fetching values”。maybe 
one item was got more fetche request(in different threads)at a time。
   
   Imported from Jira 
[PLC4X-274](https://issues.apache.org/jira/browse/PLC4X-274). Original Jira may 
contain additional context.
   Reported by: kdxq.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #612: Reading data from PLC via Modbus with Camel using timer

2022-11-09 Thread GitBox


ottlukas opened a new issue, #612:
URL: https://github.com/apache/plc4x/issues/612

   I want to get data from plc with period = 1 ms. I try it using consumer:
   ```
   
   val modbusConsumerEndpoint = Plc4XEndpoint(modbusEndpointUri, 
plcComponent).apply {
tags = mapOf(fieldName
   to "input-register:$plcInputPort")
period = 1
   }
   
   from(modbusConsumerEndpoint)
  
   .process {
   it.message.body = (it.message.body as Map)[ModbusEndpointParams.fieldName]
   
  it.setMainBody(ctx)
   }
   .marshal().json()

 .setHeader(KafkaConstants.KEY, constant(""))
   .to(mainKafkaEndpoint)
   ```
   
   But I have only one loop. {color:#00}*Plc4XConsumer* may work with 
trigger, but I couldn't find any examples for that.
   {color}
   
   {color:#00}Either I try to use camel chain with timer:{color}
   ```
   
   from("timer:foo?period=1")
.process {
it.message.body =
mapOf(fieldName to "input-register:$plcInputPort")
   
   }
.to("plc4x:modbus://uri")
   ```
   
   But *Plc4XProducer* works only for writting. I solve this problem by 
creating own Endpoint with custom Producer includes ReadRequestBuilder extend  
Plc4XEndpoint and Plc4XProducer. It looks not like production decision.
   
   What is a right way to do this task?
   
   Imported from Jira 
[PLC4X-292](https://issues.apache.org/jira/browse/PLC4X-292). Original Jira may 
contain additional context.
   Reported by: dtadescu.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #613: Add profinet-DCP

2022-11-09 Thread GitBox


ottlukas opened a new issue, #613:
URL: https://github.com/apache/plc4x/issues/613

   I found some work done towards implementing the 
[profinet-DCP](https://profinetuniversity.com/naming-addressing/profinet-dcp/) 
protocol on the  [feature/profinet 
branch]([https://github.com/apache/plc4x/tree/feature/profinet)].
   
   I see that the profinet protocol is not on the develop branch anymore, was 
it replaced with the s7 protocol?
   
   If someone would have the time to guide me, I could work on it to update, 
test, and bring this discovery feature to PLC4X.
   
   Imported from Jira 
[PLC4X-286](https://issues.apache.org/jira/browse/PLC4X-286). Original Jira may 
contain additional context.
   Reported by: adrlzr.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #614: [PLC4C] Fix ReadBuffer test for Strings

2022-11-09 Thread GitBox


ottlukas opened a new issue, #614:
URL: https://github.com/apache/plc4x/issues/614

   I had to disable the ReadBuffer test for reading Strings in PLC4C as this 
was causing build errors on Windows
   
   Imported from Jira 
[PLC4X-287](https://issues.apache.org/jira/browse/PLC4X-287). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #616: Test-Issue for language selection

2022-11-09 Thread GitBox


ottlukas opened a new issue, #616:
URL: https://github.com/apache/plc4x/issues/616

   Just a test-issue to check how the "Language" selection works.
   
   Imported from Jira 
[PLC4X-305](https://issues.apache.org/jira/browse/PLC4X-305). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #608: WIthout “S7 Driver running in ACTIVE mode.” Nothing response

2022-11-09 Thread GitBox


ottlukas opened a new issue, #608:
URL: https://github.com/apache/plc4x/issues/608

   [main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating new PLC 
Driver Manager with class loader sun.misc.Launcher$AppClassLoader@14dad5dc
   [main] INFO org.apache.plc4x.java.PlcDriverManager - Registering available 
drivers...
   [main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver for 
Protocol s7 (Siemens S7 (Basic))
   [main] INFO org.apache.plc4x.java.transport.tcp.TcpChannelFactory - 
Configuring Bootstrap with Configuration\{local-rack=1, local-slot=1, 
remote-rack=0, remot-slot=3, pduSize=1024, maxAmqCaller=8, maxAmqCallee=8, 
controllerType='null'}
   [nioEventLoopGroup-2-1] INFO 
org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic - S7 Driver running 
in ACTIVE mode.
   
   Imported from Jira 
[PLC4X-273](https://issues.apache.org/jira/browse/PLC4X-273). Original Jira may 
contain additional context.
   Reported by: kdxq.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #609: [S7] Implement connection closing for S7 protocol

2022-11-09 Thread GitBox


ottlukas opened a new issue, #609:
URL: https://github.com/apache/plc4x/issues/609

   It seems I skipped porting the code to gracefully close a connection in the 
transition from 0.6 to 0.7. This is a great low-hanging fruit, so I'll leave 
this here for someone to picup.
   
   We already generally have the parts in place, however they are not quite 
correct:
   
   
[https://github.com/apache/plc4x/blob/develop/protocols/s7/src/main/resources/protocols/s7/s7.mspec](https://github.com/apache/plc4x/blob/develop/protocols/s7/src/main/resources/protocols/s7/s7.mspec)
   
   Defines a type: COTPPacketDisconnectRequest, however the third parameter is 
not class, but disconnectReason. 
   
   The old TPDU is defined here:
   
[https://github.com/apache/plc4x/blob/rel/0.6/plc4j/protocols/iso-tp/src/main/java/org/apache/plc4x/java/isotp/protocol/model/tpdus/DisconnectRequestTpdu.java](https://github.com/apache/plc4x/blob/rel/0.6/plc4j/protocols/iso-tp/src/main/java/org/apache/plc4x/java/isotp/protocol/model/tpdus/DisconnectRequestTpdu.java)
   
   This should be an enum type. The constant names and values can be taken from 
here: 
   
[https://github.com/apache/plc4x/blob/rel/0.6/plc4j/protocols/iso-tp/src/main/java/org/apache/plc4x/java/isotp/protocol/model/types/DisconnectReason.java](https://github.com/apache/plc4x/blob/rel/0.6/plc4j/protocols/iso-tp/src/main/java/org/apache/plc4x/java/isotp/protocol/model/types/DisconnectReason.java)
   
   As soon as these changes are in place and the code has been generated, the 
logic for closing can be implemented by being inspired by the old drivers code:
   
[https://github.com/apache/plc4x/blob/rel/0.6/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java](https://github.com/apache/plc4x/blob/rel/0.6/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java)
   
   Imported from Jira 
[PLC4X-271](https://issues.apache.org/jira/browse/PLC4X-271). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #618: plc4x s7 driver java for real type wirte error

2022-11-09 Thread GitBox


ottlukas opened a new issue, #618:
URL: https://github.com/apache/plc4x/issues/618

   Creating a write request for real type  such as 
   
   via addItem("value-5", "%DB1.DBD16:REAL", 12.1)
   
    
   
   when execute the request, error as below: 
   
   'ERROR org.apache.plc4x.java.s7.readwrite.types.DataTransportErrorCode - No 
DataTransportErrorCode for value 7'
   
   Imported from Jira 
[PLC4X-308](https://issues.apache.org/jira/browse/PLC4X-308). Original Jira may 
contain additional context.
   Reported by: lhs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #620: Plc4x support for RTU/Serial communication for modbus protocol.

2022-11-09 Thread GitBox


ottlukas opened a new issue, #620:
URL: https://github.com/apache/plc4x/issues/620

   Hi,
   
      I am using plc4x for one of our projects to develop a module which uses 
plc4x to establish communication with a sensor device using modbus RTU/Serial 
communication.
   
   I am able to communicate with the device with TCP transport but not able to 
do with RTU/Serial communication.
   
   I tried to look for some example/documentation on how to use RTU/Serial 
communication in plc4x but could not find any information in the website or the 
web.
   
   Also looking at the documentation at 
[https://plc4x.apache.org/users/protocols/modbus.html](https://plc4x.apache.org/users/protocols/modbus.html)
 it is not clear whether modbus supports serial transport as it only lists tcp 
and udp.
   
    
   |Compatible Transports:| * `tcp` (Default Port: 502)
* `udp` (Default Port: 502)|
   
   Kindly request to clarify if serial is supported in modbus? if so could you 
please point me to an example/documentation which shall be used to understand 
how to use it for serial communication.
   
   Anyways I tried to use the library/driver plc4j-transport-serial  
[https://plc4x.apache.org/users/transports/serial.html](https://plc4x.apache.org/users/transports/serial.html)
   
   to communicate with device in which the connection is established but it 
fails to read the data with following WANING.
   
    
   
   `2021-06-03-18:13:51.814 [nioEventLoopGroup-2-1] WARN  
io.netty.channel.nio.NioEventLoop - Selector.select() returned prematurely 512 
times in a row; rebuilding Selector 
org.apache.plc4x.java.transport.serial.SerialPollingSelector@28ecdc0d.`
   `2021-06-03-18:13:59.630 [nioEventLoopGroup-2-1] WARN  
io.netty.channel.nio.NioEventLoop - Selector.select() returned prematurely 512 
times in a row; rebuilding Selector 
org.apache.plc4x.java.transport.serial.SerialPollingSelector@11c9a1fa.`
   
   `My Sample code is as follows.`
   
    
   
   ` private void plcRtuReader() {`
   ` // unit-identifier=1&`
   ` String connectionString =`
   ` "modbus:serial://COM5?unit-identifier=1&baudRate=19200&stopBits=" + 
SerialPort.ONE_STOP_BIT`
   ` + "&parityBits="`
   ` + SerialPort.NO_PARITY + "&dataBits=8";`
   ` System.out.println("URL:" + connectionString);`
   ` try (PlcConnection plcConnection = new 
PlcDriverManager().getConnection(connectionString)) {`
   
   ` if (!plcConnection.getMetadata().canRead()) {`
   ` System.out.println("This connection doesn't support reading.");`
   ` return;`
   ` `}
   
   ` PlcReadRequest.Builder builder = plcConnection.readRequestBuilder();`
   ` builder.addItem("value-2", "input-register:1[2]");`
   `PlcReadRequest readRequest = builder.build();`
   
   `// CompletableFuture asyncResponse = 
readRequest.execute();`
   ` PlcReadResponse response = readRequest.execute().get();`
   ` for (String fieldName : response.getFieldNames()) {`
   ` if (response.getResponseCode(fieldName) == PlcResponseCode.OK) {`
   ` int numValues = response.getNumberOfValues(fieldName);`
   ` // If it's just one element, output just one single line.`
   ` if (numValues == 1) {`
   ` System.out.println("Value[" + fieldName + "]: " + 
response.getObject(fieldName));`
   ` `}
   ` // If it's more than one element, output each in a single row.`
   ` else {`
   ` System.out.println("Value[" + fieldName + "]:");`
   ` for (int i = 0; i < numValues; i++) {`
   ` System.out.println(" - " + response.getObject(fieldName, i));`
   ` `}
   ` `}
   ` `}
   ` // Something went wrong, to output an error message instead.`
   ` else {`
   ` System.out.println(`
   ` "Error[" + fieldName + "]: " + 
response.getResponseCode(fieldName).name());`
   ` `}
   ` `}
   
   ` System.exit(0);`
   ` } catch (PlcConnectionException e) {`
   ` e.printStackTrace();`
   ` } catch (Exception e) {`
   ` e.printStackTrace();`
   ` `}
   ` `}
   
   Thanks a lot for your help.
   
   Regards,
   Purushotham
   
   Imported from Jira 
[PLC4X-300](https://issues.apache.org/jira/browse/PLC4X-300). Original Jira may 
contain additional context.
   Reported by: psham81.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #615: Docker build not working - mvnw permission denied etc

2022-11-09 Thread GitBox


ottlukas opened a new issue, #615:
URL: https://github.com/apache/plc4x/issues/615

   Hello, I'm trying to install PLC4X with Docker and get a couple of errors - 
   
   $ docker build -t plc4x .
   ...
   Step 21/39 : COPY . /ws/
\---\> e86e4d250f0c
   Step 22/39 : WORKDIR /ws
\---\> Running in b2d9525763e0
   Removing intermediate container b2d9525763e0
\---\> 2d714dffc27b
   Step 23/39 : RUN ./mvnw -P 
with-boost,with-c,with-cpp,with-dotnet,with-go,with-logstash,with-opcua-werver,with-proxies,with-python,with-logstash,with-sandbox
 com.offbytwo.maven.plugins:maven-dependency-plugin:3.1.1.MDEP568:go-offline 
-DexcludeGroupIds=org.apache.plc4x,org.apache.plc4x.examples,org.apache.plc4x.sandbox
\---\> Running in 97e09acbcdfd
   /bin/sh: 1: ./mvnw: Permission denied
   The command '/bin/sh -c ./mvnw -P 
with-boost,with-c,with-cpp,with-dotnet,with-go,with-logstash,with-opcua-werver,with-proxies,with-python,with-logstash,with-sandbox
 com.offbytwo.maven.plugins:maven-dependency-plugin:3.1.1.MDEP568:go-offline 
-DexcludeGroupIds=org.apache.plc4x,org.apache.plc4x.examples,org.apache.plc4x.sandbox'
 returned a non-zero code: 126
   
   So I added a step to the Dockerfile line 72
    
   RUN chmod x ./mvnw
   That got it past that error, then got another one -
   
   Non-resolvable parent POM for 
org.apache.plc4x.sandbox:plc4cpp:[unknown-version]: Could not find artifact 
org.apache.plc4x.sandbox:plc4x-sandbox:pom:0.8.0-SNAPSHOT and 
'parent.relativePath' points at wrong local POM @ line 24, column 11
   
   I'm not familiar with maven so am not sure how to get past it...
   
   Thank you for any help - 
   
    
   
   Imported from Jira 
[PLC4X-284](https://issues.apache.org/jira/browse/PLC4X-284). Original Jira may 
contain additional context.
   Reported by: bburnskm.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #617: [Go] [CodeGeneration] When generating code for two arrays within one type, the output is invalid

2022-11-09 Thread GitBox


ottlukas opened a new issue, #617:
URL: https://github.com/apache/plc4x/issues/617

   When generating code for count-arrays a numberOfBytes variable is declared 
automatically. As soon as one type contains two count-arrays the second one has 
a compile error: "no new variables on left side of :=" ... should be a simple 
fix ... 
   
   Imported from Jira 
[PLC4X-306](https://issues.apache.org/jira/browse/PLC4X-306). Original Jira may 
contain additional context.
   Reported by: cdutz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #619: [S7] Writing byte array not working

2022-11-09 Thread GitBox


ottlukas opened a new issue, #619:
URL: https://github.com/apache/plc4x/issues/619

   I'm having some issues with writing a byte array using S7 driver to the 
S7-1200.
   
   I'm a bit new to the communication with PLCs, so I'm not sure if I'm doing 
something wrong.
   
   I've followed the example of how to write a byte array to the connection, 
however I'm getting an INTERNAL_ERROR as a response code from the library and 
in the Wireshark the status from the PLC is inconsistent data type. 
   
   I've attached both the sample project that's not working for me, my 
definition of byte array on the PLC and also  Wireshark capture. 
   
   It's possible that I'm not doing something right, however I can't figure it 
out. 
   
   Writing of most of the single values is working, however the array is the 
problem. And as far as I understood from the code and documentation arrays 
should be supported. 
   
   Any help would be appreciated.
   
   Imported from Jira 
[PLC4X-309](https://issues.apache.org/jira/browse/PLC4X-309). Original Jira may 
contain additional context.
   Reported by: maidab.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #621: OPCUA response code and details are not reported in PLC response code

2022-11-09 Thread GitBox


ottlukas opened a new issue, #621:
URL: https://github.com/apache/plc4x/issues/621

   the attached screenshot shows an OPCUA response code as it is received by 
the underlying milo client, but the OPCUA driver reports only NOT_FOUND,
   it would be great, if the underlying details are included in the OPCUA 
response code; the real cause for a problem is important for problem solution
   
   Imported from Jira 
[PLC4X-304](https://issues.apache.org/jira/browse/PLC4X-304). Original Jira may 
contain additional context.
   Reported by: torsten@sql-ag.de.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #623: Modbus TCP Timeout not working. NIFI Processor Task gets stuck

2022-11-09 Thread GitBox


ottlukas opened a new issue, #623:
URL: https://github.com/apache/plc4x/issues/623

   When using V0.9.0 in PLC4x NIFI-Processor for Modbus TCP, the Processor Task 
gets stuck, if the network connection is broken. The default timeout and the 
request-timeout option do not seem to have any affect on this behaviour.
   
   If the NIFI-Processor is started, when the network connection is already 
broken, a timeout error is thrown. If the connection breaks after a successful 
initial connection could be made, the running Task gets stuck on the next 
Modbus TCP Request and has to be forced to terminate.
   
   Using V0.8.0 is working fine in the same scenario with same config in NIFI. 
In Production, V0.9.0 with Modbus TCP was not usable, since connections broke 
every day. We had to revert to V0.8.0. This was tested with the PLC4x Build 
from 
[https://search.maven.org/search?q=plc4j-nifi-plc4x-nar](https://search.maven.org/search?q=plc4j-nifi-plc4x-nar)
 and the official latest NIFI (V1.14.0) Docker and Windows Version 
   
   Imported from Jira 
[PLC4X-321](https://issues.apache.org/jira/browse/PLC4X-321). Original Jira may 
contain additional context.
   Reported by: zedman.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #622: plc4x for go language support s7 PLC?

2022-11-09 Thread GitBox


ottlukas opened a new issue, #622:
URL: https://github.com/apache/plc4x/issues/622

   Dose the plc4x for go support S7 PLC ?
   
   No register s7 driver function ?
   
   Thanks! 
   
   Imported from Jira 
[PLC4X-310](https://issues.apache.org/jira/browse/PLC4X-310). Original Jira may 
contain additional context.
   Reported by: lhs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #624: S7 Cannot write string

2022-11-09 Thread GitBox


ottlukas opened a new issue, #624:
URL: https://github.com/apache/plc4x/issues/624

   Exception thrown when writing string type: java.nio.bufferoverflow exception
   
   Imported from Jira 
[PLC4X-318](https://issues.apache.org/jira/browse/PLC4X-318). Original Jira may 
contain additional context.
   Reported by: fungoddd.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #625: Class casts in new opcua driver

2022-11-09 Thread GitBox


ottlukas opened a new issue, #625:
URL: https://github.com/apache/plc4x/issues/625

   Issue reported on mailing lists:
   
   ```
   
   [nioEventLoopGroup-2-1] WARN io.netty.channel.DefaultChannelPipeline - An 
exceptionCaught() event was
   fired, and it reached at the tail of the pipeline. It usually means the last 
handler in the pipeline
   did not handle the exception.
   io.netty.handler.codec.DecoderException: java.lang.ClassCastException:
   class org.apache.plc4x.java.opcua.readwrite.ServiceFault cannot be cast to 
class org.apache.plc4x.java.opcua.readwrite.ReadResponse
   (org.apache.plc4x.java.opcua.readwrite.ServiceFault and 
org.apache.plc4x.java.opcua.readwrite.ReadResponse
   are in unnamed module of loader 'app')
   at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98)
   
  at 
io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
   
  at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   
  at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   
  at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   
  at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
   
  at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)

 at 
io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
 
at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   
  at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   
  at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
   
  at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
   
  at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
   
  at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
   
  at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
   
  at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
   
  at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
   at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
   
  at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
   at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
   
  at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
   
  at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   
  at java.base/java.lang.Thread.run(Thread.java:834)
   Caused by: java.lang.ClassCastException:
   class org.apache.plc4x.java.opcua.readwrite.ServiceFault cannot be cast to 
class org.apache.plc4x.java.opcua.readwrite.ReadResponse
   (org.apache.plc4x.java.opcua.readwrite.ServiceFault and 
org.apache.plc4x.java.opcua.readwrite.ReadResponse
   are in unnamed module of loader 'app')
   at 
org.apache.plc4x.java.opcua.protocol.OpcuaProtocolLogic.lambda$read$0(OpcuaProtocolLogic.java:177)
   
  at 
org.apache.plc4x.java.opcua.context.SecureChannel.lambda$4(SecureChannel.java:212)

 at 
org.apache.plc4x.java.spi.Plc4xNettyWrapper.decode(Plc4xNettyWrapper.java:175)
   at 
io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81)
   
  at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
   
  ... 23 more
   
   ```
   
   
   Imported from Jira 
[PLC4X-319](https://issues.apache.org/jira/browse/PLC4X-319). Original Jira may 
contain additional context.
   Reported by: ldywicki.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #626: java.lang.ClassCastException: DefaultPlcSubscriptionField cannot be cast to class OpcuaField

2022-11-09 Thread GitBox


ottlukas opened a new issue, #626:
URL: https://github.com/apache/plc4x/issues/626

   Hi team -
   
   i had followed the 
[https://github.com/apache/plc4x/tree/rel/0.8/plc4j/examples/hello-world-plc4x-subscription](https://github.com/apache/plc4x/tree/rel/0.8/plc4j/examples/hello-world-plc4x-subscription)
 and facing the below error .
   
   version : plc4j-driver-opcua-0.8.0
   
   java : 1.8
   
   Exception in thread "main" java.util.concurrent.ExecutionException: 
java.lang.ClassCastException: 
org.apache.plc4x.java.spi.model.DefaultPlcSubscriptionField cannot be cast to 
org.apache.plc4x.java.opcua.protocol.OpcuaField
   
    
   
   please kindly provide your suggestions.
   
   Imported from Jira 
[PLC4X-313](https://issues.apache.org/jira/browse/PLC4X-313). Original Jira may 
contain additional context.
   Reported by: karacc.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #627: Modbus - Kafka does not close the connections

2022-11-09 Thread GitBox


ottlukas opened a new issue, #627:
URL: https://github.com/apache/plc4x/issues/627

   Hello, 
   
   I have been testing the connector and Kafka connects for a few weeks now. To 
do these tests, I try to ingest measurements from a sensor using Modbus, and 
this measurement ingestion is done correctly. The problem arises when I decide 
to remove the connector, as this connection is not closed by default with my 
sensor, which leads me to serious problems (due to the limitation of devices 
that read by Modbus, limited to 4 users per manufacture). The only way I can 
close these connections is to restart the kafka connect container. Is there any 
option or way to force these connections to close? Additionally, here are the 
steps to replicate this error: 
   
   1. Initially, I don't have any connector launched, so I don't have any 
active connection: active: 0, waiting: 0
   
   2. Then, I launch the connector using Kafka Rest API. At this moment, we're 
importing data into the kafka cluster. Using curl, we can see that the 
connector is working: curl -X 'GET' http://localhost:18083/connectors/ -\> 
["modbus-office"]. We can see right now that we only have 1 active connection: 
active: 1, waiting: 0
   
   3. I delete the kafka connector using the rest API: curl -X 'DELETE' 
http://localhost:18083/connectors/modbus-office. So, now, using the previous 
command from the previous point, we don't see any active connector, but, 
analysing the active connections from the sensor, it can be seen that there is 
one active connection: active: 1, waiting: 0. 
   
   This is what is giving me problems, as in theory, there should not be any 
active connections at the moment. We have made a proxy to limit the number of 
active connections, but so far, we have not been able to close it manually 
using the REST API of Kafka or some configuration of the connector. 
   
   
   
   
   Imported from Jira 
[PLC4X-322](https://issues.apache.org/jira/browse/PLC4X-322). Original Jira may 
contain additional context.
   Reported by: fdorado.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #628: Connection to United Manufacturing Hub

2022-11-09 Thread GitBox


ottlukas opened a new issue, #628:
URL: https://github.com/apache/plc4x/issues/628

   Hi everyone!
   
   My name is Jeremy and I am the lead developer of the United Manufacturing 
Hub.
   
   The United Manufacturing Hub is an open-source industrial IoT and 
manufacturing application platform enabling users to connect, store, and access 
all relevant data sources in industrial manufacturing sites and build 
user-centric dashboards and applications.
   
   It would be really great if we could make a connection between PLC4X and the 
United Manufacturing Hub, e.g., in form of a configurable microservice that 
automatically takes data from various PLCs and pushes them into a MQTT broker. 
The United Manufacturing Hub (incl. Node-RED, Grafana, timescaleDB, VerneMQ) 
then provides the infrastructure and data models to contextualize the data and 
enable use-cases like OEE, Performance Management, Machine to Machine 
Communication, Digital Shadow, etc. Furthermore, the United Manufacturing Hub 
allows extracting data from other data sources as well like sensors, 
barcodereader or cameras.
   
   Further information can be found here:
* [https://docs.umh.app/docs/](https://docs.umh.app/docs/)
* 
[https://github.com/united-manufacturing-hub/united-manufacturing-hub](https://github.com/united-manufacturing-hub/united-manufacturing-hub)
   
   Looking forward to discussing how we can combine both open-source projects 
the most effective way.
   
   Regards,
   Jeremy
   
   Imported from Jira 
[PLC4X-315](https://issues.apache.org/jira/browse/PLC4X-315). Original Jira may 
contain additional context.
   Reported by: JeremyTheocharis.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #629: Nifi BasePlc4xProcessor define validation logic for PLC_CONNECTION_STRING and PLC_ADDRESS_STRING properties

2022-11-09 Thread GitBox


ottlukas opened a new issue, #629:
URL: https://github.com/apache/plc4x/issues/629

   Apache Nifi integration, define logic for the validation methods included in 
the class BasePlc4xProcessor, for the properties PLC_CONNECTION_STRING and 
PLC_ADDRESS_STRING
   
   Imported from Jira 
[PLC4X-328](https://issues.apache.org/jira/browse/PLC4X-328). Original Jira may 
contain additional context.
   Reported by: inigoao.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #630: Maven Precondition Check fails on M1 Mac

2022-11-09 Thread GitBox


ottlukas opened a new issue, #630:
URL: https://github.com/apache/plc4x/issues/630

   I have libpcap installed (via brew install libpcap) but when I trigger the 
maven build the precondition check fails and reports
   
    
   ```
   
   [INFO] --- groovy-maven-plugin:2.1.1:execute (prerequisite-check) @ 
plc4x-parent ---
   Detected OS:
     mac
   Detected Arch: x86_64Detecting Java version:    17.0.1         OK
   Detecting Git version:    
   2.30.1         OK
   Detecting LibPcap version: missing
   
   ```
   
   My System is a M1 Mac, if that helps using macOS Monterey 12.0.1.
   
   Imported from Jira 
[PLC4X-332](https://issues.apache.org/jira/browse/PLC4X-332). Original Jira may 
contain additional context.
   Reported by: jfeinauer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #631: The transaction manager executor does not allow closing connections to devices.

2022-11-09 Thread GitBox


ottlukas opened a new issue, #631:
URL: https://github.com/apache/plc4x/issues/631

    
- Identification of the executor and do not use the generic name. 
-  Add a "shutdown" method to terminate the task executor in a controlled 
manner. 
-  Remove the "static" property from the executor, so it can be used in a 
dynamic environment. 
-  Modify the use of logging in derived tasks.
- A general rule must be followed that all drivers must call the new 
transaction handler "shutdown" method in their respective "close" method.
   
   Imported from Jira 
[PLC4X-331](https://issues.apache.org/jira/browse/PLC4X-331). Original Jira may 
contain additional context.
   Reported by: cgarcia.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #632: OPCUA tests don't run on aarch64

2022-11-09 Thread GitBox


ottlukas opened a new issue, #632:
URL: https://github.com/apache/plc4x/issues/632

   When running on aarch64 the tests interfere with each other and blocking a 
infinite amount of time. Currently those a disabled for aarch64
   
   (Seems like there is missing cleanup somewhere)
   
   Imported from Jira 
[PLC4X-330](https://issues.apache.org/jira/browse/PLC4X-330). Original Jira may 
contain additional context.
   Reported by: sruehl.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #633: with-c doesn't build on macOS

2022-11-09 Thread GitBox


ottlukas opened a new issue, #633:
URL: https://github.com/apache/plc4x/issues/633

   
   ```
   
 
   #ifdef DEBUG_PLC4C_SYSTEM
   #include 
 printf("\n PLC4C Connection \n"
   
  "Connection String:\t%s\n"
   "Protocol Code:\t\t%s\n"
   "Transport Code:\t\t%s\n"
   "Connection
   Info:\t%s\n"
   "Parameters:\t\t%s\n",
   new_connection->connection_string ? new_connection->connection_string
   : "NULL",
   new_connection->protocol_code ? new_connection->protocol_code : "NULL",
   new_connection->transport_code
   ? new_connection->transport_code : "NULL",
   new_connection->transport_connect_information ? 
new_connection->transport_connect_information
   : "NULL",
   new_connection->parameters ? new_connection->parameters : "NULL");
   #endif
   
   
   ```
   
   
   
   This code causes an error because of the inclusion of stdio.h in the middle 
of the unit:
   
   ```
   
   2 warnings generated.
   [  9%] Building C object spi/CMakeFiles/plc4c-spi.dir/src/subscribe.c.o
   [ 10%]
   Building C object spi/CMakeFiles/plc4c-spi.dir/src/system.c.o
   In file included from 
/Users/ottofowler/tmp/downloaded-plc4x-0.9.1rc2/0.9.1/rc2/apache-plc4x-0.9.1/plc4c/spi/src/system.c:298:
   
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include/stdio.h:260:54:
   error: function definition is not allowed here
   __header_always_inline int __sputc(int _c, FILE *_p)
   {
^
   1 error generated.
   make[2]: *** [spi/CMakeFiles/plc4c-spi.dir/src/system.c.o]
   Error 1
   make[1]: *** [spi/CMakeFiles/plc4c-spi.dir/all] Error 2
   make: *** [all] Error 2
   
   ```
   
   
   
   Section 7.1.2 Standard headers of the C standard says, in part:
   
   If used, a header shall be included outside of any external declaration or 
definition, and it shall first be included before the first reference to any of 
the functions or objects it declares, or to any of the types or macros it 
defines.
   
   So this isn't really right, I certainly don't think it is good practice in 
C.  
   
   We should hav two ifdef's one in the header section and one where the code is
   
   
   
   Imported from Jira 
[PLC4X-327](https://issues.apache.org/jira/browse/PLC4X-327). Original Jira may 
contain additional context.
   Reported by: otto.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #634: Multiple Items in ADS Read

2022-11-09 Thread GitBox


ottlukas opened a new issue, #634:
URL: https://github.com/apache/plc4x/issues/634

   Hi,
   
   For a POC I'am testing PLC4X with ADS/AMS PLC.  the PLC is a CX with twincat 
V2.11.0 (Build 2216) on it.
   
   So I made this test program with PLC4j (0.10.0_SNAPSHOT) to read 1 variable 
(BOOL).  This seems to work fine.  When I add a second variable (also BOOL) to 
the same request, I get an exception :
   
   Caused by: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds 
for length 0
       at com.github.jinahya.bit.io.ArrayByteInput.read(ArrayByteInput.java:106)
       at 
com.github.jinahya.bit.io.DefaultBitInput.read(DefaultBitInput.java:57)
       at 
com.github.jinahya.bit.io.AbstractBitInput.unsigned8(AbstractBitInput.java:63)
       at 
com.github.jinahya.bit.io.AbstractBitInput.unsigned16(AbstractBitInput.java:92)
       at 
com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:135)
       at 
com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:118)
       at 
com.github.jinahya.bit.io.AbstractBitInput.readLong(AbstractBitInput.java:156)
       at 
org.apache.plc4x.java.spi.generation.ReadBufferByteBased.readUnsignedLong(ReadBufferByteBased.java:190)
       at 
org.apache.plc4x.java.spi.generation.ReadBuffer.readUnsignedLong(ReadBuffer.java:74)
       at 
org.apache.plc4x.java.ads.protocol.AdsProtocolLogic.lambda$resolveMultipleSymbolicAddresses$65(AdsProtocolLogic.java:975)
       at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
       at 
org.apache.plc4x.java.ads.protocol.AdsProtocolLogic.lambda$resolveMultipleSymbolicAddresses$67(AdsProtocolLogic.java:972)
       at 
org.apache.plc4x.java.spi.Plc4xNettyWrapper.decode(Plc4xNettyWrapper.java:175)
       at 
io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81)
       at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
   
    
   
   Here is my code:
   
   String clientIp = "192.168.0.192";
   String sourceAmsNetId = "172.16.13.147.1.1";
   int sourceAmsPort = 65534;
   String targetAmsNetId = "192.168.0.184.1.1";
   int targetAmsPort = 801;
   String connectionString = 
String.format("ads:tcp://%s?sourceAmsNetId=%s&sourceAmsPort=%d&targetAmsNetId=%s&targetAmsPort=%d",
 plcIp, sourceAmsNetId, sourceAmsPort, targetAmsNetId, targetAmsPort);
   
   try (PlcConnection plcConnection = new 
PlcDriverManager().getConnection(connectionString)){
   if (!plcConnection.getMetadata().canSubscribe()) {
   logger.error("This connection doesn't support subscribing.");
   return;
   }
   // Send Read Request
   CompletableFuture requestFuture = 
plcConnection.readRequestBuilder()
   .addItem("value-1", ".OPC_bAuto_:BOOL")
   .addItem("value-2", ".OPC_bAuto_2:BOOL")
   .build()
   .execute();
   PlcReadResponse response = requestFuture.get();
   
    
   
     Any help would greatly be appreciated.  Thank you !
   
   Imported from Jira 
[PLC4X-333](https://issues.apache.org/jira/browse/PLC4X-333). Original Jira may 
contain additional context.
   Reported by: ThijsM.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #635: SocketCAN transport disconnections

2022-11-09 Thread GitBox


ottlukas opened a new issue, #635:
URL: https://github.com/apache/plc4x/issues/635

   SocketCAN transport can silently die due to swallowed exceptions:
   
   ```
   
   2022-02-16 18:28:11.134 [WARN ] [io.netty.channel.DefaultChannelPipeline] - 
An exceptionCaught() event
   was fired, and it reached at the tail of the pipeline. It usually means the 
last handler in the pipeline
   did not handle the exception.
   tel.schich.javacan.linux.LinuxNativeOperationException: Unable to read
   from the socket - errorNumber=100, errorMessage='Network is down'
       at tel.schich.javacan.SocketCAN.read(Native
   Method)
       at 
tel.schich.javacan.AbstractCanChannel.readSocket(AbstractCanChannel.java:160)
       at
   tel.schich.javacan.RawCanChannelImpl.readUnsafe(RawCanChannelImpl.java:82) 
       at 
org.apache.plc4x.java.transport.socketcan.netty.SocketCANChannel.lambda$doConnect$0(SocketCANChannel.java:118)
    
     at java.lang.Thread.run(Thread.java:834) [?:?]
   
   ```
   
   This error happened within an hour of application start so its most likely 
related to some CAN instability, however what's important is lack of proper 
handling of error. The connection in theory was still alive, however there was 
no data coming over it any more.
   
   Imported from Jira 
[PLC4X-334](https://issues.apache.org/jira/browse/PLC4X-334). Original Jira may 
contain additional context.
   Reported by: ldywicki.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #636: modbus connection causes memory leak

2022-11-09 Thread GitBox


ottlukas opened a new issue, #636:
URL: https://github.com/apache/plc4x/issues/636

   Note: The version is 0.9.1.
   
   1. The document 
(here)[https://plc4x.apache.org/users/protocols/modbus.html](https://plc4x.apache.org/users/protocols/modbus.html)
 seems wrong. It tells me the connection string format is: 
"modbus-tcp:tcp://127.0.0.1:502", but my test code throws exception saying no 
driver until I change it to "modbus://127.0.0.1".
   
   2. My test code writes (or reads) some value via modbus tcp every 1 second, 
using short tcp connection (open and close every time). The memory increases 
every second until out-of-memory. In process monitor I find the thread count 
increases 1 every time the connection opens, but never releases, althought I 
consider the `try-block` shall closes it automatically. In fact, I see it calls 
`connection.close` after the `try-block`.
   
   Test code:
   
   ```
   
           while (true) {
               String connectionString = "modbus://127.0.0.1";
               try
   (PlcConnection plcConnection = new 
PlcDriverManager().getConnection(connectionString)) {
            
         PlcWriteRequest.Builder builder = plcConnection.writeRequestBuilder();
                   builder.addItem("value-1",
   "holding-register:1:DINT", 3);
                   builder.addItem("value-2", "holding-register:3:REAL",
   3.14);
                   PlcWriteRequest writeRequest = builder.build();
                   PlcWriteResponse
   response = writeRequest.execute().get();
                   
                   for (String fieldName :
   response.getFieldNames()) {
                       if(response.getResponseCode(fieldName) == 
PlcResponseCode.OK)
   {
                           System.out.println("Value[" + fieldName + "]: 
updated");
                  
       }
   
                       // Something went wrong, to output an error message 
instead.
            
             else {
                           System.out.println("Error[" + fieldName + "]: " + 
response.getResponseCode(fieldName).name());
                       
}
                   }
                   System.out.println("done");
        
         }
               Thread.sleep(1000);
           }
   
   ```
   
   
   It shows the connection is not cleaned properly.
   
   I see it's more efficient to do this using long tcp connection (reuse 1 
connection or use a pool). But short tcp connection should also work.
   
   Imported from Jira 
[PLC4X-339](https://issues.apache.org/jira/browse/PLC4X-339). Original Jira may 
contain additional context.
   Reported by: liangjian.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #637: PLC4J GIP/CIP Read STRING tag returns null w/error

2022-11-09 Thread GitBox


ottlukas opened a new issue, #637:
URL: https://github.com/apache/plc4x/issues/637

   STRING tag reads in plc4j using eip are not returning the string.  The error 
returned is:
   
   java.lang.NullPointerException: Cannot invoke 
"org.apache.plc4x.java.api.value.PlcValue.getString()" because the return value 
of "org.apache.plc4x.java.api.messages.PlcReadResponse.getPlcValue(String)" is 
null
   
   It looks like plc4j is considering it a structure or array.  If I read with 
   ```
   
   %MyString[{index}]:STRING:1 
   ```
   
   I can get the individual characters in the string by placing the actual 
index in \{index}.  So it knows where to start reading the data from. 
   
   When running a wireshark cap, I can see the returned string in the response 
from the PLC.  Attached is a pcap of the transaction.
   
    
   
   Code Snippet:
   ```
   
   try (PlcConnection plcConnection = new 
PlcDriverManager().getConnection("eip://127.0.0.1")) {
      
   if (!plcConnection.getMetadata().canRead()) {
           logger.error("PLC connection doesn't support
   reading.");
           return;
       }
       logger.info("PLC connector connected");    // Create a new
   read request:
       PlcReadRequest.Builder builder = plcConnection.readRequestBuilder();
       logger.info("Created
   Builder");
       builder.addItem("value-1", "%MyString:STRING:1");
       PlcReadRequest readRequest =
   builder.build();    // Register a callback executed as soon as a response 
arrives.
       logger.info("Make
   sync request for PLC data");
       PlcReadResponse readResponse = readRequest.execute().get(5000, 
TimeUnit.MILLISECONDS);
    
     if (readResponse != null) {
           printPlcResponse(readResponse);
       } else {
           logger.error("An
   error reading PLC, response is NULL");
       }
   for (String field : readResponse.getFieldNames()){
   
  rtnArray.add(new PlcReadResponseData(field,
   readResponse.getPlcValue(field).getString())
   );  // Exception is thrown here
   }
   } catch (PlcConnectionException e) {
       e.printStackTrace(); 
     
   } 
   ```
   
    
   
   Imported from Jira 
[PLC4X-341](https://issues.apache.org/jira/browse/PLC4X-341). Original Jira may 
contain additional context.
   Reported by: AndyGPLC.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #638: Nifi with OPC UA don't perform

2022-11-09 Thread GitBox


ottlukas opened a new issue, #638:
URL: https://github.com/apache/plc4x/issues/638

   Hi All,
   
   We try to use the OPC UA driver through Nifi but the parsing/split of the 
address in Nifi don't match the PATTERN in class OpcuaField.
   
   We use the 0.9.1 version not available in affect verision list.
   
   Imported from Jira 
[PLC4X-340](https://issues.apache.org/jira/browse/PLC4X-340). Original Jira may 
contain additional context.
   Reported by: gvincebzh.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #639: s7 could not write CHAR array

2022-11-09 Thread GitBox


ottlukas opened a new issue, #639:
URL: https://github.com/apache/plc4x/issues/639

   ## Use case
   
   Writing CHAR array to S7 PLc via plc4x sink kafka connector was throwing an 
error, as is shown in the code snippet:
   ```
   
   "sinks.CommonPlcSetup.fields.steelGradeCurrent": "%DB851:136:CHAR[12]" 
   ```
   
   ## The error messages
   ```
   
   [2022-03-01 03:22:16,673] INFO Configuring Bootstrap with 
Configuration{local-rack=1, local-slot=1,
   remote-rack=0, remot-slot=5, pduSize=1024, maxAmqCaller=8, maxAmqCallee=8, 
controllerType='null'} (org.apache.plc4x.java.transport.tcp.TcpChannelFactory)
   [2022-03-01
   03:22:16,680] INFO S7 Driver running in ACTIVE mode. 
(org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic)
   [2022-03-01
   03:22:16,772] ERROR No DataTransportErrorCode for value 7 
(org.apache.plc4x.java.s7.readwrite.DataTransportErrorCode)
   [2022-03-01
   03:22:18,340] ERROR No DataTransportErrorCode for value 7 
(org.apache.plc4x.java.s7.readwrite.DataTransportErrorCode)
   [2022-03-01
   03:22:18,363] ERROR No DataTransportErrorCode for value 7 
(org.apache.plc4x.java.s7.readwrite.DataTransportErrorCode)
   [2022-03-01
   03:22:18,363] ERROR No DataTransportErrorCode for value 7 
(org.apache.plc4x.java.s7.readwrite.DataTransportErrorCode)
   
   ```
   
   ## Context
   
   This was working with version 0.9.0-SNAPSHOT, but my customized version 
could no longer be compiled on 0.9.0-SNAPSHOT, so I had to compile the the code 
against 0.10.0-SNAPSHOT
   
    
   
   Imported from Jira 
[PLC4X-338](https://issues.apache.org/jira/browse/PLC4X-338). Original Jira may 
contain additional context.
   Reported by: hadoop.jz.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #640: PLC4GO - Timeout during S7 Logo 8 Connection

2022-11-09 Thread GitBox


ottlukas opened a new issue, #640:
URL: https://github.com/apache/plc4x/issues/640

   Might be a user-error like in PLC4X-346 but I'm not sure. 
   
   When connection to local Siemens LOG 8 via ConnectionString "
   s7://192.168.0.3" the connection request fails after several seconds with 
timeout error.
!image-2022-06-29-01-21-25-289.png! 
   [.]
!image-2022-06-29-01-19-31-144.png!
   
   I'm using the Go example setup. I double checked if the Logo is reachable by 
connecting via NodeJS lib to it & for sure I tried reconfiguring the rack/slot 
options. 
   
   Happy to provide more information if needed.
   
   Imported from Jira 
[PLC4X-348](https://issues.apache.org/jira/browse/PLC4X-348). Original Jira may 
contain additional context.
   Reported by: Vormweg.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #642: OPC UA silently fails to handle subscription response

2022-11-09 Thread GitBox


ottlukas opened a new issue, #642:
URL: https://github.com/apache/plc4x/issues/642

   While test of OPC UA simulator coming from freeopcua I found out that our 
client doesn't work with it. Maybe it is an issue of how they encode payload, 
maybe it is inconsistency in the spec, not sure - the end result is that actual 
response processing error gets swallowed and driver hangs.
   
   Guilty code is in `OpcuaSubscriptionHandle`:
   ```
   
   for (MonitoredItemCreateResult result : 
responseMessage.getResults().toArray(new MonitoredItemCreateResult[0]))
   {
   if (OpcuaStatusCode.enumForValue(result.getStatusCode().getStatusCode()) 
!= OpcuaStatusCode.Good)
   {
   LOGGER.error("Invalid Field {}, subscription created without this 
field", fieldNames.get((int)
   result.getMonitoredItemId()));
   } else {
   LOGGER.debug("Field {} was added to the subscription",
   fieldNames.get((int) result.getMonitoredItemId() - 1)); // !monitored item 
id might be inconsistent!
   
  }
   }
   
   ```
   
   
   Copy of traffic causing issue in attachment.
   
   Imported from Jira 
[PLC4X-342](https://issues.apache.org/jira/browse/PLC4X-342). Original Jira may 
contain additional context.
   Reported by: ldywicki.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #641: Read coil request throws java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

2022-11-09 Thread GitBox


ottlukas opened a new issue, #641:
URL: https://github.com/apache/plc4x/issues/641

   Run hello-world-plc4x java example with cli options:
   ```
   
   --field-addresses 02084 
   ```
   
   Throws exception:
   ```
   
   io.netty.handler.codec.DecoderException: 
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds
   for length 1
       at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:98)
    
     at 
io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
       at
   
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    
     at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
      
   at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299)
       at 
io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    
     at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    
     at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
       at
   
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
      
   at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
       at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
    
     at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
    
     at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
    
     at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
       at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    
     at java.base/java.lang.Thread.run(Thread.java:829)
   Caused by: java.lang.ArrayIndexOutOfBoundsException:
   Index 1 out of bounds for length 1
       at com.github.jinahya.bit.io.ArrayByteInput.read(ArrayByteInput.java:106)
    
     at com.github.jinahya.bit.io.DefaultBitInput.read(DefaultBitInput.java:57)
       at 
com.github.jinahya.bit.io.AbstractBitInput.unsigned8(AbstractBitInput.java:63)
    
     at 
com.github.jinahya.bit.io.AbstractBitInput.unsigned16(AbstractBitInput.java:92)
       at 
com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:135)
    
     at 
org.apache.plc4x.java.spi.generation.ReadBufferByteBased.readUnsignedInt(ReadBufferByteBased.java:174)
    
     at 
org.apache.plc4x.java.modbus.readwrite.DataItem.staticParse(DataItem.java:51)
       at 
org.apache.plc4x.java.modbus.base.protocol.ModbusProtocolLogic.readBooleanList(ModbusProtocolLogic.java:328)
    
     at 
org.apache.plc4x.java.modbus.base.protocol.ModbusProtocolLogic.toPlcValue(ModbusProtocolLogic.java:232)
    
     at 
org.apache.plc4x.java.modbus.tcp.protocol.ModbusTcpProtocolLogic.lambda$read$2(ModbusTcpProtocolLogic.java:104)
    
     at 
org.apache.plc4x.java.spi.Plc4xNettyWrapper.decode(Plc4xNettyWrapper.java:175)
       at 
io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81)
    
     at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
    
     ... 23 common frames omitted 
   ```
   
   It is working fine on release 0.9.1
   
   Imported from Jira 
[PLC4X-345](https://issues.apache.org/jira/browse/PLC4X-345). Original Jira may 
contain additional context.
   Reported by: mohammaduvez.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #643: PLC4X-Connection terminated by remote

2022-11-09 Thread GitBox


ottlukas opened a new issue, #643:
URL: https://github.com/apache/plc4x/issues/643

   Jul 22, 2022 10:15:16 AM io.netty.channel.DefaultChannelPipeline 
onUnhandledInboundException
   WARNING: An exceptionCaught() event was fired, and it reached at the tail of 
the pipeline. It usually means the last handler in the pipeline did not handle 
the exception.
   java.io.IOException: Connection reset by peer
       at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
       at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
       at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276)
       at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:233)
       at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:223)
       at 
java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:356)
       at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253)
       at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
       at 
io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350)
       at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
       at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
       at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
       at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
       at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
       at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
       at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
       at java.base/java.lang.Thread.run(Thread.java:829)
   
   Exception in thread "main" 
org.apache.plc4x.java.api.exceptions.PlcConnectionException: 
java.util.concurrent.ExecutionException: 
org.apache.plc4x.java.api.exceptions.PlcIoException: Connection terminated by 
remote
       at 
org.apache.plc4x.java.spi.connection.DefaultNettyPlcConnection.connect(DefaultNettyPlcConnection.java:142)
       at 
org.apache.plc4x.java.PlcDriverManager.getConnection(PlcDriverManager.java:74)
       at 
org.apache.plc4x.java.examples.enip.test.EnipExample.main(EnipExample.java:26)
   Caused by: java.util.concurrent.ExecutionException: 
org.apache.plc4x.java.api.exceptions.PlcIoException: Connection terminated by 
remote
       at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
       at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
       at 
org.apache.plc4x.java.spi.connection.DefaultNettyPlcConnection.connect(DefaultNettyPlcConnection.java:133)
       ... 2 more
   Caused by: org.apache.plc4x.java.api.exceptions.PlcIoException: Connection 
terminated by remote
       at 
org.apache.plc4x.java.spi.connection.DefaultNettyPlcConnection.lambda$connect$1(DefaultNettyPlcConnection.java:124)
       at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
       at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552)
       at 
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
       at 
io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
       at 
io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605)
       at 
io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
       at 
io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
       at 
io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:1182)
       at 
io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:773)
       at 
io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:749)
       at 
io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:620)
       at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.closeOnRead(AbstractNioByteChannel.java:105)
       at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.handleReadException(AbstractNioByteChannel.java:130)
       at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:177)
       at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
       at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
       at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
       at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
       at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
       at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
       at 
io.netty.util.

[GitHub] [plc4x] ottlukas opened a new issue, #645: pvs-studio report

2022-11-09 Thread GitBox


ottlukas opened a new issue, #645:
URL: https://github.com/apache/plc4x/issues/645

   ||Date:|10/16/22 12:00:11|
   ||PVS-Studio Version:|7.21.64848.1|
   ||Total Warnings (GA):|215|
   
   https://www.fly-server.ru/pvs-studio/java-plc4x/
   
   Imported from Jira 
[PLC4X-356](https://issues.apache.org/jira/browse/PLC4X-356). Original Jira may 
contain additional context.
   Reported by: pavel-pimenov.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #644: Issue with Modbus Write -- PLC Connection Exception: Error Creating Channel

2022-11-09 Thread GitBox


ottlukas opened a new issue, #644:
URL: https://github.com/apache/plc4x/issues/644

   Hi!
    
   Thanks for supporting this library.
    
   I'd like to seek your advice on an issue I'm having surrounding *writing* to 
Modbus registers.
    
   I have a code snippet as follows:
    
   !image-2022-05-30-13-31-56-320.png!
    
   I'm able to make about ~100 requests successfully, until I encounter a`{{` 
PLC Connection Exception: Error creating channel error{}}}. This is consistent 
with multiple tries.
    
   *I've tried using `{}CachedDriverManagers / PooledDriverManagers{`}, but 
this will result in a NullPointerException when I tried to use its 
`{}PlcConnection object to create a PlcWriteRequest.Builder{`}. Essentially, 
the "builder" object is null:*
    
   !mb2.png!
    
   *However, I'm able to create `{}PlcReadRequest builders for reading data; no 
NullPointerExceptions{`}:*
    
   This is how I'm creating the `{}CachedDriverManager{`}:
    
   !mb3.png!
    
   I've noticed that I will never encounter a maximum buffer limit reached for 
connections created from the `{}CachedDriverManager{`}, used to make Modbus 
read requests. Hence, I considered using connections created from the 
CachedDriverManger to make Modbus write requests, __however I get a 
NullPointerException whenever I try to create a PlcWriteRequest.Builder object 
from CachedDriverManager__.
    
   Hope you could help point me in the right direction, been stuck at this for 
a couple of days.
    
   Thanks!
   Regards,
   Max
    
   
   Imported from Jira 
[PLC4X-343](https://issues.apache.org/jira/browse/PLC4X-343). Original Jira may 
contain additional context.
   Reported by: maxtan.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #646: NettyChannelFactory.closeEventLoopForChannel never returns

2022-11-09 Thread GitBox


ottlukas opened a new issue, #646:
URL: https://github.com/apache/plc4x/issues/646

   I'm polling a modbus device over a RS485 serial connection:
   ```
   
   ... 
connectionString":"modbus-rtu:serial:///dev/ttyAMA2?BAUD_RATE=19200&STOP_BITS=1&PARITY=EVEN&unit-identifier=1"
   
   ...
   "sources. ... .pollReturnInterval": 5000, 
   "jobs. ... .interval": 2000,
   ```
   
   It works for a few minutes and then:
   ```
   
   [2022-10-28 17:20:50,239] WARN [conveyor12source|task-0] Request finished 
with exception. Reporting
   Connection as Broken 
(org.apache.plc4x.java.utils.connectionpool2.CachedPlcConnection:203)
   java.util.concurrent.CancellationException
    
         at 
java.base/java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:2396)
        
     at 
org.apache.plc4x.java.utils.connectionpool2.CachedPlcConnection.lambda$wrapReadWithTimeout$1(CachedPlcConnection.java:105)
    
         at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          
   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    
         at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    
         at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    
         at java.base/java.lang.Thread.run(Thread.java:829)
   [2022-10-28 17:20:50,603] INFO [conveyor12source|task-0]
   Channel is closed, closing worker Group also 
(org.apache.plc4x.java.spi.connection.NettyChannelFactory:150)
   [2022-10-28
   17:20:50,614] INFO [conveyor12source|task-0] Worker Group was closed 
successfully! (org.apache.plc4x.java.spi.connection.NettyChannelFactory:155)
   [2022-10-28
   17:20:50,625] WARN [conveyor12source|task-0] Selector.select() returned 
prematurely 512 times in a row;
   rebuilding Selector 
org.apache.plc4x.java.transport.serial.SerialPollingSelector@1a6dc4ab. 
(io.netty.channel.nio.NioEventLoop:628)
   [2022-10-28
   17:20:50,626] INFO [conveyor12source|task-0] Migrated 1 channel(s) to the 
new Selector. (io.netty.channel.nio.NioEventLoop:499)
   [2022-10-28
   17:20:50,637] WARN [conveyor12source|task-0] Selector.select() returned 
prematurely 512 times in a row;
   rebuilding Selector 
org.apache.plc4x.java.transport.serial.SerialPollingSelector@2107b3db. 
(io.netty.channel.nio.NioEventLoop:628)
   
   ```
   
   The Migrated 1 channel(s) and Selector.select() log entires continues 
endless.
   
   I've found that the call in NettyChannelFactory to:
   ```
   
   @Override    
   public void closeEventLoopForChannel(Channel channel) {
           if (eventLoops.containsKey(channel))
   {
               logger.info("Channel is closed, closing worker Group also");
               EventLoopGroup
   eventExecutors = eventLoops.get(channel);
               eventLoops.remove(channel);
               eventExecutors.shutdownGracefully().awaitUninterruptibly();
    
             logger.info("Worker Group was closed successfully!");
           } else {
               logger.warn("Trying
   to remove EventLoop for Channel {} but have none stored", channel);
           }
       } 
   ```
   
   eventExecutors.shutdownGracefully() never returns even though the above log 
indicates it did. I've changed the call to:
   ```
   
   eventExecutors.shutdownGracefully().addListener(e->{ 
LoggerFactory.getLogger(NettyChannelFactory.class).info("closeEventLoopForChannel:
   Worker group finally shut down"); } ); 
   ```
   
   in an attempt to eliminate any possible deadlocking.
   
   Any suggestions would be much appreciated.
   
    
   
   Imported from Jira 
[PLC4X-358](https://issues.apache.org/jira/browse/PLC4X-358). Original Jira may 
contain additional context.
   Reported by: Kielsholm.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #648: roll back configurate dynamic properties

2022-11-09 Thread GitBox


ottlukas opened a new issue, #648:
URL: https://github.com/apache/plc4x/issues/648

   Nifi integration has been pleasantly addressed in version 0.10.
   Adding a record writer to the source processor is golden.
   
   Unfortunately, the configuration has been changed, and the values to be read 
must be completed with dynamic properties.
   In the previous version, there was a text field (PLC resource address 
String) where you could simply complete all the addresses to be read out.
   
   Would it be possible to reverse this?  I have a project where I need to read 
out a lot of values via S7, adding this in NiFi now is endless work.
   
   Imported from Jira 
[PLC4X-357](https://issues.apache.org/jira/browse/PLC4X-357). Original Jira may 
contain additional context.
   Reported by: lintermans.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #647: Unsuported transport javacan/socketcan/virtualcan/

2022-11-09 Thread GitBox


ottlukas opened a new issue, #647:
URL: https://github.com/apache/plc4x/issues/647

   (Linux) When I try to connect the can device, the default javacan, 
socketcan, and can transmissions all prompt that they are not supported. But I 
can use the example of s7 normally. I don't know where the problem makes 
unsupported transport socketscan.
   
   !image-2022-10-11-10-15-00-405.png!
   
   !image-2022-10-11-10-15-43-100.png!
   
   !image-2022-10-11-10-16-25-869.png!
   
    
   
   Imported from Jira 
[PLC4X-355](https://issues.apache.org/jira/browse/PLC4X-355). Original Jira may 
contain additional context.
   Reported by: 466787806.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas opened a new issue, #649: The modbus rtu loop reads a large amount of data, causing a half packet problem

2022-11-09 Thread GitBox


ottlukas opened a new issue, #649:
URL: https://github.com/apache/plc4x/issues/649

   ```
   
   2022-10-29 00:09:21.362  WARN   --- [ntLoopGroup-2-1] 
.p.j.s.GeneratedDriverByteToMessageCodec : Error
   decoding package with content 
[0103c80fea0fe40fdf00]:
   Index 180 out of bounds for length 
180java.lang.ArrayIndexOutOfBoundsException: Index 180 out of bounds
   for length 180
       at com.github.jinahya.bit.io.ArrayByteInput.read(ArrayByteInput.java:106)
       at
   com.github.jinahya.bit.io.DefaultBitInput.read(DefaultBitInput.java:57)
       at 
com.github.jinahya.bit.io.AbstractBitInput.unsigned8(AbstractBitInput.java:63)
    
     at 
com.github.jinahya.bit.io.AbstractBitInput.unsigned16(AbstractBitInput.java:92)
       at 
com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:135)
    
     at 
com.github.jinahya.bit.io.AbstractBitInput.readInt(AbstractBitInput.java:118)
       at 
com.github.jinahya.bit.io.AbstractBitInput.readByte(AbstractBitInput.java:106)
    
     at 
org.apache.plc4x.java.spi.generation.ReadBufferByteBased.readSignedByte(ReadBufferByteBased.java:235)
    
     at 
org.apache.plc4x.java.spi.generation.ReadBuffer.readByte(ReadBuffer.java:44)
       at 
org.apache.plc4x.java.spi.generation.ReadBufferByteBased.readByteArray(ReadBufferByteBased.java:126)
    
     at 
org.apache.plc4x.java.modbus.readwrite.ModbusPDUReadHoldingRegistersResponse.staticParseBuilder(ModbusPDUReadHoldingRegistersResponse.java:112)
    
     at 
org.apache.plc4x.java.modbus.readwrite.ModbusPDU.staticParse(ModbusPDU.java:173)
       at 
org.apache.plc4x.java.modbus.readwrite.ModbusRtuADU.lambda$staticParseBuilder$0(ModbusRtuADU.java:135)
    
     at 
org.apache.plc4x.java.spi.codegen.io.DataReaderComplexDefault.read(DataReaderComplexDefault.java:70)
    
     at 
org.apache.plc4x.java.spi.codegen.io.DataReaderComplexDefault.read(DataReaderComplexDefault.java:61)
    
     at 
org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple.lambda$readSimpleField$0(FieldReaderSimple.java:34)
    
     at 
org.apache.plc4x.java.spi.codegen.FieldCommons.switchParseByteOrderIfNecessary(FieldCommons.java:69)
    
     at 
org.apache.plc4x.java.spi.codegen.fields.FieldReaderSimple.readSimpleField(FieldReaderSimple.java:34)
    
     at 
org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.readSimpleField(FieldReaderFactory.java:129)
    
     at 
org.apache.plc4x.java.modbus.readwrite.ModbusRtuADU.staticParseBuilder(ModbusRtuADU.java:132)
    
     at 
org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:121)
       at 
org.apache.plc4x.java.modbus.readwrite.ModbusADU.staticParse(ModbusADU.java:106)
    
     at 
org.apache.plc4x.java.modbus.rtu.ModbusRtuDriver.lambda$getStackConfigurer$0(ModbusRtuDriver.java:107)
    
     at 
org.apache.plc4x.java.spi.GeneratedDriverByteToMessageCodec.decode(GeneratedDriverByteToMessageCodec.java:87)
    
     at 
io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)
       at 
io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510)
    
     at 
io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449)
       at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
    
     at 
io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)
       at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    
     at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    
     at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    
     at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
       at
   
org.apache.plc4x.java.transport.serial.SerialChannel$SerialNioUnsafe.read(SerialChannel.java:289)
    
     at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
       at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:623)
    
     at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:586)
       at io.netty.channel.

[GitHub] [plc4x] ottlukas closed issue #633: with-c doesn't build on macOS

2022-11-09 Thread GitBox


ottlukas closed issue #633: with-c doesn't build on macOS
URL: https://github.com/apache/plc4x/issues/633


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] ottlukas commented on issue #633: with-c doesn't build on macOS

2022-11-09 Thread GitBox


ottlukas commented on issue #633:
URL: https://github.com/apache/plc4x/issues/633#issuecomment-1308553801

   [Thomas Frost]
   its fixed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] FernandoDorado commented on issue #627: Modbus - Kafka does not close the connections

2022-11-11 Thread GitBox


FernandoDorado commented on issue #627:
URL: https://github.com/apache/plc4x/issues/627#issuecomment-1311906728

   Hello Ben, 
   
   Thanks a lot for moving forward with this issue. However, I'm not working in 
Idener (where we have this problem) right now. My colleagues @lidiapb and 
@DanielGarciaGuirao are still working on this, in case they can take a look at 
this problem again
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] x-em opened a new issue, #653: The data returned from the slave station takes a bit-by-bit value.

2022-11-14 Thread GitBox


x-em opened a new issue, #653:
URL: https://github.com/apache/plc4x/issues/653

   If the register is an input register or a hold register type, the data type 
is UINT (uint 16). In fact, the real project scenario represents values by 
specific bits, for example, each bit represents a switch state or alarm state. 
My idea is that this kind of data should be represented by a coil, but in fact, 
many project equipment take the actual value in this bitwise way, so I want to 
know if there is a better way to solve the problem besides forcing a method to 
do bit conversion to get the desired value.
   
   example:
   ![modbus-bit 
drawio](https://user-images.githubusercontent.com/12546949/201705142-8d5208b2-ba5d-406a-9622-8385950c413a.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] hutcheb commented on issue #653: [driver modbus] The data returned from the slave station takes a bit-by-bit value.

2022-11-14 Thread GitBox


hutcheb commented on issue #653:
URL: https://github.com/apache/plc4x/issues/653#issuecomment-1314046246

   Hi x-em,
   
   Handling of Bit Strings is in a bit of state of flux as there is a push to 
get all the drivers returning exactly the same types.
   
   However, for the Modbus driver you can use the format 41:BOOL[16] to 
return a list of booleans.
   
   Ben


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] dremsol commented on issue #605: Reading long Int Array

2022-11-14 Thread GitBox


dremsol commented on issue #605:
URL: https://github.com/apache/plc4x/issues/605#issuecomment-1314117437

   Confirming this bug is still present in v0.10.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] chrisdutz commented on issue #605: Reading long Int Array

2022-11-14 Thread GitBox


chrisdutz commented on issue #605:
URL: https://github.com/apache/plc4x/issues/605#issuecomment-1314294776

   From the REAL[400] I can see that this one tag would consume more space than 
fits in one S7 packet for most PLC models.
   I did implement the query optimizer to automatically split the request into 
multiple ones, however I haven't implemented a real query rewriting. So if you 
had for example tried reading 400 individual REAL fields (Or a number of 
smaller arrays ... where each fits into one packet) the driver would have split 
it up into multiple requests. However this "rewrite" logic we always wanted to 
handle in a generic way to use in all drivers, but the volunteers that 
prommised to do so never did. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] zhouzaihang commented on issue #623: Modbus TCP Timeout not working. NIFI Processor Task gets stuck

2022-11-14 Thread GitBox


zhouzaihang commented on issue #623:
URL: https://github.com/apache/plc4x/issues/623#issuecomment-1314642476

   +1.
   plc4go has same bug.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] x-em commented on issue #653: [driver modbus] The data returned from the slave station takes a bit-by-bit value.

2022-11-14 Thread GitBox


x-em commented on issue #653:
URL: https://github.com/apache/plc4x/issues/653#issuecomment-1314714381

   Thank you, ben. I will convert it separately on the program. Thank you, 
chrisdutz, for your hint.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] x-em closed issue #653: [driver modbus] The data returned from the slave station takes a bit-by-bit value.

2022-11-14 Thread GitBox


x-em closed issue #653: [driver modbus] The data returned from the slave 
station takes a bit-by-bit value.
URL: https://github.com/apache/plc4x/issues/653


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] dremsol commented on issue #605: Reading long Int Array

2022-11-16 Thread GitBox


dremsol commented on issue #605:
URL: https://github.com/apache/plc4x/issues/605#issuecomment-1317172717

   Actually I tried with an array of WORD[400]. Splitting the 
readRequestBuilder into 4 arrays of WORD[100] works perfectly fine.
   ```
   PlcReadRequest.Builder builder = plcConnection.readRequestBuilder();
   builder.addItem("value-alarm1", "%DB1:0:WORD[100]");
   builder.addItem("value-alarm2", "%DB1:64:WORD[100]");
   builder.addItem("value-alarm3", "%DB1:128:WORD[100]");
   ```
   
   So I'm doing manually what the `spi.optimizer.SingleTagOptimizer` should do 
automatically. If I understand correctly this needs to be implemented on the S7 
driver level just as has been done for the modbus driver?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] dremsol opened a new issue, #659: Kafka on-change/hysteresis support

2022-11-18 Thread GitBox


dremsol opened a new issue, #659:
URL: https://github.com/apache/plc4x/issues/659

   Currently the Kafka Connect integration supports polling-based data 
acquisition. This results in duplicate messages when values don't change. 
Although some drivers support subscription not all devices seem to support it 
so a general implementation seems to be infeasible. What would be the best 
approach to on-change/hysteresis support in the Kafka integration?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] hutcheb commented on issue #659: Kafka on-change/hysteresis support

2022-11-18 Thread GitBox


hutcheb commented on issue #659:
URL: https://github.com/apache/plc4x/issues/659#issuecomment-1320030863

   Hi Willem,
   
   Each driver has the canRead, canWrite and canSubscribe attributes, these
   can be used to decide between using a subscription based connection and a
   read connection. I'm not 100% sure where to put this logic though,
   somewhere within the Scraper?
   
   Ben
   
   On Fri, Nov 18, 2022 at 7:40 AM Willem Remie ***@***.***>
   wrote:
   
   > Currently the Kafka Connect integration supports polling-based data
   > acquisition. This results in duplicate messages when values don't change.
   > Although some drivers support subscription not all devices seem to support
   > it so a general implementation seems to be infeasible. What would be the
   > best approach to on-change/hysteresis support in the Kafka integration?
   >
   > —
   > Reply to this email directly, view it on GitHub
   > , or unsubscribe
   > 

   > .
   > You are receiving this because you are subscribed to this thread.Message
   > ID: ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] dremsol commented on issue #626: java.lang.ClassCastException: DefaultPlcSubscriptionField cannot be cast to class OpcuaField

2022-11-18 Thread GitBox


dremsol commented on issue #626:
URL: https://github.com/apache/plc4x/issues/626#issuecomment-1320241346

   I have a similar error using `0.10.0` and S7 driver
   ```
   [main] INFO org.apache.plc4x.java.PlcDriverManager - Instantiating new PLC 
Driver Manager with class loader 
jdk.internal.loader.ClassLoaders$AppClassLoader@5cb0d902
   [main] INFO org.apache.plc4x.java.PlcDriverManager - Registering available 
drivers...
   [main] INFO org.apache.plc4x.java.PlcDriverManager - Registering driver for 
Protocol s7 (Siemens S7 (Basic))
   [main] INFO org.apache.plc4x.java.transport.tcp.TcpChannelFactory - 
Configuring Bootstrap with Configuration{local-rack=1, local-slot=1, 
local-tsap=0, remote-rack=0, remote-slot=0, remote-tsap=0, pduSize=1024, 
maxAmqCaller=8, maxAmqCallee=8, controllerType='null'}
   [nioEventLoopGroup-2-1] INFO 
org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic - S7 Driver running 
in ACTIVE mode.
   [main] INFO org.apache.plc4x.java.spi.connection.NettyChannelFactory - 
Channel is closed, closing worker Group also
   EventDispacher Bye!
   ObjectProcessor Bye!
   [main] INFO org.apache.plc4x.java.spi.connection.NettyChannelFactory - 
Worker Group was closed successfully!
   Exception in thread "main" java.lang.ClassCastException: class 
org.apache.plc4x.java.s7.readwrite.field.S7Field cannot be cast to class 
org.apache.plc4x.java.s7.readwrite.field.S7SubscriptionField 
(org.apache.plc4x.java.s7.readwrite.field.S7Field and 
org.apache.plc4x.java.s7.readwrite.field.S7SubscriptionField are in unnamed 
module of loader 'app')
   at 
org.apache.plc4x.java.s7.readwrite.protocol.S7ProtocolLogic.subscribe(S7ProtocolLogic.java:341)
   at 
org.apache.plc4x.java.spi.optimizer.BaseOptimizer.lambda$optimizedSubscribe$4(BaseOptimizer.java:120)
   at 
org.apache.plc4x.java.spi.optimizer.BaseOptimizer.send(BaseOptimizer.java:138)
   at 
org.apache.plc4x.java.spi.optimizer.BaseOptimizer.optimizedSubscribe(BaseOptimizer.java:120)
   at 
org.apache.plc4x.java.spi.connection.AbstractPlcConnection.subscribe(AbstractPlcConnection.java:183)
   at 
org.apache.plc4x.java.spi.messages.DefaultPlcSubscriptionRequest.execute(DefaultPlcSubscriptionRequest.java:66)
   at 
io.drebble.playground.Plc4xSubscription.run(Plc4xSubscription.java:39)
   at 
io.drebble.playground.Plc4xSubscription.main(Plc4xSubscription.java:68)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] chrisdutz commented on issue #659: Kafka on-change/hysteresis support

2022-11-18 Thread GitBox


chrisdutz commented on issue #659:
URL: https://github.com/apache/plc4x/issues/659#issuecomment-1320324456

   We also have thought of implementing some "fake subscription" support based 
on polling, if a driver doesn't directly support subscriptions. However nobody 
ever volunteered to take on this action ... am I hearing a volunteer? ;-)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] isfangmk opened a new issue, #663: plc4j-Write a value to the coil, and the result is INVALID_ ADDRESS

2022-11-20 Thread GitBox


isfangmk opened a new issue, #663:
URL: https://github.com/apache/plc4x/issues/663

   On version 0.10.0, when testing modbus protocol, write a value to the coil, 
and the result is INVALID_ ADDRESS. However, it is normal to test the 
read/write function of the holding register.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] chrisdutz commented on issue #663: plc4j-Write a value to the coil, and the result is INVALID_ ADDRESS

2022-11-20 Thread GitBox


chrisdutz commented on issue #663:
URL: https://github.com/apache/plc4x/issues/663#issuecomment-1321578580

   Well ... I have no Idea what type of address you used. From the release 
notes I can see that the modbus driver changed it's connection string. This is 
now "modbus-tcp" and no longer "modbus", as we've added "modbus-rtu" and 
"modbus-ascii" as additional flavors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] nmgwr commented on issue #664: S7-200 is not supported?

2022-11-21 Thread GitBox


nmgwr commented on issue #664:
URL: https://github.com/apache/plc4x/issues/664#issuecomment-1322252461

   The Java version of the driver I use


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] chrisdutz commented on issue #664: S7-200 is not supported?

2022-11-21 Thread GitBox


chrisdutz commented on issue #664:
URL: https://github.com/apache/plc4x/issues/664#issuecomment-1322254463

   Well we don't have anyone with such a device. Theoretically it should be 
possible to extend an S7 200 with an ethernet module, however I guess nobody 
has ever tested it with that. So in the classical sense: No it's not supported, 
but it might work. So please just give it a try.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] heyoulin commented on issue #664: S7-200 is not supported?

2022-11-21 Thread GitBox


heyoulin commented on issue #664:
URL: https://github.com/apache/plc4x/issues/664#issuecomment-1322925451

   try my fork:  https://github.com/spnettec/plc4x


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] heyoulin commented on issue #646: NettyChannelFactory.closeEventLoopForChannel never returns

2022-11-21 Thread GitBox


heyoulin commented on issue #646:
URL: https://github.com/apache/plc4x/issues/646#issuecomment-1322927009

   try my fork: https://github.com/spnettec/plc4x


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] chrisdutz commented on issue #664: S7-200 is not supported?

2022-11-21 Thread GitBox


chrisdutz commented on issue #664:
URL: https://github.com/apache/plc4x/issues/664#issuecomment-1323064310

   Anything in that firm, that you would like to contribute back to the 
project? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] chrisdutz commented on issue #646: NettyChannelFactory.closeEventLoopForChannel never returns

2022-11-21 Thread GitBox


chrisdutz commented on issue #646:
URL: https://github.com/apache/plc4x/issues/646#issuecomment-1323065853

   Anything in that fork, that you would like to contribute back to the 
project? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] johanngil opened a new issue, #667: "Unable to Close 'broken' Connection" when extracting data from Rockwell PLC 1756-EN2T

2022-11-23 Thread GitBox


johanngil opened a new issue, #667:
URL: https://github.com/apache/plc4x/issues/667

   Dear community, 
   With a recent (from Friday last week) build from PLC4X 0.11.0-SNAPSHOT 
(https://github.com/apache/plc4x/tree/logix_develop) we connected our Kafka 
environment through the PLC4X connector to our Rockwell PLC of type 1756-EN2T 
to extract data from the PLC. We used the following properties settings:
   {
   "connector.class": "org.apache.plc4x.kafka.Plc4xSourceConnector",
   "tasks.max": "1",
 "default.topic": "DefaultTopic",
   "sources": "MHSLineTakeway",
   "sources.MHSLineTakeway.connectionString": "opcua:tcp://143.21.40.239:44818",
   "sources.MHSLineTakeway.pollReturnInterval": "5000",
   "sources.MHSLineTakeway.bufferSize": "1000",
   "sources.MHSLineTakeway.jobReferences": "data-acquisition",
   "sources.MHSLineTakeway.jobReferences.data-acquisition.topic": 
"data-acquisition-topic",
   "jobs": "data-acquisition",
   "jobs.data-acquisition.interval": "100",
   "jobs.data-acquisition.fields": "stsmessageid",
   "jobs.data-acquisition.fields.stsmessageid": 
"PRIME_SSB_IO/STS_TRIGGERID",
   "bootstrap.servers": "localhost:9092",
   "jobs.data-acquisition.tags": "stsmessageid",
   "jobs.data-acquisition.tags.stsmessageid": 
"PRIME_SSB_IO/STS_TRIGGERID:INT"
   }
   
   These resulted in the below error (attached the entire log file):
   C[2022-11-23 08:21:50,517] DEBUG [mhs-linetakeway-source|task-0] Connection 
was detected as broken and is invalidated in Cached Manager 
(org.apache.plc4x.java.utils.connectionpool2.CachedDriverManager:127)
   [2022-11-23 08:21:50,518] WARN [mhs-linetakeway-source|task-0] Broken 
Connection was returned, although it is not borrowed, currently. 
(org.apache.plc4x.java.utils.connectionpool2.CachedDriverManager:132)
   [2022-11-23 08:21:50,518] DEBUG [mhs-linetakeway-source|task-0] Unable to 
Close 'broken' Connection 
(org.apache.plc4x.java.utils.connectionpool2.CachedDriverManager:138)
   java.lang.NullPointerException
   
   Do you know what the root cause of the problem is? Thank you for any 
assistance!
   
[trace_connect_error.txt](https://github.com/apache/plc4x/files/10074752/trace_connect_error.txt)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] modraedlau commented on issue #568: (plc4j opcua driver) Unable to read when node id contains unicode characters

2022-11-23 Thread GitBox


modraedlau commented on issue #568:
URL: https://github.com/apache/plc4x/issues/568#issuecomment-1324966843

   I submitted a pull request:[fix(plc4j/opcua): not to get String.length but 
to calculate length in...](https://github.com/apache/plc4x/pull/668)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] hutcheb commented on issue #667: "Unable to Close 'broken' Connection" when extracting data from Rockwell PLC 1756-EN2T

2022-11-23 Thread GitBox


hutcheb commented on issue #667:
URL: https://github.com/apache/plc4x/issues/667#issuecomment-1325345973

   Hi johanngil,
   
   That's awesome that you built the logix_develop branch :) It looks as though 
you are trying to use the opcua driver to communicate with it.
   
   The connection string will be something like 
"logix:tcp://143.21.40.239:44818?backplane=1&slot=1"
   
   I haven't spent a lot of time on the reading UDT's but the general format of 
the address will be PRIME_SSB_IO.STS_TRIGGERID:INT
   
   Ben


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] hutcheb commented on issue #667: "Unable to Close 'broken' Connection" when extracting data from Rockwell PLC 1756-EN2T

2022-11-23 Thread GitBox


hutcheb commented on issue #667:
URL: https://github.com/apache/plc4x/issues/667#issuecomment-1325350400

   Sorry, also just realized I gave you bad information, it is the eip_update 
branch that is more up to date.
   
   https://github.com/apache/plc4x/pull/405


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [plc4x] modraedlau closed issue #568: (plc4j opcua driver) Unable to read when node id contains unicode characters

2022-11-23 Thread GitBox


modraedlau closed issue #568: (plc4j opcua driver) Unable to read when node id 
contains unicode characters
URL: https://github.com/apache/plc4x/issues/568


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



  1   2   >