Re: Managing endianness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the reply, that's what I thought thanks for the confirmation. :)

On 12/04/2019 15:25, Andre Naujoks wrote:
Am 12.04.19 um 14:40 schrieb Romain Forlot [IoT.bzh]:
Hi Oliver,

I have a silly question about CAN signals retrieved from the Socketcan
stack. Is the endianness handled by Socketcan ? As endianness could be
only on a CAN signal so not on an entire CAN frame for what I saw from
some J1939 CAN messages definitions, I doubt that socketCAN handle that.
So it has to be handled by the user. Do you agree ?
Not Oliver, but since this is addressed to the list.

You are right, that socketcan does not handle endianness. You get an
array of single bytes, which represent the bytes in the CAN-frame from
front to back. If there are values spanning multiple bytes you have to
take care of the endianness of those yourself.

Regards
   Andre

Thanks

--
Romain Forlot - Embedded Engineer - IoT.bzh
romain.forlot@xxxxxxx - www.iot.bzh - +33675142438

null

[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux