Selecting `@extent` value in DSDL

Is there a specific logic or set of rules for choosing the @extent value in DSDL?

Consider the case of 7509.Heartbeat.1.0.dsdl. The following instructions are provided at the end of this file:

@assert _offset_ % 8 == {0}
@assert _offset_ == {56}  # Fits into a single-frame Classic CAN transfer (least capable transport, smallest MTU).
@extent 12 * 8

The first assertion for alignment (@assert _offset_ % 8 == {0}) is straightforward, and the second assertion (@assert _offset_ == {56}) is also reasonable, especially with the accompanying comment about fitting into a single-frame Classic CAN transfer.

However, I’m confused about the last @extent directive, particularly @extent 12 * 8. This directive sets the extent to 96 bits, but I’m struggling to understand the rationale behind this, especially since the previous assertion checks for a 56 bits match. Furthermore, if we are considering possible extensions to this data type, why choose a 12 byte size instead of for example byte sizes like 16, 32, or 64? Any clarification on this would be greatly appreciated.

This is to provide sufficient space for any likely extension fields added to the data type later on. In this case 12 bytes (5 extra on top of 7 that are already used) were considered sufficient. There is no other rationale behind this. It could have been any larger number as well.

1 Like