Si tiene algo de truquillo el asunto.<div><br></div><div>Cuando lo tengas andando si quieres lo metemos en la clase component [1]</div><div>Así tenemos todo bien estructurado.</div><div><br></div><div>[1] <a href="http://jderobot.org/apidoc/jderobot/5.0/doc/html/classjderobotice_1_1Component.html">http://jderobot.org/apidoc/jderobot/5.0/doc/html/classjderobotice_1_1Component.html</a><br>
<div><br></div><div>PD: Esto de la documentación en linea da juego... ;)</div><div><br><div class="gmail_quote">2010/3/19 Juan Gonzalez <span dir="ltr">&lt;<a href="mailto:juan@iearobotics.com">juan@iearobotics.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">SIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII!!!!!!<br>
<br>
It is starting to work!!<br>
<br>
Obijuan palomo<br>
<br>
<br>
El vie, 19-03-2010 a las 09:42 +0100, Juan Gonzalez escribió:<br>
<div><div></div><div class="h5">&gt; Hola,<br>
&gt;<br>
&gt;   Bueno, leyendo el manual, he conseguido solucionar mis problemas de<br>
&gt; compilación. Ya he conseguido hacer el mapeo entre las articulaciones<br>
&gt; del servidor (JointI) y asignarlas a JointSeq. El exorcismo en cuestión<br>
&gt; es este:<br>
&gt;<br>
&gt;     JointIPtr j1 = new JointI(pcontroller);<br>
&gt;     JointPrx proxy = JointPrx::uncheckedCast(adapter-&gt;addWithUUID(j1));<br>
&gt;     _JointSeq.push_back(proxy);<br>
&gt;<br>
&gt; Ahora compila, pero me sale un bonito<br>
&gt;<br>
&gt; /usr/include/IceUtil/Handle.h:46: IceUtil::NullHandleException<br>
&gt;<br>
&gt; en tiempo de ejecución al acceder desde el cliente a las articulaciones.<br>
&gt;<br>
&gt; Se me ha debido pasar algo por alto.... seguiré probando. Pero al menos,<br>
&gt; conseguir que me compilase ha sido todo un logro :-)<br>
&gt;<br>
&gt; os seguiré informando<br>
&gt;<br>
&gt; Saludos, Juan<br>
&gt;<br>
&gt; El vie, 19-03-2010 a las 09:35 +0100, Juan Gonzalez escribió:<br>
&gt; &gt; Hola David,<br>
&gt; &gt;<br>
&gt; &gt; Gracias por la info. Creo que voy a tener que dedicar un más poco de<br>
&gt; &gt; tiempo a la lectura del manual para familiarizarme con toda la<br>
&gt; &gt; terminología de ICE.<br>
&gt; &gt;<br>
&gt; &gt;   Me emocioné implementando la interfaz de Joint y pensé que JointsArray<br>
&gt; &gt; me llevaría menos tiempo. Me voy a documentar y luego volveré a la<br>
&gt; &gt; carga ;-)<br>
&gt; &gt;<br>
&gt; &gt; Saludos, Juan<br>
&gt; &gt;<br>
&gt; &gt; El jue, 18-03-2010 a las 13:43 -0400, David Lobato escribió:<br>
&gt; &gt; &gt; Mirate el ejemplo del manual del Filesystem, declaran una secuencia<br>
&gt; &gt; &gt; con la misma pinta.<br>
&gt; &gt; &gt; EL asunto es que tienes que crear las instancias de los Joints,<br>
&gt; &gt; &gt; añadirlas al object adapter y una vez echado a andar preguntar al<br>
&gt; &gt; &gt; object adapter por los proxys de cada una de las instancias.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; El tema concreto es servant locator.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; David.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 2010/3/18 Juan Gonzalez &lt;<a href="mailto:juan@iearobotics.com">juan@iearobotics.com</a>&gt;<br>
&gt; &gt; &gt;         Hola,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;          Todavía estoy muy verde con el ICE y tampoco soy un<br>
&gt; &gt; &gt;         programador en C++<br>
&gt; &gt; &gt;         experimentado, por lo que estoy encontrando problemas para<br>
&gt; &gt; &gt;         implementar<br>
&gt; &gt; &gt;         el servidor de jointsArray. Necesito algo de luz ;-)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;          De momento, estoy trabajando con esta interfaz:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         module jderobot {<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;            interface Joint {<br>
&gt; &gt; &gt;                idempotent  void setPos(short pos);<br>
&gt; &gt; &gt;                idempotent short getPos();<br>
&gt; &gt; &gt;            };<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;            sequence&lt;Joint*&gt; JointSeq;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;            interface JointsArray{<br>
&gt; &gt; &gt;                JointSeq getJoints();<br>
&gt; &gt; &gt;            };<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         };<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         La Interfaz &quot;Joint&quot; la tengo implementada y funciona bien. Mis<br>
&gt; &gt; &gt;         problemas<br>
&gt; &gt; &gt;         aparecen cuando intento implementar la función getJoints() de<br>
&gt; &gt; &gt;         la<br>
&gt; &gt; &gt;         interfaz &quot;JointsArray&quot;. No sé cómo crear los elementos de<br>
&gt; &gt; &gt;         JointSeq.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         Según he leido en el manual de ice, el mapeo de esto:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;            sequence&lt;Joint*&gt; JointSeq<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         a c++ debería ser:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;            vector&lt;Joint*&gt; JointSeq<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         Desde aquí tendría fácil acceso a Joint en el servidor. Pero<br>
&gt; &gt; &gt;         como Joint<br>
&gt; &gt; &gt;         es a su vez una interfaz, el mapeo que hace es:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         typedef ::std::vector&lt; ::jderobot::JointPrx&gt; JointSeq;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         Y ahí ya estoy perdido. Ni idea de cómo puedo acceder a<br>
&gt; &gt; &gt;         Joint :-(<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         ¿Alguien me arroja luz?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         Mientras tanto voy a seguir leyendo el manual de ICE<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         Saludos, Juan<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         --<br>
&gt; &gt; &gt;         Blog: <a href="http://www.iearobotics.com/blog" target="_blank">www.iearobotics.com/blog</a><br>
&gt; &gt; &gt;         Web: <a href="http://www.iearobotics.com/juan" target="_blank">www.iearobotics.com/juan</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         _______________________________________________<br>
&gt; &gt; &gt;         Jde-developers mailing list<br>
&gt; &gt; &gt;         <a href="mailto:Jde-developers@gsyc.es">Jde-developers@gsyc.es</a><br>
&gt; &gt; &gt;         <a href="http://gsyc.escet.urjc.es/cgi-bin/mailman/listinfo/jde-developers" target="_blank">http://gsyc.escet.urjc.es/cgi-bin/mailman/listinfo/jde-developers</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
--<br>
Blog: <a href="http://www.iearobotics.com/blog" target="_blank">www.iearobotics.com/blog</a><br>
Web: <a href="http://www.iearobotics.com/juan" target="_blank">www.iearobotics.com/juan</a><br>
<br>
</div></div></blockquote></div><br></div></div>