Re: Managing endianness

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

 



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
> 




[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