CLASS1.DISPLAY
This is generic display related functionality. Show info on a screen, LED-display diode, etc.
The CAN4VSCP New York module is an example on the how this can be implemented in a module.
An escape sequence is preceded with a %. As a result to display ”%” instead "%%" should be used.
The first character after the % is the escape-type. This character is case sensitive. That is “e” is not the same as “E”.
Escape type | Decription |
---|---|
$ | Zero terminated string |
! | Boolean value |
b | signed char |
B | unsigned char |
s | signed short |
S | unsigned short |
i | signed int |
I | unsigned int |
l | signed long |
L | unsigned long |
f | floating point decimal |
d | date format |
t | time |
n | normalized integer |
p | Parameter data: Display parameter escapes. The format is %p001 where “001” is the ID that identifies the parameter. This escape is used for hard parameters displayed by the display maker. Se Type=6 below. |
e | Event data: Event data escapes. The format is %eclass,type,r where class and type tells which event is of interest and r have the same format as the r escape |
The above is just a recommendation. Anyone can of course use any format they like.
VSCP_TYPE_DISPLAY_GENERAL
VSCP_TYPE_DISPLAY_CLEAR_DISPLAY
Clear the display on displays in a certain zone,sub-zone.
Byte | Description |
---|---|
0 | Code - not yet defined. |
1 | Zone for which event applies to (0-255). 255 is all zones. |
2 | Sub-zone for which event applies to (0-255). 255 is all sub-zones. |
VSCP_TYPE_DISPLAY_POSITION_CURSOR
Move the cursor to a specific position on displays in a certain zone,sub-zone.
Byte | Description |
---|---|
0 | Index. |
1 | Zone for which event applies to (0-255). 255 is all zones. |
2 | Sub-zone for which event applies to (0-255). 255 is all sub-zones. |
3 | Row to move to (first row is 0). |
4 | Column to move to (first column is 0). |
VSCP_TYPE_DISPLAY_WRITE_DISPLAY
Write to display(s) in a certain zone,sub-zone. The update of the display is immediate.
Byte | Description |
---|---|
0 | index - Increase by one for each event sent for specific text to display. |
1 | Zone for which event applies to (0-255). 255 is all zones. |
2 | Sub-zone for which event applies to (0-255). 255 is all sub-zones. |
3-7 | Display data. |
Index is increased by one for each event that builds up a specific event. If needed an empty (no data) can be sent as the last event else sending data to fill the display buffer will give the end automatically.
VSCP_TYPE_DISPLAY_WRITE_DISPLAY_BUFFER
Write to the buffers of displays in a certain zone,sub-zone. The update of the display is is not done right away but is instead done when the Show Buffer event is received by the display unit.
Byte | Description |
---|---|
0 | index - Increase by one for each event sent for specific text to display. |
1 | Zone for which event applies to (0-255). 255 is all zones. |
2 | Sub-zone for which event applies to (0-255). 255 is all sub-zones. |
3-7 | Display data. |
Index is increased by one for each event that builds up a specific event. If needed an empty (no data) can be sent as the last event else sending data to fill the display buffer will give the end automatically.
Many LCD displays allow definition of special characters. Use this event to define custom matrices buy defining a sub-zone for the user defined matrix(es).
VSCP_TYPE_DISPLAY_SHOW_DISPLAY_BUFFER
Tells displays in a certain zone,sub-zone to display the content in their display buffers. The update of the display is immediate.
Byte | Description |
---|---|
0 | index - Increase by one for each event sent for specific text to display. |
1 | Zone for which event applies to (0-255). 255 is all zones. |
2 | Sub-zone for which event applies to (0-255). 255 is all sub-zones. |
VSCP_TYPE_DISPLAY_SET_DISPLAY_BUFFER_PARAM
With this call a display buffer parameter can be sent to a display. This parameter is inserted at the escape position %pn in the string in the buffer when the buffer is transferred to the display.
Note that there are no zone and sub-zone defined for this event and the escapes must instead be chosen to be distinct in a system. This means that &p1 will be unique within a system and updating this parameter will update on all displays that has it defined.
Byte | Description |
---|---|
0 | Display parameter index. |
1 | Data coding byte as of VSCP Specification. |
2-7 | Data as of coding. |
Note that the event have one byte less then standard measurement events so all coding types can not be used.
VSCP_TYPE_DISPLAY_SHOW_TEXT
This event contains information that should be displayed on displays pointed out by zone/sub-zone.
This event can have the same functionality as Write Display or be set on an higher abstraction level.
Byte | Description |
---|---|
0 | Index - Increase by one for each event sent for specific text to display. |
1 | Zone for which event applies to (0-255). 255 is all zones. |
2 | Sub-zone for which event applies to (0-255). 255 is all sub-zones. |
3-7 | event. |
Index is increase by one for each event that builds up a specific event. If needed an empty (no data) can be sent as the last event else sending data to fill the display buffer will give the end automatically.
The text sent to a node can contain escape characters that themselves display data or other display events. Se the new_york node for examples of this.
For a multi line display one can use different sub-zones o address different lines. One can also us macro characters to map display events to a line.
VSCP_TYPE_DISPLAY_SET_LED
This event contains information that should be displayed on LED(s) pointed out by zone/sub-zone.
Byte | Description |
---|---|
0 | Index |
1 | Zone for which event applies to (0-255). 255 is all zones. |
2 | Sub-zone for which event applies to (0-255). 255 is all sub-zones. |
3 | 0 =off, 1=on, 2=blink |
4 | Blink period: MSB milliseconds for ON. |
5 | Blink period: LSB milliseconds for ON. |
6 | Blink period: MSB milliseconds for OFF. |
7 | Blink period: LSB milliseconds for OFF. |
Blink period can be omitted if not used or if blink period is defined hard.
VSCP_TYPE_DISPLAY_SET_COLOR
This event set the color for LED(s) (or similar device) pointed out by zone/sub-zone.
Byte | Description |
---|---|
0 | Index |
1 | Zone for which event applies to (0-255). 255 is all zones. |
2 | Sub-zone for which event applies to (0-255). 255 is all sub-zones. |
3 | Color R to display 0-255. |
4 | Color G to display 0-255. |
5 | Color B to display 0-255. |
If multi-byte resolution for the colors is needed use index to address the byte where 0 means the MSB byte, 1 MSB+1 byte etc (Big endian).