Skip to content

Commit

Permalink
Merge pull request orocos-toolchain#93 from snrkiwi/optionally-not-ou…
Browse files Browse the repository at this point in the history
…tput-corba-ior

corba: Optionally support not emitting IORs if name service not used
  • Loading branch information
meyerj committed Jun 30, 2015
2 parents d49a05d + ec20a3f commit 6169026
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/check_depend.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ endif()
OPTION(PLUGINS_ENABLE "Enable plugins" ON)
OPTION(PLUGINS_STD_TYPES_SUPPORT "Enable support for the std::string and std::vector<double> types in the RTT typekit & transports." ON)

OPTION(ORO_NO_EMIT_CORBA_IOR "Do not emit CORBA IORs if name service not used" OFF)

###########################################################
# #
# Look for dependencies required by individual components #
Expand Down
2 changes: 2 additions & 0 deletions rtt/os/targets/target-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@

#cmakedefine ORO_REMOTING

#cmakedefine ORO_NO_EMIT_CORBA_IOR

#cmakedefine OROBLD_DISABLE_LOGGING
#cmakedefine OROSEM_PRINTF_LOGGING
#cmakedefine OROSEM_FILE_LOGGING
Expand Down
4 changes: 4 additions & 0 deletions rtt/transports/corba/TaskContextServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ namespace RTT
else
{
log(Warning) << err << endlog();
#ifndef ORO_NO_EMIT_CORBA_IOR
log() <<"Writing IOR to 'std::cerr' and file '" << taskc->getName() <<".ior'"<<endlog();

// this part only publishes the IOR to a file.
Expand All @@ -183,6 +184,7 @@ namespace RTT
std::ofstream file_ior( iorname.c_str() );
file_ior << ior.in() <<std::endl;
}
#endif
return;
}
}
Expand Down Expand Up @@ -220,6 +222,7 @@ namespace RTT
} // use_naming
else {
log(Info) <<"CTaskContext '"<< taskc->getName() << "' is not using the CORBA Naming Service."<<endlog();
#ifndef ORO_NO_EMIT_CORBA_IOR
log() <<"Writing IOR to 'std::cerr' and file '" << taskc->getName() <<".ior'"<<endlog();

// this part only publishes the IOR to a file.
Expand All @@ -232,6 +235,7 @@ namespace RTT
std::ofstream file_ior( iorname.c_str() );
file_ior << ior.in() <<std::endl;
}
#endif
return;
}
}
Expand Down

0 comments on commit 6169026

Please sign in to comment.