Jump to content
OpenSplice DDS Forum

Emmanuel Prunet

  • Content count

  • Joined

  • Last visited

About Emmanuel Prunet

  • Rank

Profile Information

  • Company

Recent Profile Visitors

230 profile views
  1. I'm using idlpp (isocpp2) to generate from a large union. Compilation error C1061 occur in generated header files. Methods " bool operator==( ...)" raise this error because of the use of if / else if instead of a switch.
  2. Emmanuel Prunet

    register_instance vs lookup_instance

    Hi, I want to know the best usage of register_instance and lookup_instance on a datawriter for successive write of the same instance. Should I do : I) auto h1 = writer.register_instance(ddsData); map.insert(h1); .... writer.write(ddsData, map.find(h1)); II) writer.register_instance(ddsData); .... writer.write(ddsData, writer.lookup_instance(ddsData)); III) writer.write(ddsData, writer.register_instance(ddsData)); In I) I register the instance and save it in a map. Then, when I want to write the instance, I get the instance_handle in the map and use it in the write() call. In II) I just register the instance. Then, when I want to write the instance, I retrieve the instance_handle with lookup_instance and use it in the write() call. In III) I register the instance in the write() call. If register_instance is idempotent, I think III) is what I want to do : registering the instance the first time then use the instance_handle for the write call. But I don't know if instance handles are internally stored in a map or if I should do it myself like in I) Regards
  3. Emmanuel Prunet

    Not being notified of own publications

    Hi, Here is my scenario : I have two publisher and subscriber on a topic for two distinct machines. Both publish and subscribe some content. Is there a way for my local machine to ignore publication being emitted myself? Or should I create two partitions "Local to Remote" and "Remote to Local" for their DataReader/DataWriter ? Regards
  4. Emmanuel Prunet

    Multitopic in isocpp2

    C++ and C#
  5. Emmanuel Prunet

    Multitopic in isocpp2

    Hi Hans and thank you for your quick response. I'll explain why we need MultiTopic. We have a conceptual model where we have a lot of inheritance, to simplify let's say we have : A( k , a ) B( b ) C( c ) where k is primary key and B and C inherits from A. In our case B and C are exclusive , but at runtime a B can become a C and a C can become a B but A can't exist by itself. From this conceptual model we can create topics like this : 1) A( k , a , b , c ) => not acceptable in our case because it will allocate too much memory 2) A( k , a ) , B( k , b ) , C( k , c ) => this solution seemed to be the best for us, but a lot of issues arise : When do we notify a new B exists? That's why we need a multitopic that joins A and B and notify a new instance exists only if this instance exist in A and B. But even if I implement myself a multitopic, since we have a lot of inheritance, I'll have a multitopic on ( A , B ) , a multitopic on ( A , C ), and a lot more of multitopics that needs to observe A, meaning that I'll have a LOT of readers on A (and also a lot of readers on B and C because in our case they are inherited themselves by D,E, F etc...). Is that efficient to have this much readers on the same topic? Do they share the same cache? Is there a way to have multiple listeners on the same reader? Another issues is this : what if an instance of B arrives but the corresponding instance of A never arrives? Is there a way in DDS to say "I'm going to write an instance on A and B but the readers needs to receive A and B or none" (sounds like a transaction in SQL). Also is there a way to say "I'm going to write A and B and the readers will receive A THEN B in that order" ? 3) B( k, a, b ) , C( k , a , c ) => this solution is more simpler because when we receive notification from B and C we know that A already exists ( A is in B and C ), so there is no need of multitopics. But when B become a C, we must destroy an instance of B and create one of C, and that's not exactly what we want, solution 2) is more flexible for that. Also, we want to listen to A B and C individually, in solution 3) we must listen to B and C to listen to A. The solution i'm thinking about is mixing 2) and 3) : creating a topic for B (k, a, b ) and C(k, a, c) for instanciation and deletion of B and C, and topics A( k , a ) , B( k , b ) , C( k , c ) for updates of A B and C. Do your IDLParser supports Unions? A single Topic for B( k, a, b ) and C( k, a, c) would be great ( BC ( k , a , { b , c } ) ) , because I will not destroy a A to create a C from a B.
  6. Emmanuel Prunet

    Multitopic in isocpp2

    Hi I'm new at Opensplice DDS and I was wondering if there was any way to create a listener of a Topic corresponding to a join ( like in SQL) of multiple Topics. From what I saw Multitopics are the solution but they don't seems to be implemented in Opensplice DDS