Search code examples
autosar

AUTOSAR BOOLEAN Size is how many bits


I find BOOLEAN bit size can be 1 at one Spec while as another I find it to be 8. Question is which one is correct? Can I define BOOLEAN bit size as 1 and it will not violate any AUTOSAR Spec? enter image description here

enter image description here


Solution

  • You can use bit-addressable memory to store a 1-bit boolean and define the platform data type accordingly. This is not contradicting the SOME/IP specification, which is about bus layout and where booleans have a standardised size of 8 bits.

    In other words, the 1-bit boolean from memory can be serialized by a SOME/IP transformer as an 8-bit boolean on the bus, and vice versa.