[etherlab-users] Antw: ec_master_simple_io() implementation
Florian Pose
fp at igh-essen.com
Wed Jun 4 09:20:05 CEST 2008
Hi all,
On Tue, Jun 03, 2008 at 06:33:25PM +0400, Anthony Sharobaiko wrote:
> 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 requests).
>
> 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'm planning to make the current (kernel) realtime interface available
in userspace, maybe for the next release. Currently I'm replacing the
sysfs interface with a userspace tool. So I already implemented a
character device, that could be used to write a library with the
realtime interface functions around it.
> I was also thinking about lxrt+message queues (which would also give
> hard RT capability). Have anyone tried it?
A developer I know has already written an lxrt wrapper for the realtime
inteface, that will probably also be part of the next release.
> > 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").
This would be also easy to manage with user space interface I mentioned
above.
--
Best regards,
Florian Pose
http://etherlab.org
More information about the Etherlab-users
mailing list