A Dimecres, 12 de febrer de 2014, Gilles Chanteperdrix va escriure:
> On 02/12/2014 01:26 PM, Leopold Palomo-Avellaneda wrote:
> > 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:
> 
> What service fails with what error code? Error codes are documented, you 
> know, this may help you.

simple it doesn't detects the slaves. No error code found by now.

> >
> >     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.
> 
> rt_task_shadow does not create a "fake" task at all. 

I know. I use the ""because we think we don't need that our main task was a RT 
task. It's something like the xddp example that some threads are RT and 
another no.

> It makes the 
> current task a native skin library task, allowing it to use real-time 
> services in general, and native skin services requiring a native skin 
> task in particular. Again, rt_task_shadow is documented.

If I have a program that doesn't use (call) any xenomai function, but is 
linked against a lib that use it, do a need that the current task was rt_task?

Let me explain. My lib has a task that I need it was determinist, but I don't 
need that the program that call it be determinism (for instance a GUI) or 
something with a lot of i/o. Have I to call rt_task_shadow?

> > If not, the library fails and no
> > ethercat devices are detected. It has no sense for us, because the rtnet 
part
> > works.
> 
> Define "works". Are you sure the services are not handled in secondary 
> domain? As you may know, RTDM, used by RTnet allows defining both 
> real-time and non real-time versions. Have you tried enabling T_WARNSW 
> to see if RTnet services are causing switches to secondary mode?

No, but I will try to work on it.


thanks for all,

Leopold




-- 
--
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/e87f4dd9/attachment.sig>
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to