Skip to content

send method #4

@flybrianfly

Description

@flybrianfly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions