Error compiling cave canem

11 posts / 0 new
Last post
Offline
Last seen: 10 years 11 months ago
Joined: 09/26/2013
Posts: 13
Error compiling cave canem

Hello Folks,

I'm trying to use cave canem project for Cloud monitoring. I have OpenStack and RTI Connext running on Ubuntu 12.04. I'm new to RTI Connext. It is the first time for me to work on DDS application.

Below is the problem specification.

After importing cave canem project, I see many errored lines of codes in different files. below is a subset of the errors:

  • In plugin_manager.cpp under main, I see red line under the followings:

RTIOsapiLibrary_close(it->second);

Function 'RTIOsapiLibrary_close' could not be resolved

RTIOsapiLibrary_open

RTI_OSAPI_LIBRARY_RTLD_NOW

DDS_DomainParticipantFactoryQos

create_publisher_with_profile

DDS_TypeCodeFactory

  • In xml_parser.cpp under main, I see red line under the followings:

DDS_XMLParser_new()

DDS_XMLParser_delete

DDS_XMLExtensionClass_new

RTIOsapiHeap_allocateStructure

REDAString_duplicate

RTIXMLHelper_getAttribute

DDS_XMLObject_get_next_sibling

  • In xml_parser.hpp under main, I see red line under the following:

RTIBool

Note that many other errors are there under plugin_manager.cpp and xml_parser.cpp.

Seems there is a missing library or path that need to be added.

Please help me in identifying this problem.

Thanks in advance.

Emad

Organization:
rip
rip's picture
Offline
Last seen: 3 days 19 hours ago
Joined: 04/06/2012
Posts: 324

You should read the getting started guide.  First link on this page:  http://community.rti.com/documentation

Hint:  Probably NDDSHOME. 

Regards,

Offline
Last seen: 10 years 11 months ago
Joined: 09/26/2013
Posts: 13

Hi rip

Thank you for your comment.

Actually NDDSHOME is configured correctly:

rticonnext@ubuntu:~/Desktop/cavecanem_linux$ echo $NDDSHOME
/home/rticonnext/RTI/ndds.5.0.0

The Ubuntu distribution is provided by RTI. It has everything installed. Eclipse and Hello examples are already there and running.

I tried make for CPP Hello_simple and it worked fine.

The errors below appears once the make command is run for cavecanem.

Thanks,

Emad

rticonnext@ubuntu:~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux$ ls
cavecanem.sh  config  main  makefile  plugins  shared
rticonnext@ubuntu:~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux$ make i86Linux2.6gcc4.1.1
make -C main
make[1]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/main'
g++ -Wall  -I. -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -DRTI_UNIX -DRTI_LINUX -o xml_parser.o -c xml_parser.cpp
xml_parser.cpp: In member function ‘bool XML_parser::register_general_extensions(DDS_XMLParser*, DDS_XMLExtensionClass**)’:
xml_parser.cpp:535:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:550:28: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:566:28: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:581:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:596:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:611:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:625:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:639:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:653:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:668:28: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:683:28: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:698:28: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp: In member function ‘bool XML_parser::register_plugin_extensions(DDS_XMLParser*, DDS_XMLExtensionClass**)’:
xml_parser.cpp:743:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:756:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:769:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:782:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:796:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:810:33: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:824:33: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:838:33: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:853:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:867:29: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
xml_parser.cpp:880:33: error: too few arguments to function ‘DDS_XMLExtensionClass* DDS_XMLExtensionClass_new(const char*, void*, DDS_Boolean, DDS_Boolean, DDS_XMLExtensionClass_OnStartTagFunction, DDS_XMLExtensionClass_OnEndTagFunction, DDS_XMLExtensionClass_NewObjectFunction, DDS_XMLExtensionClass_DeleteObjectFunction, DDS_XMLExtensionClass_SaveObjectFunction)’
/home/rticonnext/RTI/ndds.5.0.0/include/ndds/dds_c/dds_c_xml.h:268:53: note: declared here
make[1]: *** [xml_parser.o] Error 1
make[1]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/main'
make: *** [i86Linux2.6gcc4.1.1] Error 2
rticonnext@ubuntu:~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux$

Fernando Garcia's picture
Offline
Last seen: 4 months 1 week ago
Joined: 05/18/2011
Posts: 200

Hi Emad,

