Tuesday Tip: How to write the value of an Event Variable to a Spectrum attribute when event "X" is generated
CA Spectrum Tuesday Tip by Joe Ackley, Support Engineer
Description: A Spectrum customer recently opened a case asking how he can write the value of an Event Variable from a trap to the ContactPerson attribute (0x23000c) of the Spectrum model when an event was generated.
Solution: The solution is to use an Event Procedure to take the value of the Event Variable and write it to the Spectrum attribute. There are a few caveats:
1. The Spectrum attribute you are writing to has to be configured as a writable attribute in the Spectrum database
2. If the Spectrum attribute is an external attribute, the Spectrum model must have been modeled in the Spectrum database using a read/write Community String
3. The data type of the Event Variable and the Spectrum attribute must be compatible
The following is an example of the Event Procedure:
0xfff00000 E 0 P "\
WriteAttribute( \
{ C CURRENT_MODEL }, \
{ H 0x23000c }, \
GetEventVariable( \
{ U 1 } ))"
In the above example, when event 0xfff00000 is asserted on the model, Spectrum will get the value of Event Variable 1 ( { U 1 } ) and write it to Spectrum attribute 0x23000c for the model the event was create ( { C CURRENT_MODEL } ).