Marshalling Protocol (Variables); Marshalled Stream Format - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Marshalling Protocol (Variables)

The protocol assumes that every logical field (variable) is identified with a name or index, type/size
information and the actual data. For example, if there is a 4 byte long integer field within a structure, the
XML stream representing that field would consist of 3 tags: A name tag specifying the name of the
variable, a type tag specifying a 4 byte unsigned value, and the data. This concept is extended to all
primitive, structure and array types. The type of a field is always stored using W3C standard type
declarations. The type of the field is optional, as the data will be "stuffed" into whatever type matches the
name of the parameter. The specific formats of all the supported types are described below.

Marshalled Stream format

The following table describes the byte format of the various types supported in the XML marshaller.
Types Supported in the XML Marshaller
Type
BYTE
UWORD
WORD
ULONG
LONG
FLOAT
NetLinx Programming Language Reference Guide
Description
Unsigned char/byte value. If var is an element of an
array, name is replaced with <index></index>. The
index value, and the type are optional. Typically, only
<var><data>Data</data></var> is needed.
Unsigned short value. If var is an element of an array,
name is replaced with <index></index>. The index
value, and the type are optional. Typically, only
<var><data>Data</data></var> is needed.
Signed short value. If var is an element of an array,
name is replaced with <index></index>. The index
value, and the type are optional. Typically, only
<var><data>Data</data></var> is needed.
4-byte unsigned value. If var is an element of an array,
name is replaced with <index></index>. The index
value, and the type are optional. Typically, only
<var><data>Data</data></var> is needed.
4-byte signed value. If var is an element of an array,
name is replaced with <index></index>. The index
value, and the type are optional. Typically, only
<var><data>Data</data></var> is needed.
4-byte IEEE 754 float value. If var is an element of an
array, name is replaced with <index></index>. The
index value, and the type are optional. Typically, only
<var><data>Data</data></var> is needed.
Appendix A: Marshalling Protocol
Stream Format
<var>
<name>MyName</name>
<type>ui1</type>
<data>255</data>
</var>
<var>
<name>MyName</name>
<type>ui2</type>
<data>65535</data>
</var>
<var>
<name>MyName</name>
<type>i2</type>
<data>-32767</data>
</var>
<var>
<name>MyName</name>
<type>ui4</type>
<data>4294967295 </data>
</var>
<var>
<name>MyName</name>
<type>ui4</type>
<data>-2147483647 </data>
</var>
<var>
<name>MyName</name>
<type>float.IEEE.754.32</type>
<data>1.23</data>
</var>
217

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents