Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Connector for UFL

Filters for processing messages

  • Last UpdatedJan 03, 2025
  • 2 minute read

For each message that you define in the [MSG] section, you must define a section for filtering and processing the contents of the message. The section heading is the name of the message or its entry in the message array; for example: MSG(1).

To filter specific messages, you set the FILTER attribute. Messages are filtered by matching text. Messages are processed only by the first section that detects them, so the order in which you define message-processing sections is significant.

Filtering is case-sensitive. To define filters based on the contents of a message, use the following tokens.

Token

Matches…

?

Any single character.

*

Zero or more characters.

#

Any single digit (0 - 9).

[character list ]

Any single character in character list. Must be enclosed in square brackets.

[! character list ]

Any single character not in the character list. Must be enclosed in square brackets.

\

To match characters that are used for filter tokens, for example, question marks, precede the character with a backslash.

The following is an example of a filter that finds messages where the following are true:

  • The line does not start with an exclamation point.

  • Starting at position 10, the line contains the text TAG followed by any number of characters.

  • Starting at position 30, the line contains the text VALUE followed by any number of characters.

    MSG(1).Filter = NOT C1=="!*" AND C10=="TAG*" AND C30=="VALUE*"

The following data line matches the filter criteria:

' 1234...TAG=mytag............VALUE=10.0

The following filter finds lines that start with "State.City.A", " State.City.B", or "State.City.C".

MSG(2).Filter = C1=="State.City.[ABC].*"

The next filter finds lines that do not begin "State.City.D", " State.City.E", or "State.City.F".

MSG(3).Filter = C1=="State.City.[!DEF].*"

TitleResults for “How to create a CRG?”Also Available in