The following diagram shows the analyzer processing flow:
Figure 339 – Scripts flow
When the analyzer initiates, it builds the structure of the fields for the chosen protocol. This includes field names, size (bits, bytes etc.), name, meaning, etc. During this phase (the initialization phase), the SetupField section of a Script can be used to override some of the fields properties (e.g. change name and hint of some of the fields), as well as setting the fields that will be visible, etc.
When analyzing messages, for each message the PreDoScript function is called with the raw data (allowing changing the message, manage encryption keys etc., before the message is processed). Then the captured message is decoded according to the specific protocol field properties.
The resulting decoded message is then processed by each of the selected Scripts (if applicable). Scripts can generate events or alarms, change device icons, add user defined device notes, filter the messages choosing which ones will be shown in Time and Message Views, set message color and name to be used in Time and Message Views, add user defined message notes collect information for user defined statistical charts, etc.
The output from the Scripts is fed into the user interface and displayed to the user or sent via a communication port if applicable.