Issues in building Integrate Medical Devices RTI Connext DDS in windows

19 posts / 0 new
Last post
bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10
Issues in building Integrate Medical Devices RTI Connext DDS in windows

I had installed Connext DDS Professional  5.2 on windows 8.1 machine,  and cloned code from git repositry (https://github.com/rticommunity/rticonnextdds-usecases-medical/tree/master/MedicalDevices)  of RTI Connext DDS Use Case: Medical Device Connectivity and followed the steps mentioned to build the code.

First step is "

 the first thing you must do is set an environment variable 
called NDDSHOME. This environment variable must point to the ndds.5.x.x 
directory inside your RTI Connext DDS installation

But i cant find any directory with ndds.5.x.x  in the Connext DDS Professional  5.2.Then i set NDDSHOME to directory(C:\Program Files\rti_connext_dds-5.2.0) where i installed Connext DDS Professional  5.2.

and followed second step

start by opening the file 
win32\MedicalDeviceIntegrationExample-<compilerver>.sln.

In visual studio, found three components to build.BedsideSupervisor and PatientDeviceApp are not buiding with following issues

 

Visual Studio 2012 - error LNK1104: cannot open file 'nddscppzd.lib

nddscppzd.lib(DomainParticipantFactory.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
1>c1xx : fatal error C1083: Cannot open source file: '..\src\BedsideSupervisor\DDSNetworkInterface.cxx': No such file or directory
1> BedsideSupervisor.cxx
1>c1xx : fatal error C1083: Cannot open source file: '..\src\BedsideSupervisor\BedsideSupervisor.cxx': No such file or directory

Error 4 error LNK1104: cannot open file 'nddscppzd.lib' D:\technical\Hadoop_Learning\MedicalDevices\MedicalDevices\ExampleCode\win32\LINK PatientDeviceApp
Error 3 error C1083: Cannot open source file: '..\src\BedsideSupervisor\DDSNetworkInterface.cxx': No such file or directory D:\technical\Hadoop_Learning\Med

Please help me out in solving the issues and configuring environment varaibles with Connext DDS Professional  5.2

 

Organization:
rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

Hello bhanuppratap, 

I didn't update the build instructions correctly - yikes!  You got past the first hurdle, you were right to set NDDSHOME to rti_connext_dds-5.2.0.

For the second piece:  I've updated the BedsideSupervisor application to be a Java application instead of C++, and the instructions are to import the project into Eclipse and build from there, rather than building the solution.  I'll update the README today to fix those instructions.  Sorry for the confusion, I'll make sure that's all fixed today. 

Thank you!

Rose

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

Also: I modified the .sln file a few days ago to remove the BedsideSupervisor project, since it is now a Java application.  I'm not quite sure why the version you have is referring to the Bedside Supervisor source at all.  I mistakenly didn't remove the actual BedsideSupervisor project file, which I will do now, but I'm still confused about why it's trying to build using that source file.

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

Hi rose,

         Thanks for the reply and fixing issues.  I have followed video tutorial  in the link  http://www.rti.com/resources/usecases/medical-devices.html and git read.me  to build the code, there i found  to build c++ component bedsidesupervisor.So while i load sln files. It has one compnent PatientDeviceApp and i implicity load the c++ besidesupervisor and tried to build , and i have not found any clue in git read.me to build the java  Bedside Supervisor appliaction.Anyway,you made me clear about the issues, i was facing.

Thanks & Regards,
Bhanu prathap maruboina,
+91-94-909-047-94

 

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

Hello Bhanu, 

I just updated the README this morning, but it will take a little while longer to update the video tutorial. :) 

For the Java applications, I have two separate .project files that can be loaded into Eclipse, one for the BedsideSupervisor, and one for the HMI.  The biggest challenge in Eclipse is that you will have to set up the Run project to have the path set up correctly – RTI Connext's libraries have to be in the PATH/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH.  

 

Eclipse run configuration

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

Hi rose,

           Importing the java Beside Supervisor application in the ecllipse  and running ant build ,fails with errors, found package com.rti.medical. is missing from source. Please have a look at screenshots

 

 

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

Can you show me the output from when you run the ant build?  If the build.xml file runs correctly, it will generate the files that are in com.rti.generated.

Here is the output of my build, when I right-click and "Run As" Ant build.

Ant build output

 

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

Please have a look

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

Resolved the package com.rti.generated  missing error by including the preprocessor CL.EXE in the path

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

 Application launch file is misssing for java Beside  Supervisor application.Please have a look at Beside Supervisor directory in the ecllipse for lauch file                                         

 

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

I added a .launch file to the project.  If you have any problems launching, that's the step where you may need to update the environment variables to point to your Connext installation location.   Unfortunately, launch files don't seem to accept environment variables, or it would be easier to create a generic one.

Edit:  I mean, they can't contain system environment variables like %NDDSHOME%.  

Thank you!

Rose

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

Hi rose,

I tried to build the solution MedicalDeviceIntegrationExample-vs2010.sln (PatientDeviceApp) but I am getting following error

" nddscppzd.lib(DomainParticipantFactory.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

As per error I changed application target plateform to X86 as well as X64 but in both case problem is same, I am not able to rebuild the PatientDeviceApp.I am posting complete error stack. Please help me , How can I rebuild this application in VC++ VS2010.

 

1>------ Rebuild All started: Project: SharedDataTypes, Configuration: Debug Win32 ------
1>Build started 02-11-2015 18:52:34.
1>InitializeBuildStatus:
1> Creating "Debug\i86Win32VS2010\SharedDataTypes\SharedDataTypes.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>CustomBuild:
1> Generating .cxx files from alarm.idl ...
1> INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
1> rtiddsgen20_859722659682328607.cc
1> INFO com.rti.ndds.nddsgen.Main Done
1> Generating .cxx files from ice.idl ...
1> INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
1> rtiddsgen20_8501949229260722767.cc
1> INFO com.rti.ndds.nddsgen.Main Done
1> Generating .cxx files from patient.idl ...
1> INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
1> rtiddsgen20_4032862323447091261.cc
1> INFO com.rti.ndds.nddsgen.Main Done
1> Generating .cxx files from profiles.idl ...
1> INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
1> rtiddsgen20_7164895022093036185.cc
1> INFO com.rti.ndds.nddsgen.Main Done
1>ClCompile:
1> profilesSupport.cxx
1> profilesPlugin.cxx
1> profiles.cxx
1> patientSupport.cxx
1> patientPlugin.cxx
1> patient.cxx
1> iceSupport.cxx
1> icePlugin.cxx
1> ice.cxx
1> alarmSupport.cxx
1> alarmPlugin.cxx
1> alarm.cxx
1> Generating Code...
1>profilesPlugin.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1>profiles.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1> SharedDataTypes.vcxproj -> D:\technical\Hadoop_Learning\rticonnextdds-usecases-medical\MedicalDevices\ExampleCode\win32\Debug\SharedDataTypes.lib
1>FinalizeBuildStatus:
1> Deleting file "Debug\i86Win32VS2010\SharedDataTypes\SharedDataTypes.unsuccessfulbuild".
1> Touching "Debug\i86Win32VS2010\SharedDataTypes\SharedDataTypes.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:30.96
2>------ Rebuild All started: Project: PatientDeviceApp, Configuration: Debug Win32 ------
2>Build started 02-11-2015 18:53:05.
2>InitializeBuildStatus:
2> Touching "Debug\i86Win32VS2010\PatientDeviceApp\PatientDeviceApp.unsuccessfulbuild".
2>ClCompile:
2> DDSPatientDeviceInterface.cxx
2> PatientDeviceGenerator.cxx
2>d:\technical\hadoop_learning\rticonnextdds-usecases-medical\medicaldevices\examplecode\src\patientdevices\patientdevicegenerator.cxx(109): warning C4018: '<' : signed/unsigned mismatch
2> DDSCommunicator.cxx
2> Generating Code...
2>nddscppzd.lib(DomainParticipantFactory.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:08.14

 

 Thanks & Regards,
Bhanu prathap maruboina,
+91-94-909-047-94

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

The last step you need to do is to convert the project from a 32-bit to 64-bit Windows project (it looks like).

To do that, open the configuration manager.  (I got there from the project properties):

Project Properties -> Configuration Manager

Inside the Configuration Manager, change the configuration to x64. This should automatically change the projects to use x64, too.

x64 properties

Your last step, is that you will have to change the libraries that the project expects to be the ones in  your rti_connext_dds-5.2.0/lib directory, such as:

library configuration

After that, it should build.

Thank you!

Rose

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

Hi rose,

   I have done the steps you mentioned to convert the project from a 32-bit to 64-bit Windows project

  • project properties->Configuration Manager->changing the configuration to x64
  • Changing the Additional libraries ddirectory to $(NDDSHOME)/lib/x64Win64VS2012

And then build the solution.I  stuck with the  following issues in the error stack

 

1>------ Rebuild All started: Project: SharedDataTypes, Configuration: Debug x64 ------
1>Build started 02-11-2015 23:55:07.
1>_PrepareForClean:
1> Deleting file "Debug\i86Win32VS2010\SharedDataTypes\SharedDataTypes.lastbuildstate".
1>InitializeBuildStatus:
1> Creating "Debug\i86Win32VS2010\SharedDataTypes\SharedDataTypes.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>CustomBuild:
1> Generating .cxx files from alarm.idl ...
1> INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
1> rtiddsgen20_263704095869277639.cc
1> INFO com.rti.ndds.nddsgen.Main Done
1> Generating .cxx files from ice.idl ...
1> INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
1> rtiddsgen20_5494220431451761586.cc
1> INFO com.rti.ndds.nddsgen.Main Done
1> Generating .cxx files from patient.idl ...
1> INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
1> rtiddsgen20_8075528881372466197.cc
1> INFO com.rti.ndds.nddsgen.Main Done
1> Generating .cxx files from profiles.idl ...
1> INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
1> rtiddsgen20_8553406931407167930.cc
1> INFO com.rti.ndds.nddsgen.Main Done
1>ClCompile:
1> profilesSupport.cxx
1> profilesPlugin.cxx
1> profiles.cxx
1> patientSupport.cxx
1> patientPlugin.cxx
1> patient.cxx
1> iceSupport.cxx
1> icePlugin.cxx
1> ice.cxx
1> alarmSupport.cxx
1> alarmPlugin.cxx
1> alarm.cxx
1> Generating Code...
1>profilesSupport.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1>profilesPlugin.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1>profiles.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1> SharedDataTypes.vcxproj -> D:\technical\Hadoop_Learning\rticonnextdds-usecases-medical\MedicalDevices\ExampleCode\win32\x64\Debug\SharedDataTypes.lib
1>FinalizeBuildStatus:
1> Deleting file "Debug\i86Win32VS2010\SharedDataTypes\SharedDataTypes.unsuccessfulbuild".
1> Touching "Debug\i86Win32VS2010\SharedDataTypes\SharedDataTypes.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:31.21
2>------ Rebuild All started: Project: PatientDeviceApp, Configuration: Debug x64 ------
2>Build started 02-11-2015 23:55:38.
2>_PrepareForClean:
2> Deleting file "Debug\i86Win32VS2010\PatientDeviceApp\PatientDeviceApp.lastbuildstate".
2>InitializeBuildStatus:
2> Touching "Debug\i86Win32VS2010\PatientDeviceApp\PatientDeviceApp.unsuccessfulbuild".
2>ClCompile:
2> DDSPatientDeviceInterface.cxx
2> PatientDeviceGenerator.cxx
2> DDSCommunicator.cxx
2>..\src\CommonInfrastructure\DDSCommunicator.cxx(152): warning C4267: 'argument' : conversion from 'size_t' to 'DDS_Long', possible loss of data
2>..\src\CommonInfrastructure\DDSCommunicator.cxx(152): warning C4267: 'argument' : conversion from 'size_t' to 'DDS_Long', possible loss of data
2> Generating Code...
2>nddscorezd.lib(TypeObjectEnumerationType.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Interfaces.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Udpv6InterfaceListener.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(SQLStatements.obj) : error LNK2019: unresolved external symbol __report_rangecheckfailure referenced in function WriterHistoryOdbcPlugin_createChangeFromNotElapsedToKeepIfPossibleForKeepDurationIfAckStatement
2>nddscorezd.lib(Parser.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(ContextStack.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(TypeObjectStructureType.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(TypeObjectUnionType.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Common.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Environment.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Object.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Udpv6.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(DBShell.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Configurator.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(TypeObjectTable.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Infrastructure.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(Utils.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(Log.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(CdrPrint.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddscorezd.lib(String.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(StringSeq.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(DataWriter.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(DataReader.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(Version_t.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(DomainParticipant.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(DiscoveryQosPolicy.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(Subscriber.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>nddsczd.lib(Publisher.obj) : error LNK2001: unresolved external symbol __report_rangecheckfailure
2>D:\technical\Hadoop_Learning\rticonnextdds-usecases-medical\MedicalDevices\ExampleCode\win32\Debug\i86Win32VS2010\PatientDeviceApp.exe : fatal error LNK1120: 1 unresolved externals
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:07.96
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

 

Thanks& Regards,
Bhanu prathap maruboina
9490904794 

 

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

I believe the reason for this error is that you are using Visual Studio 2012, but the projects have not been converted from 2010.  When I opened the project in 2012, it asked me if I wanted to upgrade the projects. 

(I'm basing it off of this StackOverflow question: http://stackoverflow.com/questions/25273954/unresolved-external-symbol-report-rangecheckfailure)

I re-cloned the project, and didn't update to 2012, and I saw this option in the menu:

update project menu

I tested, and I got a linker error if I didn't update the project, and when I updated, it went away.

Thank you!

Rose

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

Hi rose,

          Thanks for the solution.It works for me in building PatientDeviceApp in C++.

           Now, I able to build all three compenents 

  •  PatientDeviceApp in C++.
  •  BedsideSupervisor in Java
  •  AlarmHMI in Java

        After building, to run the application and to view output, I have followed following steps

  • Running the DeviceData.bat in the MedicalDevices\ExampleCode\scripts directory to replay pre-recorded ECG data, pulse oximeter data from the ICE MDPnP device simulator(First screen below)
  • Running the PatientDeviceApp.bat by modifying the code as per my RTI lib directories and PatientDeviceApp.exe file folder(second screen below)

set Path=%NDDSHOME%\lib\i86Win32VS2010;%PATH% 

cd %dir%\..\win32\Release\x64Win64VS2012\

to

 

set Path=%NDDSHOME%\lib\x64Win64VS2012;%PATH%        

 cd %dir%\..\win32\Debug\i86Win32VS2010\ 

  • Running the BedsideSupervisor Application in java (got a blank command line screen i.e third screen below)
  • Running the AlarmHMI Application in java(fourth screen below)

Please have a look at the ouput screens when i run the above applications in the order mentioned above

 

 I started running all the four components from last 20 minutes and i haven't noticed any data in the screens and alarm data in output HMI java interface.Please clarify me that am i building and running the application in the right manner or correct me if i did any wrong, in building and running the application components

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

Hello Bhanu, 

I'm sorry it's been so painful – I'm going to work on the video tutorials sometime this week which should help, and the README is now correct.

There are a couple of reasons why you might not be seeing any alarms – the first one is if discovery is failing for some reason (which should not happen when the applications are on the same machine, unless I've broken the configuration when I updated).  

To start, can you run the rtiddsspy utility from the Utilities tab in Launcher?  Run it with domain ID 5, and with "printSamples" selected.  I'd like to see if it's actually receiving data.  I'll also add some information shortly on how to use our other tools to debug what might be happening.

Thank you!

Rose

bhanupratap's picture
Offline
Last seen: 9 years 1 month ago
Joined: 10/29/2015
Posts: 10

Hi Rose,

            Thanks for the vital support in building and running the RTI Medical devices application.I am getting the output data with triggered alarm data in HMI.It would be more useful for me to add some information  on how to use our other tools to debug what might be happening

Thanks& Regards, 
Bhanu prathap maruboina 
9490904794 

rose's picture
Offline
Last seen: 3 years 5 months ago
Joined: 08/22/2011
Posts: 148

Absolutely!  I'm trying to figure out the best format for giving information on using our data visualization tool. :)  I know that the tool developer is going to be creating a video on how to use it, but I'm not sure exactly when.