Finisar Surveyor User Manual

Page of 454
7-20
Surveyor 
User’s Guide
Filter States
States are used to group a set of statements. Since statement contain conditions and 
actions, states are a way to create a set of conditions and actions. 
You can specify up to 4 states with THGm. You always start and stay in State0 until 
an action takes you to a different state. The hardware device stays in a given state 
until a condition is met which results in an action that changes the filter operation. 
When a state change occurs, the next packet is evaluated by the conditions of the 
new state. 
A changed state will apply to the next packet received, not the 
current packet.
In most instances, you will only need only one or two states in a filter. Here is an 
example filter showing three states:
STATE0
IF (DA=Santosh) GoTo State1
ELSE IF (DA=Yancy) GoTo State2
ELSE GoTo CurrentState
STATE1
IF (DA_IP_Filter1) Counter1; Capture; GoTo CurrentState
ELSE GoTo State0
STATE2
IF (DA_IP_Filter2) Counter2; Capture; GoTo CurrentState
ELSE GoTo State0
Changing States (Changing Filter Operation)
When you select a state other than the current state, a “GoTo” phrase will display as 
part of the statement in the 
Filter States Design 
window, showing the next state; for 
example GoTo State1.
To change the state based on the conditions in a statement, double-click on the state-
ment in the 
Filter states Design 
window. For IF or ELSE IF statements, this brings 
up the 
Filter Design
 window. Use the 
Set Filter Actions and Custom Counters
 button 
in the 
Filter Design
 window to reach the 
Filter Actions
 dialog box. In the 
Filter 
Actions
 dialog box use the 
Change Filter Operation
 check box to select a state 
change. The 
Next packet go to state:
 pull-down box specifies the new state. Cur-
rentState
 means stay in the state number that contains the statement. 
Double-click on an ELSE statement to bring up a dialog to specify just the actions to 
take when this statement is reached. The GoTo phrase always displays for the ELSE 
statement, even if it's the current state. The default setting for the ELSE statement is 
GoTo Current State
.