OpenTP1 Version 7 Programming Reference C Language

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

dc_mcf_tempget - Accept temporary-stored data

Format

ANSI C, C++

#include <dcmcf.h>}
int  dc_mcf_tempget(DCLONG action,char *getdata,DCLONG gtempleng,
                    DCLONG *gdataleng,char *resv01)

K&R C

#include <dcmcf.h>
int  dc_mcf_tempget (action,getdata,gtempleng,gdataleng,resv01)
DCLONG       action;
char       *getdata;
DCLONG       gtempleng;
DCLONG       *gdataleng;
char       *resv01;

Description

The function dc_mcf_tempget() receives data stored in the temporary-stored area which is used for continuous-inquiry-response processing.

For gtempleng, specify a value from 1 to 32,000 bytes. If the temporary-stored data exceeds the length specified for gtempleng, the excess portion is truncated. If the temporary-stored data is shorter than gtempleng -8 (with buffer format 1) or gtempleng -6 (with buffer format 2), no processing is done for the remaining receive area.

If there is no temporary-stored data, the function dc_mcf_tempget() is executed on the assumption that (00)16 equivalent to the length specified for tempsize in the MCF application definition is specified.

The figure below shows the format of the receive segment area. With buffer format 1, L is 8 bytes; with buffer format 2, L is 6 bytes.

[Figure]

Arguments whose values are set in the UAP

action

Specify the type of buffer format to be used.

{DCMCFBUF1|DCMCFBUF2}

DCMCFBUF1
Specify DCMCFBUF1 when using buffer format 1.

DCMCFBUF2
Specify DCMCFBUF2 when using buffer format 2.

getdata

Specify the area for receiving temporary-stored data. After the function dc_mcf_tempget() is called, the temporary-stored data is returned to the area indicated by getdata.

gtempleng

Specify the length of the area for receiving temporary-stored data. The number of bytes to be specified varies depending on the buffer format.

resv01

Specify a null character.

Arguments whose values are returned from OpenTP1

getdata

The temporary-stored data is returned.

gdataleng

The length of previously updated data is returned.

Return values

Return value Return value (numeric) Explanation
DCMCFRTN_00000 0 Normal termination.
DCMCFRTN_72000 -13000 The function dc_mcf_tempget() cannot be called from an SPP.
DCMCFRTN_72013 -13013 Temporary-stored data exceeding the length of the receive area was received. The excess portion was truncated.
DCMCFRTN_72016 -13016 The value specified for action is invalid.
The value of the area pointed to by resv01 is not a null character.
DCMCFRTN_72036 -13036 The receive area length is less than 9 bytes (with buffer format 1) or less than 7 bytes (with buffer format 2).
DCMCFRTN_72101 -13101 The function dc_mcf_tempget() was called from an MHP for which type=cont (continuous-inquiry-response type) was not specified in the MCF application definition.
DCMCFRTN_72106 -13106 The function dc_mcf_tempget() was called before the function dc_mcf_receive() for receiving the first segment.
DCMCFRTN_72107 -13107 The function dc_mcf_tempget() was called after the function dc_mcf_contend().
Other than the above An unprecedented error (e.g., program damage) occurred.