DDS-XTypes 1.2 RTF Avatar
  1. OMG Issue

DDSXTY12 — Issues with UNIONS assignability rules

  • Key: DDSXTY12-5
  • Legacy Issue Number: 19265
  • Status: closed  
  • Source: Real-Time Innovations ( Sumant Tambe)
  • Summary:

    The IDL specification (pre-XTypes) allows the declaration and usage of unions that do not cover all possible discriminator values. For example:

    union Z switch(boolean)
    { 
      case TRUE: 
        short s; 
    };
    

    In the previous union, it is possible to set the discriminator to FALSE. When that occurs, the union's value is composed solely of the discriminator value FALSE.
    The new XTypes specification has several issues concerning unions like the one before:
    It is not clear that you can set the discriminator to a value that is not associated with an union member. For example, can you set the discriminator to FALSE in the union Z?.
    The assignability rules may break assignability of a union object to itself. For example, with the previous UNION, if a received sample has a discriminator value of FALSE, it will be dropped according to the following rule in the Behavior column in table 15:
    If the discriminator value does not select a member in T1 then the T2 object is unassignable to T1.

  • Reported: DDS-XTypes 1.1 — Wed, 26 Feb 2014 05:00 GMT
  • Disposition: Duplicate or Merged — DDS-XTypes 1.2
  • Disposition Summary:

    Duplicates DDSXTY12-119

    This issue is being merged into the a broader issue (DDSXTY12-119) that seeks to make the assignability rules simpler and less restrictive. The resolution of DDSXTY12-119 issue includes changes to the Union assignability rules which addressed the concerns DDSXTY12-5 raises.

  • Updated: Thu, 22 Jun 2017 16:42 GMT