Hi,

I have read the "Porting POSIX applications to Xenomai" document [1] and I 
must admit that it has created doubts in our idea of our library. Let me 
expose our idea.

We have a modification version of the SOEM library. This version use a RTNET 
device, and all the thread or devices calls, instead of use the POSIX version, 
use the Xenomai native version.

The SOEM library is quiet well simple and has a good design (IMHO). It's just 
a bunch of functions that encapsulated the Ethercat protocol. You must define 
an IOMap var that maps a memory region in your program that use the library to 
interchange information with the program, and send to the devices. 

We have found and issue that we don't understand and would like to know why. 
Any code that we use in soem patch against Xenomai with the native functions 
doesn't work if we not do this hack: declare a "rt_task in our main program 
and mark it with shadow. Our code is:

   RT_TASK program;
   rt_task_shadow (&program, "soem-master", 20, T_JOINABLE);

For us it's a mystery why we have to create this "fake" task and call the 
rt_task_shadow to make the devices work. If not, the library fails and no 
ethercat devices are detected. It has no sense for us, because the rtnet part 
works.

We understand that with this call we make our program in realtime context, but 
we have not found in any example this kind of calls.

In our new version, we try to decoupling the realtime part from the nonrt 
part. That's why we try to make the soem library in rt context, so the memory, 
access to the devices, etc isolated from the programs that use it.

However, we have found that the programs that use the library needs the 
rt_task_shadow...

So, it's possible to create a library that uses xenomai functions, threads, 
etc, with a rt task, and a program linked against it that use that library in 
a nrt context? (for instance, using xddp as protocol to interchange data but 
calling functions of the library)

Best regards,

thanks in advance,

Leopold



We use a C++ code that call functions of this library. Our first version, in 
our C++ code, we created two tasks: a synchronous rt_task, defined in the 
library and a 



In our new version, we are trying to








[1] http://www.xenomai.org/index.php/Porting_POSIX_applications_to_Xenomai



-- 
--
Linux User 152692
Catalonia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: 
<http://www.xenomai.org/pipermail/xenomai/attachments/20140212/daf0f781/attachment.sig>
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to