String Operators

Number Operators

Logical Operators

Global Functions

String Operators

Operator

Description

Example

+

Merge two string-type variables.

$routing = $bgp_config + $ospf_config

==

Equals specified string.

$a==$b?1:0

!==

Not equals specified string.

$a!==$b?1:0

Number Operators

Operator

Description

Example

+

Add two number-type variables.

$error = $input_error + $output_error

-

Subtract two number-type variables.

$error = $input_error - $output_error

*

Multiply two number-type variables.

$a*$b

/

Divide two number-type variables.

$a/$b

>

Judge whether the value of a number-type variable is greater than that of another one.

$cpu > 90

>=

Judge whether the value of a number-type variable is equal to or greater than that of another one.

$a>=$b

<

Judge whether the value of a number-type variable is less than that of another one.

$a<$b

<=

Judge whether the value of a number-type variable is equal to or less than that of another one.

$a<=$b

==

Judge whether the values of two number-type variables equal.

$a==$b

!=

Judge whether the values of two number-type variables don't equal.

$a!=$b

abs

Absolute value of the number-type variables.

abs(-10)

Logical Operators

Use the lower-case operator for logical operations in compound variable definitions.

Operator

Example

and

bool and bool

or

bool or bool

not

not bool

Global Functions

The follow global functions are currently supported by compound variable definition:

Function

Description

Example

GetTableRowCount

Get the table row count for a table

BGP neighbor count defined by:

$GetTableRowCount($BGP_Neighbor)

GetLastValue

Get the last value of the parser variables

CRC error increase count defined by:

$CRC_error - GetLastValue($CRC_error)

GetLastRowCount

Get the last table row count during last data retrieval

Rout Table Change Count

abs(GetTableRowCount($Route_table) – GetLastRowCount($Route_table)

 

See also:

Defining Flash Probe