Designing and Managing Behavior Models
-
Using Trap Masks - Writing a Trigger Function - Functions for Use in Trigger Functions -
NerveCenter provides a number of functions (actually Perl subroutines) that facilitate the writing of trigger functions. The list below indicates what types of functions are available and where you can find detailed information about each function:
For reference information about these functions, see the section Variable-Binding Functions.
For reference information about these functions, see the section String-Matching Functions.
For reference information about this function, see the section DefineTrigger() Function.
For reference information about this function, see the section FireTrigger() Function.
For reference information about this function, see the section AssignPropertyGroup() Function.
For reference information about this function, see the section in( ) Function.
Before looking at the variable-binding functions, let's make sure that we're using the same terminology.
When a trap arrives, NerveCenter looks at the trap's variable bindings and, for each variable binding, it sees an object and a value.
In this case, the object is the OID encoding of the object type (sysDescr) plus an instance, and the value is a string that describes the system.
When NerveCenter sees this variable binding, it stores the following information. The portion of the OID that corresponds to the system group is stored as the binding's base object, and the instance (0) is stored as the binding's instance. When concatenated, the base object and the instance form what NerveCenter calls a subobject.
Base Objects, Instances, and Subobjects
The variable sysDescr is stored as the binding's attribute.
Finally, the value "Windows NT Workstation" is stored as the binding's value.
The variable-binding functions give you access to a binding's subobject, attribute, and value. There's also a function that returns the number of variable bindings in a trap or trigger.
Each of the variable-binding functions is explained below:
Description: Returns the attribute from the variable binding with an index of index. The first variable binding has an index of 0.
Description: Returns the number of variable bindings in the trap's variable-binding list.
Description: Returns the subobject from the variable binding with an index of index. The first variable binding has an index of 0.
Description: Returns the value from the variable binding with an index of index. The first variable binding has an index of 0.
Previous: Writing a Trigger Function | Next: Variables for Use in Trigger Functions |
Please send comments or corrections to Information Development | This file was last updated on 10 October 2000 |