Reliable UDP Multicast

SUMMARY

Description of the reliable UDP multicast protocol used by various ALPHA-VISION® components.

CONTENTS

  1. Packets
  2. Packet Header
  3. General Remarks
  4. Rollback
  5. Partial Packets
  6. Redundancy

Packets

All communication is done via UDP multicast packets of up to 1048 bytes length. The packet header is 24 bytes. More than 1024 bytes of data are divided into several (partial) packets.

Note:
The 1048 byte limitation is only the default, any other packet size supported by the UDP protocol is also possible but possibly with lesser performance.

Packet Header

Bytes Field Meaning
0..3 SenderId The station which sent the packet
4..7 PacketId The packet id (telegram counter), used to determine missing packets. A packet id of 0 indicates that the sender has reset it's packet id and will always be accepted by the receiver. This is usually the case when sending a general query or after receiving a PACKETIDTOOLOW telegram. With the exception of lifesign packets the packet id is incremented for each packet.
8..11 ReceiverId -1 for broadcast
If the packet shall be evaluated by a single station only then the station id is sent. All other stations than ignore this packet.
12..15 PacketType Valid PacketTypes:
0 - NORMAL
A normal data packet. Th data portion contains up to 1024 bytes of application dependent data
1 - ROLLBACK
A rollback request. The receiver has detected a missing packet and requests the sender to re-send all packets starting from the missing packet. The data portion contains the missing packet id as signed 32-bit integer in network byte order
2 - LIFESIGN
A lifesign packet is sent if the sender has no normal data to send within a timeout interval. The packet id of a lifesign packet is the same as the packet id of the last normal data packet of the same sender. The data portion is empty.
3 - PACKETIDTOOLOW
The receiver has received a packet with an id that is lower than the expected packet id - minus the rollback buffer size.
Note:
This is usually the case if a packet with an id of 0 has been lost. Without the 'packet id too low' detection the station would discard all packets until the expected packet id is reached. The data portion is empty.
16..19 TotalPacketLength The length of the data portion in bytes. If data is split among multiple partial packets this is the overall length of the data in bytes. This value is used to calculate the number of partial packets to be expected. It is the real length, not just a multiple of 1024.
20..23 PartialPacketId Always 0 for single packets. If data is split among multiple partial packets this is 0 for the first partial packet, 1 for the second partial packet and so on. A receiving station uses the PartialPacketId to re-assemble the data in the correct order.
All fields are signed 32 bit integers and are sent in network byte order.

General Remarks

Rollback

Partial Packets

Redundancy