Jump to content
OpenSplice DDS Forum

e_hndrks

Members
  • Content count

    64
  • Joined

  • Last visited

About e_hndrks

  • Rank
    OpenSplice_DDS Expert
  • Birthday 11/30/1973

Profile Information

  • Gender
    Male
  • Location
    Hengelo, Netherlands
  • Company
    ADLink
  1. helloworld standalone example memory leak

    Hi Payne, To complement Hans' suggestion, you could modify your code in the following ways: On the Publishing side, follow your write instruction immediately by a corresponding unregister instruction. This instructs the Writer to release all resources allocated to accomodate for future updates to that instance. Not doing this is what causes your memory leak. status = HelloWorldWriter->write(msgInstance, DDS::HANDLE_NIL); status = HelloWorldWriter->unregister_instance(msgInstance, DDS::HANDLE_NIL); Instruct the Writer to automatically unregister after each Write instruction by setting the (OpenSplice specific) autounregister_instance_delay to 0 on the DataWriterLifecycleQosPolicy in your WriterQos. DDS::DataWriterQos wQos; result = publisher->get_default_datawriter_qos(wQos); result = publisher->copy_from_topic_qos(wQos, tQos); wQos.writer_data_lifecycle.autodispose_unregistered_instances = false; wQos.writer_data_lifecycle.autounregister_instance_delay = DDS::DURATION_ZERO; writer = publisher->create_datawriter(topic, wQos, NULL, DDS::STATUS_MASK_NONE); Regards, Erik Hendriks.
  2. Indeed the ISOCPP2 implementation comes with a new IDL compiler backend that is a complete re-implementation of the one used for the now deprecated ISOCPP. So there is a good chance that it will do a better job. If not, then please let us know as well.
  3. Not a valid view expression?

    Hi Andreas, This is an error report that comes from deep within the product: on your Java API you do not see a view expression, but under the hood your TopicDescription is translated into a view expression for the underlying database. It is in the parsing of this view expression that something goes wrong. My bet is that the parser chokes on your topic name, probably because it contains some illegal characters. According to Appendix H of your Reference Manual (See also Appendix B of the DDS specification) a valid topic name may only consist of the following characters: TOPICNAME - A topic name is an identifier for a topic, and is defined as any series of characters ‘a’, ..., ‘z’, ‘A’, ..., ‘Z’, ‘0’, ..., ‘9’, ‘-’, ‘_’ but may not start with a digit Is it possible that your topic name does not adhere to this requirement? Regards, Erik.
  4. include files in idlpp

    Hi Bud, The functions for bill will be generated in the billSacDcps.h file, which you will need to compile separately: idlpp -l c -S -I./ bill.idl The generated file top_levelSacDcps.h will include the generated billSacDcps.h. Regards, Erik Hendriks.
  5. Hi rku, I think this should work like you expect. Which version of OpenSplice are you using? It is possible to see the application code that you use to run this scenario? Regards, Erik.
  6. on_sample_lost

    I tried to reproduce your problem using a simple example, where a Java writer communicates to a Java reader over the network, and where the Java Reader uses a Listener to be notified of the SampleLost event. In my case this call is not invoked a single time. So if this is a bug, it does not manifest itself in default situations. I guess you experience this for topics that are using the BEST_EFFORT policy? Is is possible that newer messages can overtake older messages for example because they are traveling over multiple parallel network connections? Can you tell us a little bit more about your network configuration?
  7. on_sample_lost

    Can you elaborate on your scenario a little bit more? Do you use 1 writer and 1 reader or are there multiple writers writing the same message? Are the writer and reader in separate processes? Are they communicating using shared memory or over a network?
  8. ContentFiltered Topic Mechanism

    Hi Mery, I tried to reproduce your problem, and in my test the C# HelloWorldPublisher communicated fine with the C++ HelloWorldSubscriber. Which version of OpenSplice are you using on which exact platform? And what is the exact order of things that you do to create the problem? Regarding the database query: what is the problem that you try to solve by using the '*'? The 'like' operator already looks for a substring, so what would adding the asterisk on both sides of the query parameter add to that? If you look at the BNF description of the officially supported Query syntax (See for example Appendix H of the C++ reference manual, that you can find in $OSPL_HOME/docs/pdf/OpenSplice_refman_CPP.pdf), the asterisk is not meant to be used in this way: it is only meant to aggregate all fields of a topic when defining a multitopic. Regards, Erik.
  9. ContentFiltered Topic Mechanism

    Hi Mery, You do not need to use the DDSApiHelper.dll at all: you can do everything it does in your own application code. Again: DDSApiHelper is not something that is part of DDS or OpenSplice. It is merely a little DDS abstraction that is shared between the various examples that come with OpenSplice. If it annoys you to recompile this DLL when you want to make changes to the filter, then just strip that part of the code from the DLL and put it into your own application code. Then your other questions: 1) I expect that the different examples in the different languages have some Qos mismatch, which prevents the Writer from C# to communicate with the reader of C++. I will look into that and get back about it. 2) I don't think this is a particular C# issue, but more an issue of the database. I will look into that too. I will get back about both issues. Regards, Erik.
  10. ContentFiltered Topic Mechanism

    Hi Mery, In some of the examples they use an EntityManager to abstract their applications from some of the API details. However, the EntityManager is not part of the DDS API, but of the DDS examples themselves. That explains why the source code of the EntityManager needs to be changed when you want to change Filtering behaviour. You don't need to use an EntityManager though: if you look at the Tutorial (see Section 7.3.1 of OpenSplice_Tutorial_C.pdf in the docs\pdf directory of your OpenSplice installation) you can see how a ContentFilter is used in the original DDS API. The PDF only demonstrates it for the C language binding, but in the examples\dcps\Tutorial\cs\src directory of your OpenSplice installation you can also find a working example for C#. I can't see what changes you have made to the example in your code, but probably your filter expression is not referring to a field that exists in your MAN datatype. Can you show me the new MAN datatype and the filter expression that the EntityManager is using to create the ContentFilteredTopic? Regards, Erik.
  11. WaitSet with Deadline when DataWriter is deleted

    Hi Steve, So just to summarize where you are at right now: 1) You are creating one instance with a deadline of 1500ms. 2) You have a StatusCondition for the Reader that responds on the REQUESTED_DEADLINE_MISSED_STATUS on the WaitSet. 3) Each time the WaitSet triggers for a missed deadline, you invoke get_requested_deadline_missed on the Reader. And then you still have missed deadline notifications, even after you delete the writer? The total_count is still increasing with every notifciation, even after the deletion of the writer and the instance_handle is still the same as in all previous notifications? That would be very weird indeed, because as soon as you delete the writer ALL its instances become unregistered, regardless of the Reader/Writer Qos, and that should remove those instances from the deadline administrations everywhere in the system. If all the things I summarized above are correct, then it starts to look like there might be a bug in the deadline administration somewhere.
  12. WaitSet with Deadline when DataWriter is deleted

    Hi Steve, Your expectation is correct: as soon as the Writer disappears it unregistrers ALL its instances, which means that the Reader should remove them from its deadline administration and therefore trigger no longer for missed deadlines of these instances. The fact that these missed deadlines are stil triggering the WaitSet seems to indicate something is wrong. My questions to you are: 1) Did you invoke get_requested_deadline_missed_status() on the Reader to reset its status flag? Otherwise the WaitSet keeps on triggering for what it considers an unhandled deadline event in the past. 2) If you do invoke the get_requested_deadline_missed_status(), does its total_count attribute continue to increase with every trigger? 3) If this is the case, does it trigger for all unregistered instances, or just for 1 particular instance? (Check the last_instance_handle attribute for this.) Also, can you tell us which version of OpenSplice you are using for this experiment? Regards, Erik.
  13. Configuration for Unity C Sharp

    Hi Randy, I am not familiar with Unity, but if you want to use the OpenSplice C# API in your project, you should add the following files to your project: $OSPL_HOME/bin/dcpssacsAssembly.dll : contains the C# API. For an IDL file named Foo.idl, you should place the following output files into your project and compile them:Foo.cs : C# data representation. IFooDcps.cs : Contains the interfaces to the typed Readers/Writers and the TypeSupport. FooDcps.cs : Contains the implementations to the typed Readers/Writers and the TypeSupport. FooSplDcps.cs : Contains the marshalers for the IDL datatypes. You might want to take a look at how the Visual Studio project file for the C# examples is including these files into the project.
  14. Getting info and count of domain participants

    Hi foemill, I created a small test application that does exactly what you mention in your mail, but on my platform it seems to work fine. Can you give me some more background info on the crash you describe? What platform are you running on? Which version of OpenSplice DDS are you using? Could you post the source code for a small demo application that reproduces the problem? Regards, Erik.
  15. Memory growing sharply with take

    Hi Jin, See section 6.3 of the tutorial ($OSPL_HOME/docs/pdf/OpenSplice_Tutorial_C.pdf) for a clear distinction between the 2 different read modes (i.e. using pre-allocated memory or using loans). Although the tutorial is written for the C language, all the same principles apply to C++. The only difference is that in C++ the sequence is wrapped in a more user-friendly class that abstracts some of its details for you. When you declare your C++ sequences on stack (as you did in your example), you initialize them to 0 elements an no buffer, forcing the middleware to allocate the sequence buffer for you. This results in 'loaned' buffers that you need to return using return_loan after you are done processing them. If you would pre-allocate the sequence buffers by either passing the required pre-allocation length as a parameter to the sequence constructor, or by passing it as a parameter to the length() function of the sequence, then the middleware can use the buffers you provided it and so it doesn't need to 'loan' you any memory, which you subsequently don't need to return. Regards, Erik Hendriks.
×