You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by GitBox <gi...@apache.org> on 2022/11/09 10:19:57 UTC
[GitHub] [plc4x] ottlukas opened a new issue, #609: [S7] Implement connection closing for S7 protocol
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-unsubscribe@plc4x.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [S7] Implement connection closing for S7 protocol
Posted by "chrisdutz (via GitHub)" <gi...@apache.org>.
chrisdutz closed issue #609: [S7] Implement connection closing for S7 protocol
URL: https://github.com/apache/plc4x/issues/609
--
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-unsubscribe@plc4x.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [S7] Implement connection closing for S7 protocol
Posted by "glcj (via GitHub)" <gi...@apache.org>.
glcj commented on issue #609:
URL: https://github.com/apache/plc4x/issues/609#issuecomment-1931197345
The S7 driver performs the sequential stop in a controlled manner from a call to ".close()". This required modifications to the S7ProtocoloLogic, TransaccionManager and other objects. If you are sane this can be closed
--
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-unsubscribe@plc4x.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org