OpenTP1 Version 7 Programming Reference C Language

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

dc_mcf_sendrecv - Exchange a synchronous message

Format

For details on the format, see the explanation in the applicable OpenTP1 Protocol manual.

Description

The function dc_mcf_sendrecv() sends a logical message to other system, during the processing of an active UAP and receives a response from the logical terminal. Once the function dc_mcf_sendrecv() is called by a UAP, it waits until message sending to the logical terminal designated in the function and response arrival are completed. In this way, the sending and reception of a logical message is synchronized with the call of the function dc_mcf_sendrecv() from the UAP.

The function dc_mcf_sendrecv() enters the state of wait for a response when the MCF sends a message by making the function dc_mcf_sendrecv() send the last segment of the message.

The function dc_mcf_sendrecv() sends a segment of a logical message. If the logical message consists of one segment, the function dc_mcf_sendrecv() must be called only once. If the logical message consists of multiple segments, the function dc_mcf_sendrecv() must be called as many times as the segments to send the logical message.

When the MCF receives all segments of the response message from the logical terminal, the function dc_mcf_sendrecv() that sent the last segment receives only the first segment of the response message. The intermediate and subsequent segments are received by the function dc_mcf_recvsync().

The maximum length of a single segment that can be received is 1 megabyte. Note that the actual value might be smaller depending on the protocol. The maximum length of a single message segment that can be sent is 32 kilobytes. Note that the actual value might be smaller depending on the protocol. For details, see the applicable OpenTP1 Protocol manual.

The MCF area which holds the segment to be sent by the function dc_mcf_sendrecv() consists of the area used by the MCF and the area actually holding the message segment to be sent.

The values to be specified for the arguments and the return values vary with the communication protocol in use. For details, see the applicable OpenTP1 Protocol manual.