Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: Gracefully catch device errors #14

Open
Rahix opened this issue Apr 14, 2024 · 1 comment
Open

linux: Gracefully catch device errors #14

Rahix opened this issue Apr 14, 2024 · 1 comment
Labels
enhancement New feature or request phy PROFIBUS Physical Layer

Comments

@Rahix
Copy link
Owner

Rahix commented Apr 14, 2024

Right now, the phy-linux panics when its device is not present/disappears/has other errors. Instead, we should find a way for the PHY implementation to gracefully report what has happened so the application can decide how to deal with the situation.

Most likely, the best solution is to define a PHY error type which bubbles up through the FdlMaster's poll() call.

@Rahix Rahix added enhancement New feature or request phy PROFIBUS Physical Layer labels Apr 14, 2024
@Rahix
Copy link
Owner Author

Rahix commented Nov 15, 2024

A related question is how to deal with device disconnects. For most real-world applications this is not relevant as a hardware RS485 won't ever disappear. But, for example, a USB device cannot be assumed stable. Should the PHY implementation auto-reconnect? Should this be the job of the application?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request phy PROFIBUS Physical Layer
Projects
None yet
Development

No branches or pull requests

1 participant