Jump to content
OpenSplice DDS Forum


  • Content count

  • Joined

  • Last visited

About bonjefir

  • Rank
    Advanced Member

Profile Information

  • Company
  1. Setter and Getter for IDLs' values

    Dear Hans, Thanks for your answer. Would you please fix this bug as soon as possible you can (before the upcoming release)? I have to change a lot in my codes because of this bug. Also I welcome any other solution. Regards, Bonjefir
  2. Hi I have an IDL as follows: module myPacket { module Building { module IDL_Floor { struct Sensors { boolean enable; float bonjefir; }; #pragma keylist Sensors enable }; }; }; In my code, I try to set a value for the float variable "bonjefir" as follows: myPacket::Building::IDL_Floor::Sensors data; data.bonjefir(100); But getting the following error: error: call of overloaded 'bonjefir(int)' is ambiguous I can solve this problem by modifying the files generated by "idlpp" command: file <myIDL.h> ... DDS::Float bonjefir() const { return this->bonefir_; } DDS::Float& bonjefir() { return this->bonjefir_; } void bonjrfir(DDS::Float _val_) { this->bonjefir_ = _val_; } #ifdef OSPL_DDS_CXX11 void bonjefir(DDS::Float&& _val_) { this->bonjefir_ = _val_; } // Comment this line #endif ... However setting the value of IDL like below is OK and working: data.bonjefir() = 100; // I don't like it data.bonjefir_ = 100; Is there any solution for this problem? Thanks in advance for your helps. Bonjefir
  3. Dynamic topic type discovery

    Dear robuser, Thanks for your answer. Please take a look at this: https://groups.google.com/forum/#!topic/ospl-developer/OM5mzg3-yaE . Based on the link above, I think OpenSplice will give me an API to do that in case of buying a commercial version but I am not sure about it and don't know anything about that API (language ...). Do you know anything about it? Thanks in advance for your help. Bonjefir
  4. Dynamic topic type discovery

    Hi Has anyone ever tried to record a topic without knowing its type (without record and replay manager)? Is it even possible to do that? Bonjefir
  5. Dynamic topic type discovery

    Hi I have recently read "http://forums.opensplice.org/index.php?/topic/2137-dds-reader-without-data-type/" and found that it was not possible to get one topic type dynamically in previous versions. I want to know whether this feature is available in the latest version of DDS community or even commercial. If it is available, I will appreciate it if you could provide me with an example. I think it is a very important and essential feature (At least I need it now ! ). Thanks in advance for your help. Bonjefir
  6. Dynamic allocation

    Dear robuser, Thanks a lot for your answer. The above code works fine. Best Regards, bonjefir
  7. Dynamic allocation

    Hi robuser, Thanks for your answer. I tried the same code for defining topic, publisher and datawriter but got the same error. I think your are right about the private nature of new operator. Best Regards, Bonjefir
  8. Problem writting a message

    Hi Hans, I have the same problem and the following errors appear in my ospl-error.log file: ddsi_udp_conn_write failed with error code 101 ddsi_conn_write failed -1 The strange thing is that these error are sometimes in my subscriber application which I do not define even one DataWriter. I think these errors appear when I send a lot of samples in network. I would be very appreciated if you could help me to solve it. Best Regards, Bonjefeir
  9. Dynamic allocation

    Dear robuser, Thanks for your answer. But I want to know whether it is possible to define a pointer like above or not. As far as I know, if I can not define a pointer to any DDS entities like above, I can not define a small pointer to them either. Do you have any idea to do that? Best Regards, Bonjefir
  10. Dynamic allocation

    Hi I have written a very simple program containing one class which have only one pointer to domain participant. Given below is the mentioned program: #include <QCoreApplication> #include "publisher.h" #include <QThread> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); return a.exec(); } #ifndef PUBLISHER_H #define PUBLISHER_H #include <dds/dds.hpp> #include "../IDL/myIDL/myIDL_DCPS.hpp" class Publisher { public: Publisher(); dds::domain::DomainParticipant *dp; }; #endif // PUBLISHER_H #include "publisher.h" Publisher::Publisher() { dp = new dds::domain::DomainParticipant(org::opensplice::domain::default_id()); } But I can not compile this program. The error is: "error: 'static void* dds::core::Reference<DELEGATE>::operator new(size_t) [with DELEGATE = org::opensplice::domain::DomainParticipantDelegate; size_t = long unsigned int]' is private Where does this error come from and what should be done for solving it? Thanks in advance for your help. Bonjefir
  11. Waitset detach error

    Dear Hans, First thanks for your help. Second I have done the appropriate work for the related thread (have joined for that thread to finish) but I will check that again. Anyway, I do not have the above error in OpenSplice Evaluation version (the code is exactly the same as before) and was wondering whether it is a bug in community version. Best Regards, Bonjefir
  12. Getting all topics and their QoSs in code

    Dear Hans, Could you give me a simple example for this? I looked at the Builtin example but it did not help. Bonjefir
  13. Reliability and History Relation

    Dear Hans, It's confusing and weird for me. Based on your quotation, " There's no such thing as a topic-cache .. ", I was wondering what is the need of History QoS for topic? Should it not only be applicable to DataWriter and DataReader? Maybe a dumb question but I would appreciate it if you could answer me. Thanks in advance for your help. Bonjefir
  14. Hi, I want to know whether there is a function for getting all topics and their related QoSs in one specified domain. I can find all topic names with dbd tool easily but I want to do it directly in my code. Thanks in advance for your help. Bonjefir
  15. Disposing instances immediately after writing

    Hi Hans, Thanks for your reply. According to the OpenSplice_refman_CPP document about unregistering instances ("This operation does not indicate that the instance should be deleted (that is the purpose of dispose ). This operation just indicates that the DataWriter no longer has “anything to say” about the instance."), I unregister written instances because the related DataWriter is no longer need to keep the written instances in its cache. So I decide to first unregister the written instance explicitly which cause the dds::core::policy::WriterDataLifecycle::AutoDisposeUnregisteredInstances() Qos to dispose it automatically. But with your help, I think it's not necessary to the that and lifespan QoS will do the deletion of written instances for me. Anyway thanks again for your help and support. Bonjefir