Closing the PLU Connection

Either the application or the local node can terminate the PLU connection. The criteria for closing are:

When the local node issues a Close(PLU) Request, the application can determine the reason from the Close control field. There may be an associated Status message on either the PLU connection (a Status-Acknowledge(Nack-2)) or the SSCP connection (a Status-Session message if the LU has been deactivated).

Whether the local node or the application closes the connection, the message is the same. The initiator of the Close sequence sends a Close(PLU) Request to its partner, which responds with a Close(PLU) Response. The Close(PLU) Request is unconditional—the Close(PLU) Response always reports that the connection was successfully closed.

The Close(PLU) Response is provided so that the initiator of the Close sequence can determine when outstanding data and status messages have been delivered. To avoid possible race conditions, the application should discard all messages it receives on the PLU connection after issuing a Close(PLU) Request, including any Close(PLU) Request messages from the local node, until it receives the Close(PLU) Response.

Note that, if the application sends a Close(SSCP) Request while the PLU session is active, the local node will close the PLU connection (as if Close(PLU) Request had been sent) as well as the SSCP connection.

The message sequence for an application-initiated Close is shown in the following figure. The local node sends a TERM-SELF request to the host to elicit an UNBIND.

If the host generates an UNBIND automatically on receipt of a TERM-SELF, the application can view Close(PLU) as equivalent to the termination of the PLU-SLU session.

The message flow for a local node-initiated Close after receiving an UNBIND request from the host is shown in the following figure.

When an application is using the LUA variant of the FMI, issuing a Close(PLU) Request causes the node to immediately unbind the PLU session by sending an UNBIND request to the PLU. The Close(PLU) Response is returned to the application on receipt of the UNBIND response, as shown in the following figure.