Uploaded image for project: 'Apache PLC4X'
  1. Apache PLC4X
  2. PLC4X-271

[S7] Implement connection closing for S7 protocol

Add voteWatch issue
    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.7.0, 0.8.0
    • None
    • Driver-S7

    Description

      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

      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

      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

      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

      Attachments

        1. s7-old-generation.pcapng
          2 kB
          Christofer Dutz

        Activity

          People

            Unassigned Unassigned
            cdutz Christofer Dutz

            Dates

              Created:
              Updated:

              Slack

                Issue deployment