Appendix A: Marshalling Protocol; Marshalled Stream Format - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Appendix A: Marshalling Protocol

Marshalling Protocol (Group of Bytes)
The protocol assumes that every logical field (group of bytes) is prefixed with type/size information. For
example, if there is a 4 byte long integer field within a structure, the byte stream representing that field
consists of 5 bytes. The first byte (0xE3) specifies that a long integer follows and then the 4 remaining
bytes contain the value of the long integer.
This concept is extended to all primitive, structure and array types. The type of a field is always stored as
a single byte. The size of a field may or may not be stored depending upon the field type (fields with
know lengths do not have a size prefix). The specific formats of all the supported types are described in
the table below.

Marshalled Stream Format

The following table describes the byte format of the various types supported in the marshaller (fields
within <>'s indicate actual data bytes):
Byte Formats Supported in the Marshaller
Type
BYTE
WORD
DWORD
QWORD
BYTESTR
NetLinx Programming Language Reference Guide
Description
Unsigned char/byte value.
Unsigned short value.
4-byte value (could be an unsigned long integer or a float).
8-byte value (could be an unsigned Quad-word or a double). 0xE4
Sequence of BYTE's whose element count is <= 64K.
Appendix A: Marshalling Protocol
Stream Format
0xE1
<BYTE>
0xE2
<WORD Hi>
<WORD Lo>
0xE3
<DWORD MSB>
.
.
<DWORD LSB>
<QWORD MSB>
.
.
.
.
.
.
<QWORD LSB>
0xE5
Length Hi
Length Lo
<BYTE Sequence>
.
.
215

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents