Terminal

The ADP example sets up a terminal module that looks something like the screenshot below.

Note: The appearance of screenshots will vary with operating system version and configuration.

The terminal module is configured by the messages detailed in the tables below.

First, a stream is set up to send terminal data to the host computer.

Table 1. MSG_CONF_STREAM
Field Values Description
Token 0xFF  
Message ID 0x20  
Data length 21  
ID 0x0000  
Type 2 UINT_8 stream
Mode 2 Outgoing stream (out from target)
State

0

Stream state ON
Label “Status messages\0” Label of the data stream

Next, the terminal itself is configured.

Table 2. MSG_CONF_TERMINAL
Field Values Description
Token 0xFF  
Message ID 0x26  
Data length 26  
ID 0x0000 ID of terminal
Label “Status terminal\0” Terminal label
Width 80 Number of characters wide
Height 50 Number of lines high
Background color 0xFFFFFF (transmitted as 0xFFFFFFFFFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format) RGB background color
Foreground color 0x008000 RGB foreground color

Finally, the data stream is connected to the terminal module.

Table 3. MSG_CONF_ADD_TO_TERMINAL
Field Values Description
Token 0xFF  
Message ID 0x27  
Data length 27  
Terminal ID 0x0000 ID of terminal
Stream ID 0x0000 ID of stream
Mode 0xFF (transmitted as 0xFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)
  • Implicit newline in incoming text = ON
Text color 0x000000 RGB color of the text stream received
Tag text “Status messages\0”  
Tag text color 0x000000 RGB color of the tag text