Logic - is a mechanism for automatic management.

The syntax of a logic description

The logic is described by a line in the following form:

(SENSORID OLDSTATE-NEWSTATE OPERATOR ...){SENSORID1:TIMEOUT NEWSTATE2 OPERATOR2 ...}

Where:

Status codes are:

Operators codes:

Manage logic

To create a logic use field ctlLogicRowStatus. Moving field ctlLogicRowStatus in a state CreateAndWait(5) will create a new note in the table сtlLogicsTable.

After creating the logic it is necessary to specify its name in the field ctlLogicName and the logic description in the field ctlLogicDescription.

After creating a logic description, the logic becomes active, as indicated by the value active(1) in a field ctlLogicRowStatus.

Turning off the logic is performed by setting a field ctlLogicDisable desired interval in seconds.

Turn-on logic is performed by setting the field ctlLogicDisable value of '0'.

Remove logic is performed by setting the field ctlLogicRowStatus in a state destroy(6).


Example. Creating, editing, checking, and removing logic

Reading the logic table:

$ snmptable -Ci -Cb -v2c -cread 192.168.0.193 VUTLAN-SYSTEM-MIB::ctlLogicsTable

SNMP table: VUTLAN-SYSTEM-MIB::ctlLogicsTable

index ID           Name          Description Disable RowStatus
    1  1 "Logic scheme" "(20 4 - 4){34:0 8}"       0    active

Creating new logic:

$ snmpset -v2c -cwrite 192.168.0.193 VUTLAN-SYSTEM-MIB::ctlLogicName.2 s "New Logic" \
 VUTLAN-SYSTEM-MIB::ctlLogicDescription.2 s "(20 1-1){301:0 5}" \
 VUTLAN-SYSTEM-MIB::ctlTrapRowStatus.2 i createAndGo

VUTLAN-SYSTEM-MIB::ctlLogicName.2 = STRING: "New Logic"
VUTLAN-SYSTEM-MIB::ctlLogicDescription.2 = STRING: "(20 1-1){301:0 5}"
VUTLAN-SYSTEM-MIB::ctlTrapRowStatus.2 = INTEGER: createAndGo(4)

View created logic table:

$ snmptable -Ci -Cb -v2c -cread 192.168.0.193 VUTLAN-SYSTEM-MIB::ctlLogicsTable

SNMP table: VUTLAN-SYSTEM-MIB::ctlLogicsTable

index ID           Name          Description Disable RowStatus
    1  1 "Logic scheme"   "(20 4-4){34:0 8}"       0    active
    2  2    "New Logic"  "(20 1-1){301:0 5}"       0    active

Now we have two logics:

Disabling the logic in 60 seconds:

$ snmpset -v2c -cwrite 192.168.0.193 VUTLAN-SYSTEM-MIB::ctlLogicDisable.2 i 60

VUTLAN-SYSTEM-MIB::ctlLogicDisable.2 = INTEGER: 60

Verify that the logic is disabled:

$ snmpget -v2c -cwrite 192.168.0.193 VUTLAN-SYSTEM-MIB::ctlLogicDisable.2

VUTLAN-SYSTEM-MIB::ctlLogicDisable.2 = INTEGER: 1

Remove Logic:

$ snmpset -v2c -cwrite 192.168.0.193 VUTLAN-SYSTEM-MIB::ctlLogicRowStatus.2 i destroy

VUTLAN-SYSTEM-MIB::ctlLogicRowStatus.2 = INTEGER: destroy(6)

After the removal of the logic, the logic table should have an initial appearance.