Resolve checksum (Number part)

images/download/attachments/27689400/image2018-11-28_12-17-52-version-1-modificationdate-1543403874000-api-v2.png

A number part of type 'Resolve checksum' can be configured to define a checksum by custom logic by a Wertauflöser.

The concatenation of all strings provided by number parts configured as Selected part serves as input (string) for the resolver.

In the example above a dynamic number part (see Dynamic (Number part)) "DEC" returns a 4-digit decimal number with '0' as a fill character.

These values are passed to the checksum resolver as the only 'selected part' and stored in a variable 'input'.

This variable is evaluated by Calculate value. The formula used determines the remainder values ('%2' reads as 'mod 2') after dividing 'input' by a finite series of binary powers and adds up the results. Effectively, this sum is equivalent to the number of bits with value 1 in a binary representation of the input value. A decimal value of 19 ("0019" in picture) converts to a binary representation of 1011 with three 'set' bits. The checksum value returned is 3.

►NOTE◄ The formula in this example is not a proven checksum method and only used to illustrate the configuration procedure as such.