OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

3.2.1 Establishing or releasing a connection by issuing a function from the UAP

The function dc_mcf_tactcn() [CBLDCMCF('TACTCN ')] is used to establish a connection, and the function dc_mcf_tdctcn() [CBLDCMCF('TDCTCN ')] is used to release a connection. Furthermore, the function dc_mcf_tlscn() [CBLDCMCF('TLSCN ')] can be used to acquire the connection status.

In TP1/NET/UDP, connection management functions cannot be used.

Organization of this subsection
(1) Establishing a connection
(2) Releasing a connection
(3) Functional differences between APIs and operation commands (connection establishment and release)

(1) Establishing a connection

Issuing the function dc_mcf_tactcn() requests the MCF communication process to establish a connection with the remote system.

Depending on the protocol used, an MCF event is reported to the UAP when a connection to the remote system is established or when connection establishment fails. The figure below shows the flow for establishing a connection, using an example in which the function dc_mcf_tactcn() is used on TP1/NET/TCP/IP.

Figure 3-1 Example of establishing a connection using the function dc_mcf_tactcn()

[Figure]

(2) Releasing a connection

Issuing the function dc_mcf_tdctcn() requests the MCF communication process to release the connection with the remote system.

Depending on the protocol used, an MCF event is reported to the UAP when the connection is released. The figure below shows the flow for releasing a connection, using an example in which the function dc_mcf_tdctcn() is used on TP1/NET/TCP/IP.

Figure 3-2 Example of releasing a connection using the function dc_mcf_tdctcn()

[Figure]

(3) Functional differences between APIs and operation commands (connection establishment and release)

The table below shows the functional differences between the functions and the operation commands used for establishing or releasing a connection.

Table 3-2 Functional differences between functions and operation commands (connection establishment and release)

Function name Operation command Functional differences
dc_mcf_tactcn mcftactcn
  1. Requests establishment of a single connection. Multiple or batch specification of connections is not allowed.
  2. A request to establish a connection group is not allowed.
  3. Subconnections cannot be specified.
  4. A connected XP service cannot be specified.
dc_mcf_tdctcn mcftdctcn
  1. Requests release of a single connection. Multiple or batch specification of connections is not allowed.
  2. A request to release a connection group is not allowed.
  3. Subconnections cannot be specified.
dc_mcf_tlscn mcftlscn
  1. Acquires the status of a single connection. Multiple or batch specification of connections is not allowed.
  2. The status of a connection group cannot be acquired.
  3. Only the protocol type and connection status can be acquired. Other additional information or protocol-specific information cannot be acquired.