VSCP Specification

Trace: class2.protocol


|

Meta

Class=1024 (0x400) - Level II Protocol Functionality

CLASS2.PROTOCOL

Description

For Level I events class=0 defines protocol control functionality. All events of this class are repeated at class=512 for use on Level II networks. The only difference is that the GUID is used instead of the Level I nickname.

This class defines protocol functionality for Level II. To simplify the handling of level II events, the data portion of the VSCP event can be considered as being made up of two parts. An 8-byte code portion (size of long integer) followed by a data portion if required. This is simply done to make processing level II events a little easier. The following events have been added to the level II control events to support configuration management.

Type = 0 (0x0000) Undefined.

General event.

Type = 1 (0x0001) ReadRegister

Read a Level II register

Byte Description
Byte 0-15 Contains the GUID of the target node (MSB→LSB).
Byte 16-19 Register to read (or start index), (MSB→LSB).
Byte 20-21 Number of registers to read (max 487).

Number of registers to read can also be restricted by the buffer size on the board (register 0x98). If this register is set to something else then 0 (default) this is the max size for data.

This means that buffer_size - 8 is maximum data bytes read.

Type = 2 (0x0002) WriteRegister

Byte Description
Byte 0-15 Contains the GUID of the target node (MSB→LSB).
Byte 16-19 Register to write (or start index), (MSB→LSB).
Byte 20… Data to write to register(s).

Number of registers to write can also be restricted by the buffer size on the board (register 0x98). If this register is set to something else then 0 (default) this is the max size for data. This means that buffer_size - 24 is maximum data bytes written.

Type = 3 (0x0003) ReadWriteResponse

This is the response from a read and a write. Note that the data is returned in both cases and can be checked for validity.

Byte Description
Byte 0-3 Start register for register read/written.
Byte 4… Data read/written.

Type=20 (0x14) High end server capabilities

Should be implemented by all Level II devices and be sent out at least once every 60 second.

Data byte Description
0 VSCP server 64-bit capability code MSB
1 VSCP server 64-bit capability code
2 VSCP server 64-bit capability code
3 VSCP server 64-bit capability code
4 VSCP server 64-bit capability code
5 VSCP server 64-bit capability code
6 VSCP server 64-bit capability code
7 VSCP server 64-bit capability code LSB
8-23 GUID for server
24-39 For IPv4 or IPv6 IP address or other transport id identifier (MSB first)
40-103 64 byte max zero terminated utf8 encoded name for this server. Bland if no name set.
104.. Non standard port info for services. Not needed if the standard port is used.

Non standard port definitions. Each consist of three bytes.

Byte Description
0 0-63 Identify the service from the bit number (see bit usage). Offset zero. Bit 7 is set if encryption is used.
1 Port MSB byte
2 Port LSB byte

Description of bit-usage for VSCP server 16-bit capability code

Bit Usage
Bit 16-63 Reserved.
Bit 15 Have VSCP TCP server.
Bit 14 Have VSCP UDP server.
Bit 13 Have VSCP Multicast.
Bit 12 Have VSCP raw Ethernet.
Bit 11 Have Web server.
Bit 10 Have VSCP Websocket interface .
Bit 9 Have VSCP REST interface.
Bit 8 Have VSCP MQTT interface.
Bit 7 Have VSCP CoAP interface.
Bit 6 IP6 support.
Bit 5 IP4 support.
Bit 4 SSL support.
Bit 3 Accepts two or more simultaneous connections on TCP/IP interface.
Bit 2 Reserved.
Bit 1 Reserved.
Bit 0 Reserved.

For programmers: Bits are defined in vscp.h.



Paradise of the Frog AB