From: Tom Evans <tom_usenet@optusnet.com.au>
To: ajneu <ajneu1@gmail.com>, linux-can@vger.kernel.org
Subject: Re: Clear transmit buffer (of pending queued tx-messages)
Date: Mon, 27 Jun 2016 09:31:03 +1000 [thread overview]
Message-ID: <577065B7.3090809@optusnet.com.au> (raw)
In-Reply-To: <loom.20160623T104337-28@post.gmane.org>
On 23/06/16 18:45, ajneu wrote:
> Oliver Hartkopp <socketcan <at> hartkopp.net> writes:
>
>> The question is whether blocking write (and probably write outdated
>> content) is what you want for CAN.
>
> I've tried non-blocking.
I think you're trying to use the "available tools" to solve a different problem.
> 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?)
Yes. You have THE OTHER END reply to a message stating "I've received it".
"Message receipt" isn't CAN's problem. That's a higher level construct.
If you don't want the other end getting "outdated content", than have the
sender queue up unimportant messages that don't have any time sensitive content.
So when the sender comes up it should send an "I'm here" or a "are you there?"
message, and not send anything else until it gets some form of "I'm alive"
message from the other end. Then you send "the real content".
Tom
prev parent reply other threads:[~2016-06-26 23:31 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
2016-06-23 9:26 ` Wolfgang Grandegger
2016-06-27 22:01 ` Kurt Van Dijck
2016-06-26 23:31 ` Tom Evans [this message]
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=577065B7.3090809@optusnet.com.au \
--to=tom_usenet@optusnet.com.au \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.