5.2.1.4.5 Control Dashboard

The ADP example sets up a dashboard to control the ADC. The Control dashboard will look something like the screenshot below.

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

The Control dashboard is configured by the messages detailed in the tables below.

First, the dashboard itself is set up:

Table 5-23. MSG_CONF_DASHBOARD
FieldValuesDescription
Token0xFF
Message ID0x2A
Data length25
ID0x0001Dashboard ID
Label“Control Dashboard\0” Dashboard label
Background color0xFFFFFF (transmitted as 0xFFFFFFFFFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)Background color of dashboard
Height150Height (in pixels) of dashboard

Next, a few labels are added to the dashboard.

Table 5-24. MSG_CONF_DASHBOARD_ELEMENT, ELEMENT_TYPE_LABEL
FieldValuesDescription
Token0xFF
Message ID0x2B
Data length45
Dashboard ID0x0001ID of control dashboard
Element ID0x0008Unique ID of label element
Z-Index0Order index, 0 places the element the farthest to the back
X-coordinate5X-coordinate of element location. 0 is topmost position on dashboard.
Y-coordinate20Y-coordinate of element location. 0 is topmost position on dashboard.
Width128Width of element (pixels)
Height25Height of element (pixels)
Element type0x00ELEMENT_TYPE_LABEL
Font size14
Attribute0x01Bold = ON, Italic = OFF
Horizontal alignment0Left
Vertical alignment1Center
Background transparency0
Background color0xFFFFFF (transmitted as 0xFFFFFFFFFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)RGB color of background
Foreground transparency255 (transmitted as 0xFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)
Foreground color0x000000RGB color of background
Label text“Hysteresis Values\0”
Table 5-25. MSG_CONF_DASHBOARD_ELEMENT, ELEMENT_TYPE_LABEL
FieldValuesDescription
Token0xFF
Message ID0x2B
Data length31
Dashboard ID0x0001ID of control dashboard
Element ID0x000AUnique ID of label element
Z-Index0Order index, 0 places the element the farthest to the back
X-coordinate25X-coordinate of element location. 0 is topmost position on dashboard.
Y-coordinate100Y-coordinate of element location. 0 is topmost position on dashboard.
Width30Width of element (pixels)
Height25Height of element (pixels)
Element type0x00ELEMENT_TYPE_LABEL
Font size14
Attribute0x02Bold = OFF, Italic = ON
Horizontal alignment0Left
Vertical alignment1Center
Background transparency0
Background color0xFFFFFF (transmitted as 0xFFFFFFFFFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)RGB color of background
Foreground transparency255 (transmitted as 0xFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)
Foreground color0x000000RGB color of background
Label text“High\0”
Table 5-26. MSG_CONF_DASHBOARD_ELEMENT, ELEMENT_TYPE_LABEL
FieldValuesDescription
Token0xFF
Message ID0x2B
Data length30
Dashboard ID0x0001ID of control dashboard
Element ID0x0009Unique ID of label element
Z-Index0Order index, 0 places the element the farthest to the back
X-coordinate25X-coordinate of element location. 0 is topmost position on dashboard.
Y-coordinate60Y-coordinate of element location. 0 is topmost position on dashboard.
Width30Width of element (pixels)
Height25Height of element (pixels)
Element type0x00ELEMENT_TYPE_LABEL
Font size14
Attribute0x02Bold = OFF, Italic = ON
Horizontal alignment0Left
Vertical alignment1Center
Background transparency0
Background color0xFFFFFF (transmitted as 0xFFFFFFFFFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)RGB color of background
Foreground transparency255
Foreground color0x000000RGB color of background
Label text“Low\0”
Table 5-27. MSG_CONF_DASHBOARD_ELEMENT, ELEMENT_TYPE_LABEL
FieldValuesDescription
Token0xFF
Message ID0x2B
Data length44
Dashboard ID0x0001ID of control dashboard
Element ID0x000BUnique ID of label element
Z-Index0Order index, 0 places the element the farthest to the back
X-coordinate350X-coordinate of element location. 0 is topmost position on dashboard.
Y-coordinate20Y-coordinate of element location. 0 is topmost position on dashboard.
Width130Width of element (pixels)
Height25Height of element (pixels)
Element type0x00ELEMENT_TYPE_LABEL
Font size14
Attribute0x01Bold = ON, Italic = OFF
Horizontal alignment0Left
Vertical alignment1Center
Background transparency0
Background color0xFFFFFF (transmitted as 0xFFFFFFFFFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)RGB color of background
Foreground transparency255 (transmitted as 0xFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)
Foreground color0x000000RGB color of background
Label text“ADC Sample Value\0”

Next, a stream is set up to set the high value of the hysteresis.

