[etherlab-users] Antw: ec_master_simple_io() implementation
anthony at fiord.com
Tue Jun 3 16:33:25 CEST 2008
On Tue, Jun 03, 2008 at 09:53:52AM +0200, matthias luescher wrote:
> >> Have anyone done any userspace interfacing? I would appreciate any
> >> hint on how
> >> to do it in a least tiresome way.
> As I do not know exactly what you are planning to do I am not sure if the following sample might help anything:
I'm thinking on how to implement generic interface to userspace. (since I need to use
ethercat master from a userspace softplc).
Since ethercat is heavily oriented to cycling processing style, it does not
lay very well on traditional i/o driver scheme (with simple synchronous i/o
Implementation of a character device wrapper is an option, but it would require to
implement a protocol for user<->kernel data transfer for a more
complex case (I wonder if it would be appropriate to link libxml somewhere in kernel).
I was also thinking about lxrt+message queues (which would also give hard RT
capability). Have anyone tried it?
> I also wanted to do some user space tests (with a PREEMPT_RT kernel) with the current 1.3.2. EtherLab master. The code below is a very quick and dirty merge of the mini.c sample and a character device sample. After inserting the module ec_mini.ko you can do some very basic IO toggling by reading something from /dev/ecrouter (e.g. by executing "cat /dev/ecrouter").
Thanks, I think I'll stick to similar approach for now (sync i/o would waste
too much time =(( ).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the Etherlab-users