Versions Compared

Key

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

...

This page describes an enhancement to the DFDL language, the Daffodil DFDL Layering extension, enabling DFDL schemas using this extension to describe data formats in such a way as to enable algorithmic computations of CRCs, Checksums, Parity bits, etc. These are checked when parsing, to insure data validity and/or well-formedness, and are recomputed and incorporated into the data infoset when unparsing data. 

Principles of Operation

Daffodil's layers are able to read and write DFDL variables. Variables are used to provide parameters to layer computations, and to receive results back from layer computations. 

...

  • Layer transformations are able to read and write DFDL variables, which means they need access to the parse or unparse state of the computation.
  • When parsing, the DFDL variables read or written by a layer transformation must be defined or it is an SDE. 
  • When unparsing, DFDL variables read by a layer transformation must either have a value, or the read causes suspension of the layer transformation if the variable is not yet defined. This layer transformation is resumed once the variable gets its value. 
  • When unparsing, computations of dfdl:outputValueCalc, or dfdl:length or other runtime-valued expressions can reference DFDL variables that are (to be) set by a layer transform. Such computations will suspend if the layer transformation has not yet set the variable, and resume when the variable is set. 

Examples

Worked examples showing layering transformations that implement checksums and parity are:

...