Authentication Calculated Fields“Authentication” Calculated Fields are a special type of What is meant by authentication is any sort of field that is intended to ensure that the message has been received properly and hasn’t been tampered with, whether by accident on purpose. This could include a CRC, a hash, a checksum or some other method. Authentication Calculated Fields use the
There are a number of built-in calculators for authentication included with the MessageSerializer and it is easy enough to create your own if your protocol uses a different method. The included calculators are:
Defaults that change:
Defaults that stay the same:
The build-in calculators all take the bytes that should be included in the calculation, perform the calculation and return the result in whatever format that is
appropriate for that calculator (e.g. CRC16 is a Note: By default the ExampleTo actually use a Authentication calculated field let’s say you have a message with the following definition: The “fields” are somewhat wordy to make it clear what they are being used for but here are a couple notes anyways:
related attributes.
The first thing we need to do is define a Calculator to actually perform the checksum. You can do this by creating a class
that inherits from Then you can define your class to represent your message: Some things to take note of:
|