Appendix A: Marshalling Protocol
215
NetLinx Programming Language Reference Guide
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
Description
Stream Format
BYTE
Unsigned char/byte value.
0xE1
<BYTE>
WORD
Unsigned short value.
0xE2
<WORD Hi>
<WORD Lo>
DWORD
4-byte value (could be an unsigned long integer or a float).
0xE3
<DWORD MSB>
.
.
<DWORD LSB>
QWORD
8-byte value (could be an unsigned Quad-word or a double). 0xE4
<QWORD MSB>
.
.
.
.
.
.
<QWORD LSB>
BYTESTR
Sequence of BYTE's whose element count is <= 64K.
0xE5
Length Hi
Length Lo
<BYTE Sequence>
.
.
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...