From: ajneu <ajneu1@gmail.com>
To: linux-can@vger.kernel.org
Subject: Re: Clear transmit buffer (of pending queued tx-messages)
Date: Thu, 23 Jun 2016 08:45:27 +0000 (UTC) [thread overview]
Message-ID: <loom.20160623T104337-28@post.gmane.org> (raw)
In-Reply-To: loom.20160622T135857-352@post.gmane.org
Oliver Hartkopp <socketcan <at> hartkopp.net> writes:
>
> The question is whether blocking write (and probably write outdated
> content) is what you want for CAN.
Oliver Hartkopp posted that on a different thread...
Subject: Re: want blocking writes, but eventually get: errno 105 (No buffer
space available)
Date: 2016-06-22 15:52:04 GMT (15 hours and 32 minutes ago)
OK ->
I've tried non-blocking.
Unfortunately non-blocking will not tell you if messages are delivered or not.
Example:
If I send out 2 messages (non-blocking) with no participant on the bus,
those messages will remain queued.
If 5 minutes later a participant joins the bus, he'll get those 2 very old
messages: outdated content.
What are my options to solve this?
(Can I find out if a message has actually been sent out onto the bus?)
(I'm currently thinking about checking the CAN-Bus status: If NOT
error-active (and high tx count), I know that tx-messages will not get
delivered.
But if I had a few messages in the queue, I still cannot tell which ones got
delivered. Hmmmm...
***)
)
Thanks,
ajneu
PS:
***)
Perhaps in some cases it does not matter to know which messages actually
still got delivered and which not.
In that case, when the program detects NO-longer-ERROR_ACTIVE, it can enter
into an error-state "waiting for online":
first it does can_do_stop followed by can_do_start, to clear the queue. Then
it just sends periodic messages, until it get's back_to_error_active.
Once it get's back_to_error_active, it it back "online".
Thoughts?
next prev parent reply other threads:[~2016-06-23 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 12:11 Clear transmit buffer (of pending queued tx-messages) ajneu
2016-06-23 8:45 ` ajneu [this message]
2016-06-23 9:26 ` Wolfgang Grandegger
2016-06-27 22:01 ` Kurt Van Dijck
2016-06-26 23:31 ` Tom Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20160623T104337-28@post.gmane.org \
--to=ajneu1@gmail.com \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox