[Bug 534] New: [Project] deployer can not connect to CORBA components

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=534>

           Summary: [Project] deployer can not connect to CORBA components
           Product: OCL
           Version: 1.4.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Deployment
        AssignedTo: orocos-dev at lists [dot] mech [dot] kuleuven [dot] be
        ReportedBy: peter.soetens at fmtc [dot] be
                CC: orocos-dev at lists [dot] mech [dot] kuleuven [dot] be
   Estimated Hours: 0.0

When loading an application from an XML file, one can not specify that a
component must connect to remote component. An easy fix would be to have a
'ControlTaskProxy' (or 'Remote') component type in the XML file which leads to
connection to a remote component from the current application. The name would
be resolved using the naming service. One could also specify IORs in an XML
file. You could define the 'IORFile' component type in which the component name
must be interpreted as a filename.

  <struct name="Camera" type="Remote">
     ...
  </struct>
  <struct name="/tmp/Camera.ior" type="IORFile">
     ...
  </struct>

Other suggestions ?


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

[Bug 534] [Project] deployer can not connect to CORBA components

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=534>

--- Comment #1 from Tinne De Laet <tinne.delaet at mech [dot] kuleuven [dot] be>  2008-04-23 13:54:16 ---

Created an attachment (id=267)

 --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=267)

Example of component which can be deployed and connects to remote components
using corba

(In reply to comment #0)
> When loading an application from an XML file, one can not specify that a
> component must connect to remote component. An easy fix would be to have a
> 'ControlTaskProxy' (or 'Remote') component type in the XML file which leads to
> connection to a remote component from the current application. The name would
> be resolved using the naming service. One could also specify IORs in an XML
> file. You could define the 'IORFile' component type in which the component name
> must be interpreted as a filename.
>
> <struct name="Camera" type="Remote">
> ...
> </struct>
>
> <struct name="/tmp/Camera.ior" type="IORFile">
> ...
> </struct>
>
> Other suggestions ?
>

In our latest experiments, we used, just as you suggest, a seperate component
(we named it corbaclient), which connects to remote components. (I attached the
source )
This component had ports which were in fact just copies of the ports of the
remote component. The task of the corbaclient component was to put the value on
the ports of the remote component on the corbaclient ports, such that they can
be used by other local components.
We gave the corbaclient a poperty with the file name of the IOR of the remote
component:

  1 <?xml version="1.0" encoding="UTF-8"?>
  2 <!DOCTYPE properties SYSTEM "cpf.dtd">
  3 <properties>
  4   <simple name="ior_file" type="string"><description>ior

file</description><value>Estimation.ior</value></simple>

  5 </properties>

The xml of our corbaclient looked like this;

 <struct name="corbaClient" type="iTaSC::corbaClient">

347 <struct name="Activity" type="PeriodicActivity">
348 <simple name="Period" type="double"><value>0.01</value></simple>
349 <simple name="Priority" type="short"><value>0</value></simple>
350 <simple name="Scheduler"
type="string"><value>ORO_SCHED_RT</value></simple>
351 </struct>
352 <simple name="AutoConf" type="boolean"><value>0</value></simple>
353 <simple name="AutoStart" type="boolean"><value>0</value></simple>
354 <simple name="PropertyFile"
type="string"><value>cpf/corbaClient.cpf</value></simple>
355 <struct name="Ports" type="PropertyBag">
356 </struct>
357 <struct name="Peers" type="PropertyBag">
358 <simple type="string"><value>iTaSC</value></simple>
359 </struct>
360 </struct>

I have no idea if this was the best solution but is certainly worked :).

Tinne


[Bug 534] [Project] deployer can not connect to CORBA components

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=534>

Peter Soetens <peter.soetens at fmtc [dot] be> changed:

           What    |Removed                     |Added
 --------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|orocos-                     |peter.soetens@fmtc.be
                   |dev@lists.mech.kuleuven.be  |
--- Comment #2 from Peter Soetens <peter.soetens at fmtc [dot] be>  2008-04-28 17:36:51 ---

Created an attachment (id=268)

 --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=268)

Connects to remote components, creating local proxies.

This is a cleaner solution than Tine's patch. It allows to create a proxy for a
remote component using the name service or the IOR or the IOR file.

Say you have a remote Orocos component with the name 'MyComponent', you can
connect to it by using the XML syntax:

 <!-- Uses Naming Service to lookup 'Mycomponent' -->
 <struct name="MyComponent" type="CORBA">
 </struct>
 <!-- Uses IOR file to lookup 'Mycomponent' -->
 <struct name="MyComponent.ior" type="IORFile">
 </struct>
 <!-- Uses literal IOR to lookup 'Mycomponent' -->
 <struct name="IOR:...." type="IOR">
 </struct>

Which will make this component available in your application, using the
same name as the original.
This also works for the TaskBrowser deployer commandi 'loadComponent':

 loadComponent("MyComponent", "CORBA")
 loadComponent("MyComponent.ior", "IORFile")
 loadComponent("IOR:.....", "IOR")

which allows to quickly connect to a remote component once you can copy/paste
the IOR into the console.


[Bug 534] [Project] deployer can not connect to CORBA components

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=534>

Peter Soetens <peter.soetens at fmtc [dot] be> changed:

           What    |Removed                     |Added
 --------------------------------------------------------------------------
 Attachment #268 is|0                           |1
           obsolete|                            |
--- Comment #3 from Peter Soetens <peter.soetens at fmtc [dot] be>  2008-04-29 21:21:05 ---

Created an attachment (id=269)

 --> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=269)

Allows to connect to servers *and* to create servers

Ruben's suggestion has been applied in this patch. Creation of servers is by
default off. You need to set the propertyi:

    <simple name="Server" type="boolean"><value>1</value></simple>

For each component. Also By default the Naming Service is used to register your
server with. If you don't want to use it, set:

    <simple name="UseNamingService" type="boolean"><value>0</value></simple>

in addition to the above property.


[Bug 534] [Project] deployer can not connect to CORBA components

For more infomation about this bug, visit <https://www.fmtc.be/bugzilla/orocos/show_bug.cgi?id=534>

Peter Soetens <peter.soetens at fmtc [dot] be> changed:

           What    |Removed                     |Added
 --------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
--- Comment #4 from Peter Soetens <peter.soetens at fmtc [dot] be>  2008-04-29 23:34:45 ---

The patch have been applied on trunk/ocl.

$ svn ci deployment/ bin/ -m"Applied patch from bug #534: [Project] deployer
can not connect to CORBA components
> Needed to move code around such that most properties are processed before the component is created.
> "
Sending bin/CMakeLists.txt
Sending bin/cdeployer.cpp
Adding bin/deployer-corba.cpp
Sending deployment/CMakeLists.txt
Adding deployment/CorbaDeploymentComponent.cpp
Adding deployment/CorbaDeploymentComponent.hpp
Sending deployment/DeploymentComponent.cpp
Sending deployment/DeploymentComponent.hpp
Sending deployment/tests/deployment.cpf
Transmitting file data .........
Committed revision 29212.