OpenEtherCATsociety / SOES

Simple Open Source EtherCAT Slave
Other
588 stars 251 forks source link

Fix the foe code of the rtl_slavedemo application #108

Closed bnjmnp closed 2 years ago

bnjmnp commented 2 years ago

With d9ebdc99 the FOE part of the API changed a bit, but the application was not updated.

nakarlsson commented 2 years ago

Can you elaborate WHY and HOW to use "emergency message"? Why, when and why it is needed. How, similar to EOE TX this API is not thread safe and can 't be called at any point.

bnjmnp commented 2 years ago

Oh sorry, I just wanted to fix the application with this PR. The emergency error thing I like to live on my fork only. I'll try to open a PR that really only fixes the application.

(Some EtherCAT slave devices throw emergency errors on unexpected errors, with SOEM this messages can be handled, and I want to test my SOEM based system to handle emergency errors. As my SOES test device is single thread based this might be okay. But you are right, for general use it should not be done this way. Apart from that maybe it is good to keep emergency errors out of SOES, status flags in cyclic data is probably better to notify master about unexpected errors.)