DDS-XTypes 1.4 RTF Avatar
  1. OMG Issue

DDSXTY14 — Clarify the intended member ID of a union's discriminator

  • Key: DDSXTY14-74
  • Status: open  
  • Source: Real-Time Innovations ( Dr. Gerardo Pardo-Castellote, Ph.D.)
  • Summary:

    Note: This issue was filed in RTF 3 by Idar Carlsen. As RTF3 is already close it is being copied into RTF4.


    // Unions with extensibility MUTABLE, version 2 encoding
    // see (22) for serialization of MMEMBER using version 2 encoding
    (27) XCDR[2] << {O : MUNION_TYPE} =
     XCDR
     << { DHEADER(O) : UInt32 }
     << { O.disc : MMEMBER }
     << { O.selected_member : MMEMBER }?
    

    The specification says the discriminator should be treated as an MMEMBER, but it is not clear what the member ID of the discriminator should be. This has caused interoperability issues as different vendors are using different IDs.

    In Kongsberg's implementation, we've been using 0 for the discriminant. The first member of the union has thus had the member ID 1 (assuming @autoid(SEQUENTIAL)).

  • Reported: DDS-XTypes 1.3b1 — Thu, 21 Mar 2024 03:51 GMT
  • Updated: Sat, 23 Mar 2024 14:23 GMT