Re: [taste-users] [cordet2] Problems with Device Drivers for Sensor/Actuators

[ Thread Index | Date Index | More lists.tuxfamily.org/taste-users Archives ]


Dear Francisco,

Can you send me the project that does not work ?

I have tried to reproduce what you describe and it seems to work well.

I created a system with two functions, one in Ada, one in Blackbox Device
the BBDevice has a single unprotected interface with two IN params and two OUT params, one of each being encoded in ACN, the other one in UPER
(I also tried in Native)

The caller does this:

package body function0 is
i1:aliased asn1sccMyInteger := 0;
i2:aliased asn1SccMyInteger := 1;
o1:aliased asn1SccMyInteger;
o2:aliased asn1SccMyInteger;

---------------------------------------------------------
-- Provided interface "pulse"
---------------------------------------------------------
procedure pulse is
begin
RunDriver(i1'access, i2'access,o1'access,o2'access);
system.io.put("i1=");
system.io.put(standard.long_long_integer'image(i1));
system.io.put(" i2=");
system.io.put(standard.long_long_integer'image(i2));
system.io.put(" o1=");
system.io.put(standard.long_long_integer'image(o1));
system.io.put(" o2=");
system.io.put_line(standard.long_long_integer'image(o2));
i1 := i1 + 1;
i2 := i2 + 1;

end pulse;

So I create global variables for the input and output, I call the BBDevice (function is called RunDriver),
and I display right after the input and the output. 

The BB Device code is:


void function1_RunDriver(void *IN_inp1_uper, size_t size_IN_inp1_uper, void *IN_inp2_native, size_t size_IN_inp2_native, void *OUT_outp1_native, size_t *size_OUT_outp1_native, void *OUT_outp2_uper, size_t *size_OUT_outp2_uper)
{
  memcpy(OUT_outp1_native, IN_inp2_native, size_IN_inp2_native);
  memcpy(OUT_outp2_uper, IN_inp1_uper, size_IN_inp1_uper);
 *size_OUT_outp1_native = size_IN_inp2_native;
 *size_OUT_outp2_uper = size_IN_inp1_uper;
}

So, directly copying the input to the output.

I build the system and I get:
i1= 0 i2= 1 o1= 1 o2= 0
i1= 1 i2= 2 o1= 2 o2= 1
i1= 2 i2= 3 o1= 3 o2= 2
i1= 3 i2= 4 o1= 4 o2= 3
i1= 4 i2= 5 o1= 5 o2= 4
i1= 5 i2= 6 o1= 6 o2= 5

.. Output is properly copied.

Let me know if your configuration is different...

In the meantime have a nice week-end!
Maxime


0 Mar 2012 15:27:58 +0200, Francisco Ferrero Mateos <fferrero@xxxxxxx> wrote:

Dear all,

 

We are experiencing some problems when developing device drivers for sensor/actuators.  

 

1.       When declaring unprotected interfaces with the black box function, it seems that the output parameters are not decoded by the ACN decoding function (dataview-uniq.c). The calling service always receives data initialized by 0. In our case the calling interface is implemented in Ada.

2.       When using the required interface within the black box function, we have linkage problems as the reference to the extern function is undefined.

 

Regarding the first point, is it possible declaring provided interfaces in the black box function that output parameters? In the documentation about the exo-arm, the provided interface seems to accept only input parameters. Please, correct me if I am wrong.

 

Our Ocarina version is 2.0w r3731.

 

Kind regards,

 


Description: C:\Users\fffm\AppData\Roaming\Microsoft\Firmas\logo_gmv.gif

Francisco Ferrero Mateos
Jefe de proyecto /
Project Manager

GMV
Isaac Newton, 11
P.T.M. Tres Cantos
E-28760 Madrid
Tel.
+34 91 807 21 00
Fax +34 91 807 21 99
www.gmv.com

Description: C:\Users\fffm\AppData\Roaming\Microsoft\Firmas\icon_blog.gif

 

Description: C:\Users\fffm\AppData\Roaming\Microsoft\Firmas\icon_facebook.gif

 

Description: C:\Users\fffm\AppData\Roaming\Microsoft\Firmas\icon_twitter.gif

 

Description: C:\Users\fffm\AppData\Roaming\Microsoft\Firmas\icon_youtube.gif

 

 


This message including any attachments may contain confidential information, according to our Information Security Management System, and intended solely for a specific individual to whom they are addressed. Any unauthorised copy, disclosure or distribution of this message is strictly forbidden. If you have received this transmission in error, please notify the sender immediately and delete it.
Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede contener información clasificada por su emisor como confidencial en el marco de su Sistema de Gestión de Seguridad de la Información siendo para uso exclusivo del destinatario, quedando prohibida su divulgación copia o distribución a terceros sin la autorización expresa del remitente.. Si Vd. ha recibido este mensaje erróneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboración.
Esta mensagem, incluindo qualquer ficheiro anexo, pode conter informação confidencial, de acordo com nosso Sistema de Gestão de Segurança da Informação, sendo para uso exclusivo do destinatário e estando proibida a sua divulgação, cópia ou distribuição a terceiros sem autorização expressa do remetente da mesma. Se recebeu esta mensagem por engano, por favor avise de imediato o remetente e apague-a.
Obrigado pela sua colaboração.



--
ESA - European Space Agency

Maxime Perrotin
TASTE Project manager
PROBA V - PROBA 3 Software engineer

System, Software and Technology Department

ESTEC
Keplerlaan 1, PO Box 299
NL-2200 AG Noordiwjk, The Netherlands
maxime.perrotin@xxxxxxx | www.esa.int
+31 (0)71 565 4923 | Fax +31 (0)71 565 5420

This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender.

Please consider the environment before printing this email.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/