[etherlab-users] how to implement EoE example?
Ruika You
crazylinuxcnc at gmail.com
Fri May 5 16:52:55 CEST 2017
Thanks for your reply.
You mean I no need to write kernel module for EoE, even though EoE is
kernel module of ethercat master.
I found some useful information from follow post:
<*https://www.mail-archive.com/etherlab-users@etherlab.org/msg01559.html
<https://www.mail-archive.com/etherlab-users@etherlab.org/msg01559.html>*>
As Thomas Bitsky, Jr. comment:
> void
> send_callback(void *cb_data)
> {
> ec_master_t *m = (ec_master_t *) cb_data;
> down(&master_sem);
> ecrt_master_send_ext(m);
> up(&master_sem);
> }
>
> void
> receive_callback(void *cb_data)
> {
> ec_master_t *m = (ec_master_t *) cb_data;
> down(&master_sem);
> ecrt_master_receive(m);
> up(&master_sem);
> }
>
> If they are not in the program and activated by ecrt_master_callbacks, then
> there is no lock-up. Of course, EoE doesn't work.
>
>
I will add code into user space application and give a try. But I confused
that how can I send data and receive data if there is no call back function?
Thanks!
-chengxi
On Fri, May 5, 2017 at 7:27 AM, Gavin Lambert <gavinl at compacsort.com> wrote:
> I don’t use EoE myself, but as I understand it the kernel component of the
> master (which exists even if your application is only in userspace) creates
> regular Linux ethernet devices for the EoE ports of the slaves, and takes
> care of the message relaying itself. So your application doesn’t need to
> do anything special and the userspace application (or any other process on
> the PC) can send packets to those devices just like any other network
> interface. You might need to assign it a static IP before regular apps
> will talk to it, though.
>
>
>
> *From:* etherlab-users [mailto:etherlab-users-bounces at etherlab.org] *On
> Behalf Of *Ruika You
> *Sent:* Friday, 5 May 2017 02:45
> *To:* etherlab-users at etherlab.org
> *Subject:* [etherlab-users] how to implement EoE example?
>
>
>
> Dear all,
>
>
>
> Recently I am trying to implement EoE and do read all threads related EoE
> in this mailing list.But I still do not understand well.
>
> First of all, If I am not wrong EoE only works in kernel space?
> Unfortunatelly, currently my application works in user space. So in this
> case, I had better to run two master one in user space with current
> application, another one in kernel space with EoE?
>
>
>
> Secondly, if anyone have experience with EoE, would you mind share one
> example?
>
>
>
> Now I can start EoE and ping through eoe between two machines. I am not
> clear how to send data and receive data, like tty serial example? but
> El6614 does not have .xml file.
>
>
>
> Any hints are appreciated.
>
>
>
> Thanks very much!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20170505/3ee365c9/attachment-0003.htm>
More information about the Etherlab-users
mailing list