Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. We define a new block type of "endianessSwitch" ... this can either take a constant "LE" or "BE" (Or the long form, which might be more explicit) ... or an expression which evaluates to one of the two.
  2. We add the BE/LE flag to type definitions (explicitly no dynamic here)

...

So taking into account the 3 scenarios above. This would then be solved the following way: 

"One layer of the protocol stack is fixed to a given endianess"

Set the ... simply set UDP or the PROFINET IO CM Block type definitions to "BE".

"Endianess of fields are dependent on some parsed values"

Use ... simply use a endinanessSwitch.

"Endianess of all fields of a complex type are dependent on the endianess of the parent"

If if the type definition doesn't have any BE/LE flags, it simply uses the endianess of the parent.