socketcand icon indicating copy to clipboard operation
socketcand copied to clipboard

Add RTR frames to TCP messages

Open Vasili-Sk opened this issue 3 years ago • 13 comments

added < rtr %x %d.%d> message for received Remote transfer request messages in raw mode added < sendrtr %x > to send RTR message a little bit formatted files with eclipse CDT formatter

p.s. code needs optimisation... remove same used parts of code, make something like can_message_decode/encode to parse text. Too much same used code.

p.p.s. barely tested. However raspberry pi successfully sends rtr messages over tcp

Vasili-Sk avatar Oct 25 '21 17:10 Vasili-Sk

Hey @Vasili-Sk, thanks for contributing.

  • Please do the code reformating in a separate patch
  • The patch description of your second patch is a bit vague, please describe which problem you're fixing.

Thanks, Marc

marckleinebudde avatar Oct 25 '21 18:10 marckleinebudde

Can i somehow edit changes here or need to make a new request?

Vasili-Sk avatar Oct 25 '21 18:10 Vasili-Sk

You can force push your modified or rebased branch over the existing one, add the --force option to your git push command.

marckleinebudde avatar Oct 25 '21 18:10 marckleinebudde

Formatting removed in last commit, please check

Vasili-Sk avatar Oct 25 '21 19:10 Vasili-Sk

The idea of re-formating the code is a good one, but please do either no reformating at all, or do the reformating in one patch and no other changes. Usually the first one.

marckleinebudde avatar Oct 25 '21 20:10 marckleinebudde

i have no idea how to, other than wiping my fork and making it from scratch :P

Vasili-Sk avatar Oct 25 '21 20:10 Vasili-Sk

Check if this branch still works: https://github.com/marckleinebudde/socketcand/tree/vasili-sk/socketcand

marckleinebudde avatar Oct 26 '21 07:10 marckleinebudde

Looks ok so far image

Vasili-Sk avatar Oct 26 '21 07:10 Vasili-Sk

Can you take care of not setting the DLC to 0 in RTR frames?

marckleinebudde avatar Oct 26 '21 07:10 marckleinebudde

Do you want to set it manually?

Vasili-Sk avatar Oct 26 '21 07:10 Vasili-Sk

No, please extend the protocol to transfer the DLC of RTR messages. Update the protocol description (https://github.com/linux-can/socketcand/blob/master/doc/protocol.md) too.

marckleinebudde avatar Oct 26 '21 07:10 marckleinebudde

Okay guide updated. DLC code also added.

Vasili-Sk avatar Oct 26 '21 09:10 Vasili-Sk

It would have been good to place your changes ontop of my cleaned up branch....

marckleinebudde avatar Oct 26 '21 09:10 marckleinebudde