OpenTP1 Version 7 Tester and UAP Trace User's Guide

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

3.3.4 MCF receive message files

A logical message can contain one or more segments. A segment consists of a header part containing the segment information and a data part which is the message text.

[Figure]

There are five types of segments:

Specify the segment type in the header part.

Organization of this subsection
(1) Asynchronous receive message file
(2) Synchronous receive message file

(1) Asynchronous receive message file

An asynchronous receive message file stores the messages received by the UAP in an MCF function (dc_mcf_receive function). Create one logical message per file. When a header segment is used, the data is prefixed to the message.

(a) File structure
Logical message consisting of one segment only

[Figure]

Logical message consisting of multiple segments

[Figure]

Header segment

[Figure]

(b) File contents
Item Position Length (bytes) Contents
Header Input/output logical terminal name 0 9 Logical terminal name (including final null character) to be passed to MCF functions. Specify the same name for each segment of a multiple-segment message.
Map name 9 9 Map name (including final null character). Specify the same name for each segment of a multiple-segment message.
This specification is valid only for functions that return a map name.
Reserved 18 9 Null character
Segment type 27 1 One of the following characters:

F
First segment

M
Middle segment

L
Last segment

O
Single segment

H
Header segment
Message length 28 4 Message length (0-2147483647)
Data Message 32 n The data in the segment, of the specified message length
(c) Notes
Asynchronous receive message file containing segments other than header segments

When segment type L or O is specified for a message, the MHP regards the message as completed and ignores any subsequent segments.

Segment type Segments received by MHP
First segment Middle segment Last segment
F M L F, M, L
F L X F, L#1
L X X L#2
X M L No segments received.#3
F X L

Legend:
X: Specification other than F, M, L, or O.

#1: At the third receive request, the MHP assumes that one logical message has been received and an error code is returned.

#2: The middle and subsequent segments are ignored.

#3: A message reports that the segment type is invalid and the receive request function returns an error code.

Asynchronous receive message file containing a header segment

Only the first segments in the file are valid.

Segment type Segments received by MHP
H H#1
H + X
X No segments received.#2
X + H

Legend:
X: Specification other than H.

#1: However, the segment is passed in concatenated format with F, M, L, or O.

#2: A message reports that the segment type is invalid and the receive request function returns an error code.

(2) Synchronous receive message file

A synchronous receive message file stores the synchronous messages received by the UAP via MCF functions (dc_mcf_recvsync and dc_mcf_sendrecv functions). A single file can contain a number of logical messages. When a header segment is used, the data is prefixed to the message.

(a) File structure
Logical message consisting of one segment only

[Figure]

Logical message consisting of multiple segments

[Figure]

Header segment

[Figure]

(b) File contents
Item Position Length (bytes) Contents
Header Input/output logical terminal name 0 9 Logical terminal name (including final null character) to be passed to MCF functions. Specify the same name for each segment of a multiple-segment logical message.
Map name 9 9 Map name (including final null character). Specify the same name for each segment of a multiple-segment message.
This specification is valid only for functions that return a map name.
Reserved 18 9 Null character
Segment type 27 1 One of the following characters:

F
First segment

M
Middle segment

L
Last segment

O
Single segment

H
Header segment
Message length 28 4 Message length (0-2147483647)
Data Message 32 n The data in the segment, of the specified message length
(c) Notes
Synchronous receive message file containing segments other than header segments

When segment type L or O is specified for a message, the MHP regards the message as completed and ignores any subsequent segments.

Segment type Segments received by MHP
First segment Middle segment Last segment
F M L (F, M, L)
M M L (M, M, L)
O O O (O), (O), (O)
F L M (F, L), (M)
X M L No segments received.#
F X L

Legend:
X: Specification other than F, M, L, or O.
( ): One logical message

#: A message reports that the segment type is invalid and the receive request function returns an error code.
Synchronous receive message file containing a header segment

All the header segments in the file are valid.

Segment type Segments received by MHP
H H#1
H + H H, H#1
H + X No segments received.#2
X
X + H

Legend:
X: Specification other than H.

#1: However, the segment is passed in concatenated format with F, M, L, or O.

#2: A message reports that the segment type is invalid and the receive request function returns an error code.