4.1 Understanding the RTPS Message Header

The overall structure of an RTPS Message consists of a fixed-size RTPS Header followed by a variable number of RTPS Submessage parts. Each Submessage consists of a SubmessageHeader and a variable number of SubmessageElements. The RTPS header must appear at the beginning of every message.

The Header contains these fields:

  • protocol: Identifies the message as an RTPS message.
  • Representation: 4 bytes

    0.........8........16........24........32

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

    | 'R' | 'T' | 'P' | 'S' |

    +---------+---------+---------+---------+
  • version: Identifies the version of the RTPS protocol. .
  • Representation: 2 bytes. This release uses version {2, 1}.

  • vendorId: Indicates the vendor that provides the implementation of the RTPS protocol.
  • Representation: 2 bytes. The RTI vendor identifier is {1, 1}.

  • guidPrefix: Defines a default prefix to use for all GUIDs that appear in the message.
  • Representation: 12 bytes: 4 bytes for the host identifier, 4 bytes for the application identifier and 4 bytes for the instance identifier.

Figure 4.1: RTPS Message Structure

Figure 4.2: RTPS Message Header Structure

The LBRTPS transport reduces the RTPS message headers by eliminating the protocol, version, and vendorId fields in the RTPS Header structure.