
3. General Message Format
The basic message structure starts with a 16 bit header that contains the length of the block in bytes and also a 3 bit
type field. If the message is a Control Item, then a 16 bit Control Item code follows the header and contains the code
describing the object of the message block. This is followed by an optional number of parameter or data bytes associated
with this message. The byte order for all fields greater than 8 bits is "Little Endian" or least significant byte first.
Control Item Message block format:
16 bit Header(lsb msb) 16 bit Control Item(lsb msb) Parameter Bytes
Data Item Message block format:
16 bit Header(lsb msb) N-Data Bytes
The 16 bit header is defined as follows:
8 bit Length lsb 3 bit type 5 bit Length msb
The 13 bit Length parameter value is the total number of bytes in the message including this header. The range of
the message Length is 0 to 8191 bytes.
A special case for Data Items is that a message length of Zero is used to specify an actual message length of 8194
bytes(8192 data bytes + 2 header bytes). This allows data blocks of a power of 2 to be used which is useful in dealing
with FFT data.
The message type field is used by the receiving side to determine how to process this message block. It has a
different meaning depending upon whether the message is from the Host or Target.
3 bit Msg
Type field
Message
Source
Message Type
000 Host Set Control Item
001 Host Request Current Control Item
010 Host Request Control Item Range
011 Host Data Item ACK from Host to Target
100 Host Host Data Item 0
101 Host Host Data Item 1
110 Host Host Data Item 2
111 Host Host Data Item 3
000 Target Response to Set or Request Current Control Item
001 Target Unsolicited Control Item
010 Target Response to Request Control Item Range
011 Target Data Item ACK from Target to Host
100 Target Target Data Item 0
101 Target Target Data Item 1
110 Target Target Data Item 2
111 Target Target Data Item 3
Rev. 1.03 2011-11-01
9
Komentarze do niniejszej Instrukcji