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

Question: how to determine if Open() is successful? #418

Open
wjquigs11 opened this issue Jul 29, 2024 · 2 comments
Open

Question: how to determine if Open() is successful? #418

wjquigs11 opened this issue Jul 29, 2024 · 2 comments

Comments

@wjquigs11
Copy link

Is there any way to determine if the N2K Open succeeded? It returns "true" even if the interface is not physically connected to a bus.
For now I'm using packet receive count == 0 after some time, but that seems unreliable.

@unxs0
Copy link

unxs0 commented Jul 29, 2024

@wjquigs11 A loopback type check? This would require a hardware/electrical standard that may exist already.

@wjquigs11
Copy link
Author

No, I meant a check for physical connection to the bus. I came across a better solution than mine, which is a bool N2Kopen = false, changed to true in the message handler (i.e., will only be true if we've received a valid packet to process).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants