Message Layout Definitions

This section describes the message layout definition file used in the Nexacro protocol adapter.

The message format must be defined to push messages to the Nexacro Client. Messages are provided according to the defined layout, and the Nexacro Client processes the received messages.

Message Layout Definition File

The Message Layout must be defined in an XML file. The Message Layout definition file describes more than one message. Messages describe the structure in field units, and it is used when binding to the dataset. In other words, when the Nexacro protocol adapter binds X-PUSH messages to the dataset, field ID and other column ID values are changed.

The following is an example of a Message Layout definition file:

<?xml version="1.0" encoding="utf-8"?>
<message_layout>
	<message type="Type1">
		<field id="column1" type="string" size="9" key="true"/>
		<field id="column2" type="long" size="12"/>
	</message>
	<message type="Type2">
		<field id="column1" type="string" size="9" key="true"/>
		<field id="column2" type="long" size="12"/>
	</message>
</message_layout>

The meanings of each element and attribute are as follows:

Element Name

Attribute Name

Description

message

type

Message type. Message types can be considered message characteristics or groups. For example, you can set definitions according to each message characteristic such as current market price, government notices, news, etc. Must be 4 bytes.

field

id

Field ID

Bound to the same column ID of a dataset.

type

Field type

Has the same meaning as the column type of a dataset.

Size

Field size

key

Set this property to "true" for fields that are keys.

This designates a column to be keys in a bound dataset.

check

Set to "true" if the field will determine whether data received from an X-PUSH Server will be reflected in the dataset.

The default value is "false"

Protocol Adapter Properties

Set the name and location of the Message Layout definition file in the X-PUSH protocol adapter properties.

Register as follows in the Nexacro Studio protocol settings:

If a definition file is missing under the [layouturl] property or is set improperly, the Nexacro Client script commands will not function.