VSCP Specification

Trace: vscp_multicast


|

Meta

VSCP Multicast

For VSCP multicast the address

224.0.23.158 VSCP

should be used.Please see the following:

http://www.iana.org/assignments/multicast-addresses and http://www.tldp.org/HOWTO/Multicast-HOWTO.html

Currently the multicast interface is used for heart beats and announcements of available services and to set up multicast groups that share events.

General multicast information can be found here.

Packet format

Byte Description
0 Packet type & encryption setings
1 VSCP Level II Head MSB
2 VSCP Level II Head LSB
3 Timestamp microseconds MSB
4 Timestamp microseconds
5 Timestamp microseconds
6 Timestamp microseconds LSB
7 CLASS MSB
8 CLASS LSB
9 TYPE MSB
10 TYPE LSB
11-26 ORIGINATING GUID
27 DATA SIZE MSB
28 DATA SIZE LSB
29-n data … limited to max 512-25 = 487 bytes
len-2 CRC MSB (Calculated on HEAD + CLASS + TYPE + ADDRESS + SIZE + DATA…)
len-1 CRC LSB

The number above is the offset in the package. Len is the total datagram size.

Definition of type byte
Bits Description
7,6,5,4 Packet type. Currently always zero.
3,2,1,0 Encryption. Currently always zero == no encryption.
Definition of head byte
Bits Description
7,6,5 Priority
4 Hard-coded
3,2,1,0 reserved (Set to zero!)

Note also that the MSB is sent before the LSB (network byte order, Big Endian). So, for little endian machines such as a typical PC the byte order needs to be reversed for multi-byte types.

There is a 24-byte overhead to send one byte of data so this is not a protocol which should be used where an efficient protocol for data intensive applications is required and where data is sent in small packets.

The CRC used is the 16-bit CCITT type and it should be calculated across all bytes except for the CRC itself.

Announcement

Announcements are done on the default VSCP port 9598.

Announcements is an important part of the traffic on the multicast channel. There are a few different types.

  • VSCP daemon announcements. Announce the availability of a VSCP daemon (or other server with exported interfaces) and tell its capabilities.
  • High end device announce. Announce the availability of the device and its capability. All Level II nodes should have this functionality. At the bottom line they just look to the system as a VSCP daemon with less capabilities.
  • Heart beats: Heart beats come in the form of heartbeats from VSCP daemons and from high end nodes. Both send them out each minute. Also heartbeats are available form devices connected to a daemon or through a high end node.

Events

It's up to the implementer to decide what events should be available on a multicast channel. Several channels can be set up on diverse ports forming different sub nets. Normally just a filtered number of events is transmitted but yes all events can also be there. A typical example if such a segment is a group of nodes on Ethernet.



Paradise of the Frog AB