A trap received by Spectrum has the ifIndex value of an interface as a trap varbind. By default, the trap is processed on the parent device model.
This is an example of an Event Procedure that will take the value of the ifIndex in the varbind and pass an event to the association child interface model of the parent.
Release : Any
Component : Spectrum Alarms/Alerts/Events
The following is an example of the Event Procedure:
0xfff00001 E 20 P "ForEach(GetModelsByRelationId({C CURRENT_MODEL}, {H 0x10004}, {C RELATION_SIDE_RIGHT}), \
{Variable X}, {Variable ret}, {U 0}, \
If (Equals(ToUInteger(GetEventVariable({U 1})), ReadAttribute( {Variable X}, {H 0x130d1})), \
CreateEventWithVariables(ReadAttribute({Variable X}, {H 0x000129fa}), {H 0xfff00002}, GetEventAttributeList()), \
Nil()))"
In the above Event Procedure, the trap generates event 0xfff00001 on the device model. The Event Procedure finds all of the models that have a HASPART (0x10004) association on the right side of the device model. For each model found, it compares the value of the trap varbind 1 ({U 1} from above), which is the ifIndex from the trap, to the value of X_ifIndex (0x130d1) on the model found. If they are the same, it reads the value of the model handle (0x000129fa) of the model and asserts the 0xfff00002 event on the model.
NOTE: You event ids and varbind variable values may be different.