Table 5-28. MSG_CONF_STREAM
FieldValuesDescription
Token0xFF
Message ID0x20
Data length16
ID0x0010ID of the hysteresis high value stream
Type4Stream type uint_16
Mode0In to target
State0Stream state ON
Label“Hyst. High\0”Label of the data stream

A Slider is added to be able to adjust the high value of the hysteresis from the dashboard.

Table 5-29. MSG_CONF_DASHBOARD_ELEMENT, ELEMENT_TYPE_SLIDER
FieldValuesDescription
Token0xFF
Message ID0x2B
Data length26
Dashboard ID0x0001ID of the control dashboard
Element ID0x000DUnique ID of the slider element
Z-Index0Order index, 0 places the element the farthest to the back
X-coordinate75X-coordinate of element location. 0 is topmost position on dashboard.
Y-coordinate100Y-coordinate of element location. 0 is topmost position on dashboard.
Width156Width of element (pixels)
Height25Height of element (pixels)
Element type0x02ELEMENT_TYPE_SLIDER
Minimum value2500
Maximum value4000
Initial value3000

And the hysteresis high value stream is connected to the Slider element.

Table 5-30. MSG_CONF_ADD_STREAM_TO_ELEMENT
FieldValuesDescription
Message ID0x2C
Data length6
Dashboard ID0x0001ID of the control dashboard
Element ID0x000DID of the hysteresis high slider element
Stream ID0x0010ID of the hysteresis high stream

A stream for hysteresis low values is created and added to a Slider element in the same way as for the hysteresis high value above.

Table 5-31. MSG_CONF_STREAM
FieldValuesDescription
Token0xFF
Message ID0x20
Data length15
ID0x0011ID of the hysteresis low value stream
Type4Stream type uint_16
Mode0In to target
State0Stream state ON
Label“Hyst. Low\0”Label of the data stream
Table 5-32. MSG_CONF_DASHBOARD_ELEMENT, ELEMENT_TYPE_SLIDER
FieldValuesDescription
Token0xFF
Message ID0x2B
Data length26
Dashboard ID0x0001ID of the control dashboard
Element ID0x000CUnique ID of the slider element
Z-Index0Order index, 0 places the element the farthest to the back
X-coordinate75X-coordinate of element location. 0 is topmost position on dashboard.
Y-coordinate60Y-coordinate of element location. 0 is topmost position on dashboard.
Width156Width of element (pixels)
Height25Height of element (pixels)
Element type0x02ELEMENT_TYPE_SLIDER
Minimum value1000
Maximum value2400
Initial value2000
Table 5-33. MSG_CONF_ADD_STREAM_TO_ELEMENT
FieldValuesDescription
Message ID0x2C
Data length6
Dashboard ID0x0001ID of the control dashboard
Element ID0x000CID of the hysteresis low slider element
Stream ID0x0011ID of the hysteresis low stream

A separate stream for the light sensor ADC values to be fed to the Segment display is set up.

Table 5-34. MSG_CONF_STREAM
FieldValuesDescription
Token0xFF
Message ID0x20
Data length22
ID0x0002ID of the adc value stream
Type4Stream type uint_16
Mode2Out from target
State0Stream state ON
Label“Light Sensor ADC\0”Label of the data stream

Next, a Segment display with four segments is added to the dashboard.

Table 5-35. MSG_CONF_DASHBOARD_ELEMENT, ELEMENT_TYPE_SEGMENT
FieldValuesDescription
Token0xFF
Message ID0x2B
Data length20
Dashboard ID0x0001ID of the control dashboard
Element ID0x000DUnique ID of the segment display element
Z-Index0Order index, 0 places the element the farthest to the back
X-coordinate500X-coordinate of element location. 0 is topmost position on dashboard.
Y-coordinate20Y-coordinate of element location. 0 is topmost position on dashboard.
Width150Width of element (pixels)
Height50Height of element (pixels)
Element type0x05ELEMENT_TYPE_SEGMENT
Count4Four segments
Base10Ordinary decimal base
Transparency0xFF (transmitted as 0xFFFF as each 0xFF character must be transmitted as 0xFFFF, see Message Format)0 - 255
Color0xFF0000 (transmitted as 0xFFFF0000 as each 0xFF character must be transmitted as 0xFFFF, see Message Format)RGB color of display

And the ADC sample value stream is connected to the Segment display.

Table 5-36. MSG_CONF_ADD_STREAM_TO_ELEMENT
FieldValuesDescription
Message ID0x2C
Data length6
Dashboard ID0x0001ID of the control dashboard
Element ID0x000DID of the segment display element
Stream ID0x0002ID of the ADC sample data stream