Jump to content
OpenSplice DDS Forum

luca.gherardi

Members
  • Content count

    14
  • Joined

  • Last visited

About luca.gherardi

  • Rank
    Member

Profile Information

  • Company
    Verity Studios
  1. Hi James, Thanks for the answer. Your solution might work. I'm just not sure when this error is raised. If it happens when I call the function create_participant() than it's too late to detect it with the ErrorInfo API (that because the applications exits as soon as the function is called). Thanks again, Luca
  2. Hi all, I'm using OpenSplice community edition 6.4 (C++) and I'm having problems with the function create_participant (. Our installation is configured to use a specific network interface. When this network interface is not available (e.g. ethernet cable not connected), the application exits when the function create_participant is called. DDS::DomainParticipantFactory_var dpf = GetDomainParticipantFactoryInstace(); _osplDomainParticipantVar = dpf->create_participant(_domainId, PARTICIPANT_QOS_DEFAULT, NULL, STATUS_MASK_NONE); The problem is that the function does not return an invalid handler (the program just crashes) and seems to not raise an exception. In the error log I get two errors: - eth0: does not match an available interface - No network interface selected How can I programmatically detect this error in order to provide a feedback to the user?
  3. No message delivered when there is no network connection

    Hi Hans, I finally had the time to look into this and it works. Thanks a lot! Just a minor question. I suppose that with the community edition it's not possible to setup the system in such a way that it uses two ethernet cards, one as master and the second as backup. Is that correct? Thanks, Luca
  4. Memcheck with Valgrind

    Thanks for the explanation Hans. That's good to know. Is there a way to distinguish the first category of leaks (generated by my code) and the second one (OSPL single process related)? Thanks again, Luca
  5. Memcheck with Valgrind

    Hi all, I found other posts on this topic but I didn't find detailed answers about the problem. I'm implementing a simple application to evaluate open splice. I tried to ran it with valgrind to check if I have memory leaks. Valgrind (with the option leak-check==full) found white a lot of errors, so I decided to test one of the examples provided with the binaries. Attached you can find the output of valgrind (both with and without the leak-check==full option) for the publisher of the Hello World example (cpp, standalone). Just as a quick summary these are the two main problems: - Few errors of type: Syscall param sendmsg(msg.msg_iov[2]) points to uninitialised byte(s) - A lot of lost bytes This is the leak summary obtained with the leak-check==full option ==5758== LEAK SUMMARY: ==5758== definitely lost: 2,823 bytes in 63 blocks ==5758== indirectly lost: 38,242 bytes in 1,427 blocks ==5758== possibly lost: 856,354 bytes in 13,216 blocks ==5758== still reachable: 1,523,814 bytes in 1,180 blocks ==5758== suppressed: 0 bytes in 0 blocks ==5758== Reachable blocks (those to which a pointer was found) are not shown. ==5758== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==5758== ==5758== For counts of detected and suppressed errors, rerun with: -v ==5758== Use --track-origins=yes to see where uninitialised values come from ==5758== ERROR SUMMARY: 10285 errors from 10277 contexts (suppressed: 0 from 0) I would like to better understand if these leaks are known and why they are happening. Some notes on my setup: I'm using open splice community edition (I downloaded the binaries), under Ubuntu 12.04. I'm using the default configuration file (ospl.xml) I'm using the single process deployment In my application I configured the durability to be volatile, butI still have the memory leaks. It seems to me that the number of bytes in use at exit varies form one execution to another. If I just create a participant and delete at before closing the process, there are already leaks and syscall errors Please let me know if you need additional information. Thanks, Luca Archive.zip
  6. Instance state and view state

    Hi James, I'm just trying to figure out which one is the best away to abstract all the information returned by the take function without affecting to much the performances. Thanks, Luca
  7. Instance state and view state

    Hi James, thanks for the answer. I read the post and it looks interesting. However the CPP reference manual states that the policy 'reader_data_lifecycle.enable_invalid_samples' is deprecated and should be replaced by 'reader_data_lifecycle.invalid_sample_visibility'. Does setting reader_data_lifecycle.invalid_sample_visibility to NO_INVALID_SAMPLES as the same effect as setting reader_data_lifecycle.enable_invalid_samples to false? The documentation says that "applications will be notified of instance_state change only if there is a sample available in the data reader". I guess that this is a sample that has not yet been taken. What would be the instance_state of this sample? In other words, if I set reader_data_lifecycle.invalid_sample_visibility to NO_INVALID_SAMPLES am I guaranteed that I will never receive a invalid sample when I use the options DDS::NOT_READ_SAMPLE_STATE, DDS::ANY_VIEW_STATE, and DDS::ALIVE_INSTANCE_STATE with the Take function? Thanks, Luca
  8. Instance state and view state

    Hi James, Just a last question on this topic. Is it guaranteed that when I call the take functions with parameters - DDS::NOT_READ_SAMPLE_STATE - DDS::ANY_VIEW_STATE - DDS::ALIVE_INSTANCE_STATE The returned sample will always be valid (i.e. valid_data flag set to true). If not, is there a way to retrieve only valid data? Thanks, Luca
  9. Community edition vs enterprise edition

    Hi Hans, Thanks, that was really clear. One last question related to the license. As I understood both community and commercial editions are released under LGPL. Does it mean that, as long as open splice is dynamically linked, both community and commercial edition can be used to develop closed source applications? Thanks again, Luca
  10. Community edition vs enterprise edition

    Hi all, Is there a clear comparison of what are the feature offered by the community edition and what are the ones offered by the enterprise edition? For example, I understand that the shared memory deployment is not available in the community edition. How about RMI? In general, when reading the documentation provided with the community edition (all the PDFs), I find hard to understand which features are available only with the enterprise edition. Thanks, Luca
  11. Instance state and view state

    Hi James, You are right, this samples are marked as invalid. Thanks for explaining the rationale. Luca
  12. Instance state and view state

    Hi all, In order to understand better how Opensplice works I've modified the Hello World example in this way: - The publisher sends at 50 Hz the Hello World message. Every time a new message is sent the userID field is increased by 1. - The subscriber checks at 50 Hz if new messages are available, and in that case prints some information (see the code below) - The subscriber data reader uses the take function, with the arguments reported below ReturnCode_t status = HelloWorldReader->take(msgList, infoSeq, LENGTH_UNLIMITED, NOT_READ_SAMPLE_STATE, ANY_VIEW_STATE, ANY_INSTANCE_STATE); checkStatus(status, "msgDataReader::take"); for (DDS::ULong j = 0; j < msgList.length(); j++) { cout << "userID : " << msgList[j].userID << " - Msg: " << msgList[j].message << " - Sample state: " << infoSeq[j].sample_state << " - Instance alive: " << infoSeq[j].instance_state << " - View state: " << infoSeq[j].view_state << endl; } status = HelloWorldReader->return_loan(msgList, infoSeq); If I run subscriber and publisher, let the publisher writing some messages (e.g. 100), and then stop the publisher but not the subscriber: The subscriber regularly receives the 100 messages with the following states: Sample state: 2 - Instance alive: 1 - View state: 1 As soon as the data writer, publisher, topic, and participant are deleted, the subscriber receives again the same 100 messages. However this time the states are: Sample state: 2 - Instance alive: 4 - View state: 2 Now, I know that I could configure the take function in such a way to receive only messages from alive instances and not viewed before. However I would like to understand why these messages are received a second time. Some additional information: I configured the topic to have a VOLATILE durability QoS I'm using open splice under Ubuntu 14.04, compiler GCC, default XML configuration file, and latest version downloaded from github. Thanks, Luca
  13. No message delivered when there is no network connection

    Hi Hans, Thanks for your answer. I will spend more time looking into this and I'll let you know. Luca
  14. Hi all, I just started exploring DDS and I've realized that when my computer does not have a network connection (ethernet and wireless both active but disconnected), I can publish and receive messages between two processes. I'm using the default configuration file "ospl.xml", where the domain name is "ospl_sp_ddsi". Now I have two questions: 1) How can I configure the system in such a way that the publisher/subscriber works also when there is no network connection? 2) Is there a way to configure the system in such a way that all the messages are not received by other computers that are on the same network? Thanks, Luca
×