DDS4CCM 1.0 FTF Avatar
  1. OMG Issue

DDS4CCM_ — Sequence typedef leads to multiple sequences

  • Key: DDS4CCM_-81
  • Legacy Issue Number: 14213
  • Status: closed  
  • Source: Remedy IT ( Johnny Willemsen)
  • Summary:

    Several of the DDS ports have the following typedef:
    typedef sequence<T> T$Seq;

    This leads to an unique sequence type for each DDS interface (MultiWriter,
    MultiUpdater, Reader, Getter, MultiListener). This leads to 5 times
    typecodes, footprint, but also the sequences are really from a different
    type in the programming language. A sequence returned from a Reader, just
    can't passed directly into a writer, it are different sequences.

    I think we do want to have the same sequence to be used, the one related to
    T and this then has to be in the same namespace of T (the topic).

    If we for example have
    struct GPS

    { long x; long y; }

    We want to get sequence<GPS> GPSSeq in the global namespace.

    Not ::CCM_DDS::GPS_reader::GPSSeq, ::CCM_DDS::GPS_getter::GPSSeq, etc.

    I think we should remove the typedef of the interfaces and add it as a
    template argument, so that for example we get a reader below.

    interface Reader <typename T, typename TSeq>

    { void read_all (out TSeq instances, out ReadInfoSeq infos) raises (InternalError); void read_all_history (out TSeq instances, out ReadInfoSeq infos) raises (InternalError); void read_one (inout T an_instance, out ReadInfo info) raises (NonExistent, InternalError); void read_one_history (in T an_instance, out TSeq instances, out ReadInfoSeq infos) raises (NonExistent, InternalError); attribute QueryFilter filter setraises (BadParameter); }

    This would mean that the user of the interface/port has to instantiate it
    with the basic type and the sequence type, but that seems the only way to
    get only one sequence definition used between all the ports, corba, and dds
    itself. The seqeunce just also has to be in the same namespace as the
    original type T, we just can't do that with a typedef in an interface that
    uses the sequence.

  • Reported: DDS4CCM 1.0b1 — Fri, 14 Aug 2009 04:00 GMT
  • Disposition: Resolved — DDS4CCM 1.0b2
  • Disposition Summary:

    The whole template support has been revisited. According to that new support all
    parametrized constructs are now grouped in a module. The CCM_DDS::Typed
    module is parameterized with T and Tseq – sequence <T>).
    Making the second parameter of type sequence<T> allows to check at compile
    time that the type of the second parameter is actually sequence of the first one.

  • Updated: Sat, 7 Mar 2015 00:50 GMT