The MessageSerializer uses C# to serialize classes to an array of bytes and vice-versa while automatically calculating fields such as lengths and CRCs.
PropertyRuleAuthenticationField
The PropertyRuleAuthenticationFieldPropertyRule is intended to be used to make a property that has a name starting with “Crc”
be automatically set up as an CalculatedAuthenticationResult property. It uses the following conditions:
If a property name starts with Crc (case-insensitive) and that property does not have an CalculatedAuthentication
or CalculatedAuthenticationResult attribute attached to it the the property has a CalculatedAuthenticationResult
attribute added to it with a CalculatorType set to CalculatorAuthenticationCrc16.
If the property name starts with Crc (case-insensitive) and there is not a CalculatedLength or CalculatedLengthResult
attribute attached to the property, a CalculatedLength attribute is added to the property with Exclude set to true. This makes it so that
the calculated field will not be included in the length calculation for the message.