[ 
https://issues.apache.org/jira/browse/PLC4X-271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christofer Dutz updated PLC4X-271:
----------------------------------
    Labels: easy-fix low-hanging-fruit  (was: low-hanging-fruit)

> [S7] Implement connection closing for S7 protocol
> -------------------------------------------------
>
>                 Key: PLC4X-271
>                 URL: https://issues.apache.org/jira/browse/PLC4X-271
>             Project: Apache PLC4X
>          Issue Type: Task
>          Components: Driver-S7
>    Affects Versions: 0.7.0, 0.8.0
>            Reporter: Christofer Dutz
>            Priority: Major
>              Labels: easy-fix, low-hanging-fruit
>             Fix For: 0.8.0
>
>
> 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]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to