OpenTP1 Version 7 Programming Reference C Language

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

dc_mcf_tdctle - Shut down a logical terminal

Format

ANSI C, C++

#include <dcmcf.h>
int dc_mcf_tdctle (DCLONG action, dcmcf_tdctleopt *leopt,
char *proinf, DCLONG *resv02,
char *resv03, char *resv04)

K&R C

#include <dcmcf.h>
int dc_mcf_tdctle (action, leopt, proinf, resv02, resv03, resv04)
DCLONG action;
dcmcf_tdctleopt *leopt;
char *proinf;
DCLONG *resv02;
char *resv03;
char *resv04;

Description

The dc_mcf_tdctle() function shuts down a logical terminal.

Normal termination of the dc_mcf_tdctle() function indicates that the logical terminal shutdown request was accepted successfully by the protocol product. However, this does not necessarily mean that the logical terminal has been shut down.

If you intend to perform any operation related to the logical terminal after calling the dc_mcf_tdctle() function, first use the dc_mcf_tlsle() function to check the logical terminal's status.

Arguments whose values are set in the UAP

action

Depending on the communication protocol, specify in one of the following formats the method used to specify for this function the logical terminal that is shut down:

 
DCMCFLE[|DCMCFPRO]
 

DCMCFLE
Specifies that the logical terminal name is used.

DCMCFPRO
Specifies that the function depends on the communication protocol being used.

leopt

Set in a dcmcf_tdctleopt structure the information about the logical terminal that is to be the subject of this function's processing.

The following shows the format of the structure:

 
typedef struct {
                DCLONG    mcfid;        ...MCF communication
                                            process identifier
                char      resv01[4];    ...Reserved
                char      idnam[9];     ...Logical terminal name
                char      resv02[7];    ...Reserved
                char      resv03[112];  ...Reserved
                char      resv04[376];  ...Reserved
                } dcmcf_tdctleopt;
 

proinf

Specify a protocol-specific area.

If you do not use a function that depends on the communication protocol, specify NULL.

The following shows the format of a protocol-specific area:

[Figure]

The maximum size of a protocol-specific area is 1024 bytes.

The permitted value depends on the communication protocol being used. For details, see the applicable OpenTP1 Protocol manual.

resv02, resv03, resv04

Specify NULL.

Return values

Return value Return value (numeric) Explanation
DCMCFRTN_00000 0 Normal termination.
DCMCFRTN_71001 -12001 The dc_mcf_tdctle() function cannot be accepted because the MCF is under start processing.
DCMCFRTN_71002 -12002 The dc_mcf_tdctle() function cannot be accepted because the MCF is under termination processing.
DCMCFRTN_71004 -12004 A memory shortage occurred during dc_mcf_tdctle() function processing.
DCMCFRTN_71005 -12005 A communication error occurred. For the cause, see the message log file.
DCMCFRTN_71006 -12006 An internal error occurred. For the cause, see the message log file.
DCMCFRTN_71008 -12008 The specified logical terminal name has not been registered.
DCMCFRTN_71009 -12009 The dc_mcf_tdctle() function is not supported by the applicable MCF communication process.
DCMCFRTN_71010 -12010 Although the request to shut down the logical terminal was issued to the MCF communication process, the request was not accepted. For the cause, see the message log file.
DCMCFRTN_71011 -12011 The dc_mcf_tdctle() function cannot be accepted because the logical terminal has been deleted.
DCMCFRTN_72050 -13050 DCMCFLE is not set in action.
An unsupported flag is set in action.
DCMCFRTN_72051 -13051 NULL is set in leopt.
DCMCFRTN_72052 -13052 When DCMCFPRO is not set in action:
NULL is not set in proinf.
When DCMCFPRO is set in action:
A value smaller than 0 or a value 1025 or greater is specified for the size of protocol-specific area L pointed to by proinf.
DCMCFRTN_72053 -13053 NULL is not set in resv02.
DCMCFRTN_72054 -13054 NULL is not set in resv03.
DCMCFRTN_72055 -13055 NULL is not set in resv04.
DCMCFRTN_72061 -13061 A value smaller than 0 or a value 240 or greater is specified for mcfid in dcmcf_tdctleopt.
DCMCFRTN_72062 -13062 resv01 in dcmcf_tdctleopt is not filled with null characters.
DCMCFRTN_72063 -13063 idnam in dcmcf_tdctleopt begins with the null character.
DCMCFRTN_72064 -13064 resv02 in dcmcf_tdctleopt is not filled with null characters.
DCMCFRTN_72065 -13065 resv03 in dcmcf_tdctleopt is not filled with null characters.
DCMCFRTN_72067 -13067 resv04 in dcmcf_tdctleopt is not filled with null characters.
DCMCFRTN_72073 -13073 The character string set in idnam in dcmcf_tdctleopt is 9 or more bytes in length.
DCMCFRTN_72074 -13074 The character string set in idnam in dcmcf_tdctleopt contains an invalid character.