public inbox for linux-can@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cangen: Support RTR frames with random or increment CAN IDs
@ 2012-11-07  8:14 Alexander Stein
  2012-11-07  9:07 ` Oliver Hartkopp
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Stein @ 2012-11-07  8:14 UTC (permalink / raw)
  To: linux-can; +Cc: Alexander Stein

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
 cangen.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/cangen.c b/cangen.c
index efb8251..0037605 100644
--- a/cangen.c
+++ b/cangen.c
@@ -339,6 +339,9 @@ int main(int argc, char **argv)
 				frame.can_id |= CAN_EFF_FLAG;
 			} else
 				frame.can_id &= CAN_SFF_MASK;
+
+			if (rtr_frame)
+				frame.can_id |= CAN_RTR_FLAG;
 		}
 
 		if (dlc_mode == MODE_RANDOM) {
@@ -412,6 +415,9 @@ resend:
 				frame.can_id |= CAN_EFF_FLAG;
 			} else
 				frame.can_id &= CAN_SFF_MASK;
+
+			if (rtr_frame)
+				frame.can_id |= CAN_RTR_FLAG;
 		}
 
 		if (dlc_mode == MODE_INCREMENT) {
-- 
1.7.8.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cangen: Support RTR frames with random or increment CAN IDs
  2012-11-07  8:14 [PATCH] cangen: Support RTR frames with random or increment CAN IDs Alexander Stein
@ 2012-11-07  9:07 ` Oliver Hartkopp
  2012-11-07  9:26   ` Alexander Stein
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Hartkopp @ 2012-11-07  9:07 UTC (permalink / raw)
  To: Alexander Stein; +Cc: linux-can

Hello Alexander,

just yesterday evening i was pondering about making the canfd branch of the
can-utils the master branch ...

Due to added the CAN FD possibilities is also cleaned up the RTR sending
which can be done randomly now too.

See the commit log at
https://gitorious.org/linux-can/can-utils/commit/51c57c8445d5a0faef73f32fc9f5b772d4fde939

Please check out the canfd branch and see if cangen meets your requirements.

The same with 'candump' ...
There's a new '-x' option which prints extra message infos: RX/TX BRS ESI

Best regards,
Oliver

On 07.11.2012 09:14, Alexander Stein wrote:
> Signed-off-by: Alexander Stein<alexander.stein@systec-electronic.com>
> ---
>   cangen.c |    6 ++++++
>   1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/cangen.c b/cangen.c
> index efb8251..0037605 100644
> --- a/cangen.c
> +++ b/cangen.c
> @@ -339,6 +339,9 @@ int main(int argc, char **argv)
>   				frame.can_id |= CAN_EFF_FLAG;
>   			} else
>   				frame.can_id&= CAN_SFF_MASK;
> +
> +			if (rtr_frame)
> +				frame.can_id |= CAN_RTR_FLAG;
>   		}
> 
>   		if (dlc_mode == MODE_RANDOM) {
> @@ -412,6 +415,9 @@ resend:
>   				frame.can_id |= CAN_EFF_FLAG;
>   			} else
>   				frame.can_id&= CAN_SFF_MASK;
> +
> +			if (rtr_frame)
> +				frame.can_id |= CAN_RTR_FLAG;
>   		}
> 
>   		if (dlc_mode == MODE_INCREMENT) {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cangen: Support RTR frames with random or increment CAN IDs
  2012-11-07  9:07 ` Oliver Hartkopp
@ 2012-11-07  9:26   ` Alexander Stein
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Stein @ 2012-11-07  9:26 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: linux-can

Hello Oliver,

On Wednesday 07 November 2012 10:07:08, Oliver Hartkopp wrote:
> just yesterday evening i was pondering about making the canfd branch of the
> can-utils the master branch ...
> 
> Due to added the CAN FD possibilities is also cleaned up the RTR sending
> which can be done randomly now too.
> 
> See the commit log at
> https://gitorious.org/linux-can/can-utils/commit/51c57c8445d5a0faef73f32fc9f5b772d4fde939
> 
> Please check out the canfd branch and see if cangen meets your requirements.

Yes, I'm fine with that. It's the same behavior as with my patch.

> The same with 'candump' ...
> There's a new '-x' option which prints extra message infos: RX/TX BRS ESI

Nice. This also is enough for my needs.

Thanks

Best regards,
Alexander


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-07  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07  8:14 [PATCH] cangen: Support RTR frames with random or increment CAN IDs Alexander Stein
2012-11-07  9:07 ` Oliver Hartkopp
2012-11-07  9:26   ` Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox