Generating Traps
- Last UpdatedDec 17, 2021
- 1 minute read
Traps can be created by writing suitable data to T0-T6, then forwarded using the "TF" as before. This enables non-SNMP devices to generate traps via Plant SCADA .
To create a trap:
-
Create an empty trap by writing to one of the Tx tags (T0 - T6). From that point on, all tag reads and writes are assumed to be for the newly created trap.
-
Update any other fields, as required.
-
Write to TF to specify a forwarding address and send the trap.
-
Repeat the above one or two steps as many times as required.
-
When writing to subfields you cannot skip over uninitialized subfields. For example, the sequence 0,1,2,0,2 is OK, but 0,2 is not. This is so that there are never uninitialized VarBinds in the VarBindList.
-
Write to TN to erase the generated trap and regain access to the queue.
The empty trap has these default values:
|
T0 (Enterprise) |
.1.2.3.6.1.311.1.1 |
|
T1 (IP address) |
Local IP address |
|
T2 (GenType) |
6 |
|
T3 (SpecType) |
0 |
|
T4 (TimeStamp) |
Time since driver was started, in 100th of seconds. |
|
T5 (OID) |
.1.3.6.1.2.4.2.0 |
|
T6 (Value and type) |
0 INTEGER |