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

send method #4

Open
flybrianfly opened this issue Jan 24, 2022 · 0 comments
Open

send method #4

flybrianfly opened this issue Jan 24, 2022 · 0 comments

Comments

@flybrianfly
Copy link

flybrianfly commented Jan 24, 2022

I'm implementing a new device driver. When implementing the ICanIface send method, is the expected behavior to:

  1. Send immediately if possible. If not possible, block until able to send or tx_deadline, whichever occurs first. Return 1 if able to send or error (i.e. -1) if tx_deadline passes.
  2. Send immediately if possible. If not possible, store message in a buffer and return 1 if there is room in the buffer or 0 if there is not room in the buffer. When the message pops off the buffer, do not send if tx_deadline has elapsed.

It seemed, from the comments in the code, that behavior 2 is expected. However, the library would not have feedback that items are sitting in the buffer too long and being discarded. This behavior seems especially likely if the buffer is large and the ICanDriver select method is always returning ICanIface availability (since the TX and RX buffers are large).

Also tagging @pavel-kirienko, since he may have more insight on the intent here.

Thanks!
Brian

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

1 participant