The error you encountered is caused by a change in the XML parser APIs from RTI DDS 4.5d to RTI DDS 4.5f and above. To fix it, just add an extra NULL parameter in each call to DDS_XMLExtensionClass_new in the xml_parser.cpp file. For instance:

     user_extensions[i++] = DDS_XMLExtensionClass_new(\"plugin_element\",
                                                     NULL,
                                                     DDS_BOOLEAN_TRUE,
                                                     DDS_BOOLEAN_FALSE,
                                                     XML_parser_start,
                                                     XML_parser_plugin_end,
                                                     XML_parser_new,
                                                     XML_parser_delete,
                                                     NULL); // New parameter

Please, let me know if this fixes the problem. I will try to check in the fix in the Source Force repository this weekend. Also, keep us posted on your progress with Cave Canem. Your use case is really interesting.

Fernando.

Offline
Last seen: 10 years 11 months ago
Joined: 09/26/2013
Posts: 13

Thank you Fernando.

I think your suggestion solved the problem. Below is the build output after the change. I also tried to run the project. see below:

rticonnext@ubuntu:~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux$ make i86Linux2.6gcc4.1.1
make -C main
make[1]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/main'
Compiling main for i86Linux2.6gcc4.1.1
g++ -o cavecanem xml_parser.o plugin_manager.o cavecanem.o -L/home/rticonnext/RTI/ndds.5.0.0/lib/i86Linux2.6gcc4.1.1 -lnddsc -lnddscpp -lnddscore -ldl
make[1]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/main'
make -C plugins
make[1]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins'
make -C cpu
make[2]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/cpu'
g++ -Wall -fpic -I../../main -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -I../../shared/hyperic_sigar-1.6.4/include -DRTI_UNIX -DRTI_LINUX -o cpu.o -c cpu.cpp
Compiling plugin for i86Linux2.6gcc4.1.1
g++ -shared -o libcpu.so cpu.o -L../../shared/hyperic_sigar-1.6.4/lib -lsigar-x86-linux
rm cpu.o
make[2]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/cpu'
make -C memory
make[2]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/memory'
g++ -Wall -fpic -I../../main -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -I../../shared/hyperic_sigar-1.6.4/include -DRTI_UNIX -DRTI_LINUX -o memory.o -c memory.cpp
Compiling plugin for i86Linux2.6gcc4.1.1
g++ -shared -o libmemory.so memory.o -L../../shared/hyperic_sigar-1.6.4/lib -lsigar-x86-linux
rm memory.o
make[2]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/memory'
make -C disk
make[2]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/disk'
g++ -Wall -fpic -I../../main -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -I../../shared/hyperic_sigar-1.6.4/include -DRTI_UNIX -DRTI_LINUX -o disk.o -c disk.cpp
Compiling plugin for i86Linux2.6gcc4.1.1
g++ -shared -o libdisk.so disk.o -L../../shared/hyperic_sigar-1.6.4/lib -lsigar-x86-linux
rm disk.o
make[2]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/disk'
make -C net_load
make[2]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/net_load'
g++ -Wall -fpic -I../../main -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -I../../shared/hyperic_sigar-1.6.4/include -DRTI_UNIX -DRTI_LINUX -o net_load.o -c net_load.cpp
Compiling plugin for i86Linux2.6gcc4.1.1
g++ -shared -o libnet_load.so net_load.o -L../../shared/hyperic_sigar-1.6.4/lib -lsigar-x86-linux
rm net_load.o
make[2]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/net_load'
make -C proc
make[2]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/proc'
g++ -Wall -fpic -I../../main -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -I../../shared/hyperic_sigar-1.6.4/include -DRTI_UNIX -DRTI_LINUX -o proc.o -c proc.cpp
Compiling plugin for i86Linux2.6gcc4.1.1
g++ -shared -o libproc.so proc.o -L../../shared/hyperic_sigar-1.6.4/lib -lsigar-x86-linux
rm proc.o
make[2]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/proc'
make -C host_info
make[2]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/host_info'
g++ -Wall -fpic -I../../main -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -I../../shared/hyperic_sigar-1.6.4/include -DRTI_UNIX -DRTI_LINUX -o host_info.o -c host_info.cpp
Compiling plugin for i86Linux2.6gcc4.1.1
g++ -shared -o libhost_info.so host_info.o -L../../shared/hyperic_sigar-1.6.4/lib -lsigar-x86-linux
rm host_info.o
make[2]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/host_info'
make -C proc_stat
make[2]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/proc_stat'
g++ -Wall -fpic -I../../main -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -I../../shared/hyperic_sigar-1.6.4/include -DRTI_UNIX -DRTI_LINUX -o proc_stat.o -c proc_stat.cpp
Compiling plugin for i86Linux2.6gcc4.1.1
g++ -shared -o libproc_stat.so proc_stat.o -L../../shared/hyperic_sigar-1.6.4/lib -lsigar-x86-linux
rm proc_stat.o
make[2]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/proc_stat'
make -C snort
make[2]: Entering directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/snort'
g++ -Wall -fpic -I../../main -I/home/rticonnext/RTI/ndds.5.0.0/include -I/home/rticonnext/RTI/ndds.5.0.0/include/ndds -I../../shared/hyperic_sigar-1.6.4/include -DRTI_UNIX -DRTI_LINUX -o snort.o -c snort.cpp
Compiling plugin for i86Linux2.6gcc4.1.1
g++ -shared -o libsnort.so snort.o -L../../shared/hyperic_sigar-1.6.4/lib -lsigar-x86-linux
rm snort.o
make[2]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins/snort'
make[1]: Leaving directory `/home/rticonnext/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/plugins'
rticonnext@ubuntu:~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux$

I saw that after building the project there is an executable file appears under main directory. I tried to run that file but a problem appeared as following:

rticonnext@ubuntu:~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/main$ ./cavecanem
RTIOsapiLibrary_open:error opening library ../plugins/disk/libdisk.so: libsigar-x86-linux.so: cannot open shared object file: No such file or directory
Segmentation fault (core dumped)
rticonnext@ubuntu:~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux/main$

Why there isnt a different subscriber executable? should the subscriber run the same cavecanem file ?

Thanks,

Emad

Fernando Garcia's picture
Offline
Last seen: 4 months 1 week ago
Joined: 05/18/2011
Posts: 200

HI Emad,

In the top level directory (i.e., ~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux) you should find a script called cavecanem.sh. Try to run Cave Canem using that script, it will set up the environment for you—the application requires to add some libraries to the library path, in this case libsigar-x86-linux.so.

Thanks,
Fernando.

Offline
Last seen: 10 years 11 months ago
Joined: 09/26/2013
Posts: 13

Thank you very much Fernando.

I run cavecanem.sh, it seems fine

rticonnext@ubuntu:~/RTI/ndds.5.0.0/example/CPP/cavecanem_linux$ ./cavecanem.sh 
RTI Data Distribution Service EVAL License issued to KFUPM belawl.saeed@gmail.com For non-production use only.
Expires on 19-Dec-2013 See www.rti.com for more information.
Starting Cave Canem Publisher...

 

I expect this application to publish management information about the physical resources, cpu, memory, and so on

My question now, what should I do to subscribe to this information? There isnt a seperate subscribe program in the project.

Thank you in advance.

Emad

Fernando Garcia's picture
Offline
Last seen: 4 months 1 week ago
Joined: 05/18/2011
Posts: 200

Hi Emad,

You are right, the latest version of Cave Canem does not include a subscriber application. In my deployments I use RTI Real-Time Connect to subscribe to the monitoring information and store it on a MySQL Database. There is a web user interface, also available in Sourceforce, that helps you display the information stored in the database. If you want to try RTI Real-Time Connect, you will find it installed and configured in the RTI Live CD.

Attached to this post you will find an RTI Real-Time Connect configuration file prepared to subscribe and store monitoring information published by Cave Canem. Note that you will need to adapt the login configuration to your local configuration.

You may also create your own subscriber application to manage the monitoring data. It depends on your use case. What are you planning to do with the monitoring information you are gathering?

Fernando.

Offline
Last seen: 10 years 11 months ago
Joined: 09/26/2013
Posts: 13

Hi Fernando,
 
Thank you for your input. I appreciate it.
 
In this stage, I aim to subscribe to cave canem and show the moniotred information. showing this information in the console will be enough. Later I may use cave canem for more sophisticated use cases.   

I think that a database should be created before using RTI Real-Time Connect. if that is right, what schema to be used?

Using the RTI Analyzer, I see that cave canem publishes topics of struct type.

Is there an example of a subscriber to a struct type so I can use it?

Thanks,

Emad

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 14 min ago
Joined: 06/02/2010
Posts: 602

Hi,

It is very simple to subscribe to a structure type. Basically all you have to do is define your structure using IDL (or XML), then run rtiddsgen <myIDLFile> -example <myArchitecture> to generate the type-specific code, a makefile, and example publisher and subscriber for that structure.

Take a look at section 4.3.2 "Using Types Defined at Compile Time" of the RTI Connext DDS Getting Started Guide. It contains step by step instructions for different programming languages. Check also section 3.3 "Creating User Data Types with IDL" of the RTI Connext DDS User's Guide contains details on the syntat to use for different types.

Gerardo

Fernando Garcia's picture
Offline
Last seen: 4 months 1 week ago
Joined: 05/18/2011
Posts: 200

Hi Emad,

I have checked in an updated version of Cave Canem compatible with RTI Connext DDS 5.0.0, including the fix we commented to solve the issue with all the calls to DDS_XMLExtensionClass_new.

I have also made changes to the build infrastructure. Cave Canem uses now CMake to generate Makefiles or Visual Studio solutions to build the application. This makes it easier to get the application to work in different environments. These are the new steps to build and run the newest version of Cave Canem.

1. Install CMake in your environment

Note that Cave Canem requires CMake 2.8.7 or higher.

1.1 Installing CMake on Linux

Many distributions include CMake in their repositories. In Debian-based distributions, such as Ubuntu, you can install CMake via apt-get:

$ apt-get install cmake

In Fedora or RedHat based distributions, such as CentOS, run:

$ yum install cmake

You can also download an installer with CMake's latest version from Kitware's webpage.

$ chmod +x cmake-<current_version>-Linux-386.sh
./cmake-<current_version>-Linux-386.sh

The self-extracting installer will install CMake in a location of your choice.

1.2 Installing CMake on Windows

Kitware provides a simple installer for Windows. You can download this installer from Kitware's webpage. Make sure to add cmake to your path to make it easier to use the tool via command line. 

1.3 Installing CMake on OS X

Kitware provides two different dmg images for OS X. If you run Snow Leopard or later, use cmake-<version>-Darwin64-universal.dmg, if you run an earlier version of OS X, install cmake-<version>-Darwin-universal.dmg  instead. Both images contain a pkg file. Double click on it and follow the installation wizard to complete the installation.

You can also install CMake on OS X via Macports running:

$ port install cmake

2. Build Cave Canem

Once you have installed CMake in your environment, you can run the CMake script to generate makefiles or Visual Studio solutions to build Cave Canem. The CMake scripts require you to set two parameters:

  • NDDSHOME  Path to your RTI Connext DDS installation.
  • ARCHITECTURE  Connext DDS architecture you are using (e.g., i86Linux2.6gcc4.4.5).

These variables can be passed either as parameters to the CMake scripts or set as environment variables.

2.1. Building Cave Canem on Linux

Assuming the CMake script is in your path and the Connext DDS architecture you are running is i86Linux2.6gcc4.4.5, change to the src directory and run:

$ cd cavecanem/src
$ cmake -DNDDSHOME=/path/to/your/connext/installation/ndds.x.x.x -DARCHITECTURE=i86Linux2.6gcc4.4.5

CMake will generate a makefile under the src directory capable of building Cave Canem and its plug-ins. Run this makefile to build the application from the src directory:

$ make

2.2. Building Cave Canem on Windows 

Assuming the CMake script is in your path and the Connext DDS architecture you want to use is i86Win32VS2010, change to the src directory and run:

> cd cavecanem\src
> cmake.exe -DNDDSHOME=C:\path\to\your\connext\installation\ndds.x.x.x -DARCHITECTURE=i86Win32VS2010

CMake will generate a Visual Studio solution under the src directory called cavecanem.sln that you can use to build Cave Canem and its plug-ins. Open the solution, right click on "Solution cavecanem" and click on build.

2.3. Building Cave Canem on OS X

Assuming the CMake script is in your path and the Connext DDS architecture you want to use is x64Darwin10gcc4.2.1, change to the src directory and run:

$ cd cavecanem/src
$ cmake -DNDDSHOME=/path/to/your/connext/installation/ndds.x.x.x -DARCHITECTURE=x64Darwin10gcc4.2.1

CMake will generate a makefile under the src directory capable of building Cave Canem and its plug-ins. To start building the application, just enter make from the src directory 

$ make

3. Run Cave Canem

The Makefiles and Visual Studio projects generated will create an executable under the src directory called cavecanem or cavecanem.exe. They will also create shared libraries containing the different plug-ins that gather monitoring information under the src/plugins directory (e.g., src/plugins/cpu/libcpu.so).

To run Cave Canem, just run the cavecanem executable fileit will automatically load the plug-ins it is configured to load (see config/cavecanem.xml configuration file) based on their location.

  • On Linux and OSX run:
    $ ./cavecanem
  • On Windows run:
    > cavecanem.exe