OpenTP1 Version 7 Programming Reference C Language

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

Function format of the user exit routine that determines whether to inherit the timer-start settings

The exit routine for determining timer start inheritance is called in the following format:

Format

ANSI C , C++

#include <dcmpsv.h>
DCLONG  uoc_func(dcmpsv_uoc_rtime  *parm)

K&R C

#include <dcmpsv.h>
DCLONG  uoc_func(parm)
dcmpsv_uoc_rtime  *parm;

Description

If the timer-started function dc_mcf_execap() is followed by an error which raises the need for rerunning the OpenTP1, this exit routine can change the timer-start environment. It can perform the following:

When installing in the MCF the exit routine that determines the inheriting timer-start message, specify the address of the exit routine function in the MCF main function for the application startup service. The MCF main function for the application startup service does not depend on the communication protocol.

For details on how to create the MCF main function for the application startup service, see the manual OpenTP1 Operation.

When uoc_func (exit routine that determines the inheriting time-start message) is called, the following parameters are passed from the MCF to parm.

Parameters

dcmpsv_uoc_rtime

typedef  struct {
     char  le_name[9];   ... Input source logical terminal name
     char  reserve1[7];  ... Reserved
     char  ap_name[9];   ... Application name
     char  reserve2[7];  ... Reserved
     DCLONG  exec_time;  ... Timer-start time
     char  ap_type;      ... Application type
                         'a': ans type; 'n': noans type
     char  time_type;    ... Timer-start type
                         'i': Interval specification for timer start
                         't': Time point specification for timer start
     char  reserve3[26]; ... Reserved
} dcmpsv_uoc_rtime;

Arguments whose value is passed from MCF to exit routine

le_name

The input source logical terminal name is set here. If the function dc_mcf_execap() is called from the SPP, '*' is set here.

ap_name

The application name specified by the UAP in the timer-started function dc_mcf_execap() is set here.

exec_time

The MHP start time specified by the UAP in the timer-started function dc_mcf_execap() is set here, as the number of seconds counted from 00:00:00 on January 1, 1970.

ap_type

The application type of the UAP which issued the timer-started function dc_mcf_execap() is set here:

'a': ans type

'n': noans type

time_type

The timer-start type specified by the UAP in the timer-started function dc_mcf_execap() is set here:

'i': Interval specification for timer start

't': Time point specification for timer start

Arguments whose value is set in the exit routine

ap_name

To change the application to be timer-started, specify the new application name here. The name specified here has effect when DCMPSV_UOC_TIME_JUST is specified for the return value.

Return values

uoc_func() must return the following values:

Return value Explanation
DCMPSV_UOC_TIME_CONTINUE Timer-start is inherited.
DCMPSV_UOC_TIME_JUST Immediate start will be in effect.
DCMPSV_UOC_TIME_DEQ Timer-start is canceled.

The subsequent MCF processing varies depending on the return value from uoc_func() as follows:

If another value is returned from the exit routine, the segments to be timer-started are deleted from the output queue, with the output of a warning message (KFCA10710-W).

Notes on creating user exit routines