45 log(
Debug) <<
"createTaskContextProxy" <<endlog();
46 return ::RTT::corba::TaskContextProxy::Create(name,
false);
55 log(
Debug) <<
"createTaskContextProxyIORFile" <<endlog();
56 std::ifstream iorfile( iorfilename.c_str() );
57 if (iorfile.is_open() && iorfile.good() ) {
60 return ::RTT::corba::TaskContextProxy::Create( ior,
true);
63 log(
Error) <<
"Could not open IORFile: '" << iorfilename <<
"'."<< endlog();
74 log(
Debug) <<
"createTaskContextProxyIOR" <<endlog();
75 return ::RTT::corba::TaskContextProxy::Create( ior,
true);
82 log(
Info) <<
"Registering TaskContextProxy factory." <<endlog();
89 this->
addOperation(
"aliasServer", &
CorbaDeploymentComponent::createAliasServer,
this,
ClientThread).doc(
"Creates a CORBA TaskContext server for the given component using an alias").arg(
"tc",
"Name of the RTT::TaskContext (must be a peer).").arg(
"alias",
"Alias to use when registering to the CORBA Namingservice").arg(
"UseNamingService",
"Set to true to use the naming service.");
102 log(
Error)<<
"No such peer: "<< tc <<endlog();
114 log(
Error)<<
"No such peer: "<< tc <<endlog();
124 if ( dynamic_cast<RTT::corba::TaskContextProxy*>(c) ) {
126 for ( CompMap::iterator cit =
compmap.begin(); cit !=
compmap.end(); ++cit) {
127 if (cit->second.instance == c) {
128 cit->second.proxy =
true;
138 log(
Info) <<
"Name:"<< c->
getName() <<
" Server: " << server <<
" Naming: " << use_naming <<endlog();
bool createServer(const std::string &tc, bool use_naming)
bool createAliasServer(const std::string &tc, const std::string &alias, bool use_naming)
virtual bool componentLoaded(RTT::TaskContext *c)
static boost::shared_ptr< ComponentLoader > Instance()
virtual TaskContext * getPeer(const std::string &peer_name) const
virtual void componentUnloaded(RTT::TaskContext *c)
CorbaDeploymentComponent(const std::string &name, const std::string &siteFile="")
static void CleanupServer(TaskContext *tc)
static TaskContextServer * Create(TaskContext *tc, bool use_naming=true, bool require_name_service=false)
RTT::TaskContext * createTaskContextProxyIOR(std::string ior)
RTT::TaskContext * createTaskContextProxyIORFile(std::string iorfilename)
RTT::TaskContext * createTaskContextProxy(std::string name)
virtual ~CorbaDeploymentComponent()
Operation< Signature > & addOperation(Operation< Signature > &op)
virtual const std::string & getName() const