PF_CONDITION#

code: 216

# set
<module-index>/<port-index> PF_CONDITION [<filter_index>] <and_expression_0> <and_not_expression_0> <and_expression_1> <and_not_expression_1> <and_expression_2> <and_expression_3>

# get
<module-index>/<port-index> PF_CONDITION [<filter_index>] ?

Description#

The boolean condition on the terms specifying when the filter is satisfied. The condition uses a canonical and-or-not expression on the match terms and length terms. The condition is specified using a number of compound terms, each encoded as an integer value specifying an arbitrary set of the match terms and length terms defined for the port. Each match or length term has a specific power-of-two value, and the set is encoded as the sum of the values for the contained terms:

Value for match term [match_term_index] = 2^match_term_index

Value for length term [length_term_index] = 2^(length_term_index+16)

A compound term is true if all the match terms and length terms contained in it are true. This supports the and-part of the condition. If some compound term is satisfied, the condition as a whole is true.

This is the or-part of the condition. The first few compound terms at the even positions (second, fourth, …) are inverted, and all the contained match terms and length terms must be false at the same time that the those of the preceding compound term are true. This is the not-part of the condition.

At the top level, a condition is a bunch of things or-ed together.

<filter-condition> = <or-expr>

Two of the or-operands are general, two are ‘simple’.

<or-expr> =  <general-and-expr>  or  <general-and-expr>  or  <simple-and-expr>  or  <simple-and-expr>

A ‘general’ and-expression can include negated terms.

<general-and-expr>  =  <term>  and  <term>  and ... and  not <term>  and ... and  not <term>

A ‘simple’ and-expression can only have non-negated terms.

<simple-and-expr>   =  <term>  and  <term>  and ... and <term>

<term>              =  <match-term>

<term>              =  <length-term>

In practice, the simplest way to generate these encodings is to use the ValkyrieManager, which supports Boolean expressions using the operators &, |, and ~, and simply query the chassis for the resulting script-level definition.

Actions#

set, get

Parameters#

  1. and_expression_0: integer, encoding a compound term that is a set of the match terms AND length terms.

  2. and_not_expression_0: integer, encoding a compound term that is a set of the match NOT terms AND length NOT terms.

  3. and_expression_1: integer, encoding a compound term that is a set of the match terms AND length terms.

  4. and_not_expression_1: integer, encoding a compound term that is a set of the match NOT terms AND length NOT terms.

  5. and_expression_2: integer, encoding a compound term that is a set of the match terms AND length terms.

  6. and_expression_3: integer, encoding a compound term that is a set of the match terms AND length terms.

Example#

# set
input:  0/1 PF_CONDITION [0] 1 1 1 1 1 1
output: <OK>

# get
input:  0/1 PF_CONDITION [0] ?
output: 0/1 PF_CONDITION [0] 1 1 1 1 1 1