OpenDDS / OpenDDS

OpenDDS is an open source C++ implementation of the Object Management Group (OMG) Data Distribution Service (DDS). OpenDDS also supports Java bindings through JNI.
http://www.opendds.org
Other
1.29k stars 465 forks source link

Loading Qos profiles from ini file #1614

Closed kashif68 closed 4 years ago

kashif68 commented 4 years ago

Developer guide indicates that qos can be configured in the ini file. For example, snippet of entry that may look like in the ini file below. There doesn't seem to be an API to read them from ini file. How do we do this when default will not do. There seems to be XML version of "loader" in repo but haven't yet looked deeper in their usability. [datareaderqos/*] durability.kind=TRANSIENT_DURABILITY_QOS deadline.period.sec=DURATION_INFINITY_SEC deadline.period.nanosec=DURATION_INFINITY_NSEC latency_budget.duration.sec=DURATION_ZERO_SEC latency_budget.duration.nanosec=DURATION_ZERO_NSEC

mitza-oci commented 4 years ago

Developer guide indicates that qos can be configured in the ini file. For example, snippet of entry that may look like in the ini file below. There doesn't seem to be an API to read them from ini file.

Please be more specific about which part of the Developer's Guide you are referencing. If I had to guess this is in Static Discovery, which has a number of limitations - it's not really for general use.

How do we do this when default will not do. There seems to be XML version of "loader" in repo but haven't yet looked deeper in their usability.

There is the XML QoS loader which is based on the standard way of representing QoS in XML files. This is not part of the DDS core API, but is its own optional library.

kashif68 commented 4 years ago

Appreciated your quick response! Yeah it is given under Static Discovery and didn't realize it was exclusive for this case.

We want to talk to RTI DDS and they have bunch of QoS that are not default and want to set them up I guess in xml and apply appropriately.

Do you have any example or point to a location to get head start?

jwillemsen commented 4 years ago

See https://github.com/objectcomputing/OpenDDS/tree/master/tests/DCPS/QoS_XML/dump for a small example using the QoS XML support. The CIAO dds4ccm support uses also the QoS XML support, see https://github.com/DOCGroup/CIAO/tree/master/connectors/dds4ccm for its source code and all examples/tests

kashif68 commented 4 years ago

This is very helpful! Thanks! Any advise on how can I get this library and build it for my specific use. I am sure there are some dependencies?

mitza-oci commented 4 years ago

This is very helpful! Thanks! Any advise on how can I get this library and build it for my specific use. I am sure there are some dependencies?

configure OpenDDS with --xerces3, see docs/dependencies.md

kashif68 commented 4 years ago

thanks. will "make" build the qos_xml_library once configured?

kashif68 commented 4 years ago

After verifying that xerces is installed (ubuntu) Ran configure with --xerces3 <path to where .a and .so files are>

Below is the output

Options: 'verbose' => 1 'xerces3' => '/usr/lib/x86_64-linux-gnu' By default, --rapidjson is added to the options host system is: linux Auto-detecting compiler Found g++ at: /usr/bin/g++ compiler is: g++ Detected GCC >=6, default -std=gnu++14 Compiler has C++11 support Using ace_src: /mnt/c/development/c++/opendds/ubuntu/OpenDDS-3.14/ACE_wrappers Using tao_src: /mnt/c/development/c++/opendds/ubuntu/OpenDDS-3.14/ACE_wrappers/TAO --cmake not specified by user; searching path... Using CMake '/usr/bin/cmake' if needed Could not find RapidJSON (using 'include/rapidjson/rapidjson.h') in: Git Submodule: '/mnt/c/development/c++/opendds/ubuntu/OpenDDS-3.14/tools/rapidjson' Default Install Prefix: '/usr' Continuing without it. Enabling xerces3 ERROR: Can't find xerces3 at /usr/lib/x86_64-linux-gnu (using include/xercesc/dom/DOM.hpp). Stopped at ./configure line 1467.

kashif68 commented 4 years ago

The files at the path given to --xerces3

-rw-r--r-- 1 root root 3.5M Nov 10 2017 libxerces-c-3.2.so -rw-r--r-- 1 root root 12M Nov 10 2017 libxerces-c.a lrwxrwxrwx 1 root root 18 Nov 10 2017 libxerces-c.so -> libxerces-c-3.2.so

kashif68 commented 4 years ago

Hi Adam,

Your help will be greatly appreciated. the --xerces3 option doesn't seem to work? I try looking at the perl code but no luck yet. It expects include/xercesc/dom/DOM.hpp as a check but it is located under usr/include. If I give it /usr path to --xerces3 (though likely not the right thing) it still fails but at a different point

mitza-oci commented 4 years ago

Please run a "fresh" configure (as in, starting from a clean workspace with no generated files and no environment variables set by a previous configure) with just --xerces3 (no path after it), which would default to finding headers in /usr/include. If it doesn't work, please include logs of what failed and all details necessary to reproduce the problem.

kashif68 commented 4 years ago

Earlier configure and make have already deployed the libs and headers in usr/local/include/dds. Will second fresh run will overwrite the earlier one?

Thanks!!

kashif68 commented 4 years ago

Hi Adam, Please see the output of fresh run - seem to be skipping what we want to build: Skipping OpenDDS_XML_QOS_XSC_Generation (qos_xml_handler.mpc); it requires xsc.

Extracting archive ACE+TAO-2.2a_with_latest_patches_NO_makefiles.tar.gz Running MPC to generate makefiles. MPC_ROOT was set to /mnt/c/development/c++/opendds/ubuntu2/OpenDDS-3.14/ACE_wrappers/MPC. Using .../OpenDDS-3.14/ACE_wrappers/bin/MakeProjectCreator/config/MPC.cfg Generating 'gnuace' output using DDS_TAOv2.mwc Skipping TAO_IDL_GEN (tao_idl_fe.mpc); it requires tao_idl_fe_gen. Skipping OpenDDS_Security (DdsSecurity.mpc); it avoids no_opendds_security. Skipping OpenDDS_XML_QOS_XSC_Generation (qos_xml_handler.mpc); it requires xsc. Skipping OpenDDS_CorbaSeq (CorbaSeq.mpc); it avoids no_opendds_safety_profile. Skipping OpenDDS_Corba (OpenDDS_Corba.mpc); it avoids no_opendds_safety_profile. Skipping Monitor_App (Monitor.mpc); it requires qt5. Skipping ExcelRTD (ExcelRTD.mpc); it requires qt5. Skipping dissector (dissector.mpc); it requires wireshark_any. Skipping zerocopy_java_test (zerocopy.mpc); it requires java. Skipping two_idl (two_idl.mpc); it requires java. Skipping transport_config (transport_config.mpc); it requires java. Skipping participant_location_test (participant_location_test.mpc); it requires java. Skipping multirepo_test (multirepo_test.mpc); it requires java. Skipping subscriber_idl_test (subscriber_idl_test.mpc); it requires java. Skipping publisher_idl_test (publisher_idl_test.mpc); it requires java. Skipping messenger_idl_test (messenger_idl_test.mpc); it requires java. Skipping java_both_test (java_both_test.mpc); it requires java. Skipping hello_java_client (hello_java_client.mpc); it requires java. Skipping complex_idl_test (complex_idl_test.mpc); it requires java. Skipping builtintopics_test (builtintopics_test.mpc); it requires java. Skipping tao_java (tao_java.mpc); it requires java. Skipping idl2jni_test_simple (idl2jni_test_simple.mpc); it requires java. Skipping idl2jni_runtime (idl2jni_runtime.mpc); it requires java. Skipping idl2jni_corba (idl2jni_corba.mpc); it requires java. Skipping idl2jni_codegen (idl2jni_codegen.mpc); it requires java. Skipping dcps_java (dcps_java.mpc); it requires java. Generation Time: 28s Completed configuring OpenDDS, next run 'make' to compile OpenDDS and ACE+TAO. You can use the generated setenv.sh script to set environment variables for future shell sessions.

mitza-oci commented 4 years ago

No, xsc is a distinct feature from xerces3.

kashif68 commented 4 years ago

Greatly appreciated your help! Looks like it did build the library. The only thing extra I had to do is manually copy the headers and .so and .so link to /usr/local/... folders

Below is the snippet of how I ran it

./configure --xerces3 --prefix=/usr/local make sudo make install

kashif68 commented 4 years ago

Do have a question about OpendDDS talking to RTI DDS. Should I post a question as a new issue?

iguessthislldo commented 4 years ago

The only thing extra I had to do is manually copy the headers and .so and .so link to /usr/local/... folders

I did a quick test with a build I have and it looks like installing QoS_XML_Handler works fine. Did you have to just copy the QoS_XML_Handler files or all the ACE/TAO/OpenDDS files?

Do have a question about OpendDDS talking to RTI DDS. Should I post a question as a new issue?

If it's not related to QoS, yes please.

kashif68 commented 4 years ago

I had to copy QOS_XML_Handler stuff only - headers and lib What was different for my case was that I ran this second time from a fresh copy The first time around I never knew about QOX_XML_Handler as not part of the default build So the first time it did install all the stuff correctly in /usr/local folders The second time I didn't cleanup anything from first install under /usr/local folders

kashif68 commented 4 years ago

Also had to copy XML_Utils folder under ace. And the lib and its link /usr/local/lib/libACE_XML_Utils.so /usr/local/lib/libACE_XML_Utils.so.6.2a_p17

mitza-oci commented 4 years ago

We have a Jenkins CI build that uses "make install", all of these headers and libraries are indeed installed.