Issue using a MAC address from a trap in an Event Procedure using GetElement
Article ID: 100493
When using a MAC Address from a trap in an Event Procedure using the GetElement procedure, Spectrum is not able to associate the MAC Address to the model in the Spectrum database that has that MAC Address associated with it.
The following is an example of the Event Procedure being used:
In the above Event Procedure, the MAC Address value sent by the trap is saved to Event Variable "104". The "GetElement" procedure then searches for a model in the database that has the MAC_Address attribute 0x1100df with the same value as MAC Address in Event Variable "104".
Release: SDBSFO99000-10.1-Spectrum-Device Based Suite-Server FOC Component:
There are three basic causes for this issue to occur:
1. The MAC Address in the trap is an OctetString, but in ascii format, not raw 6byte mac format 2. The ToOctetString() procedure just dupes the incoming OctetString if type is OctetString. 3. The ToOctetString() looks for just '.' as the separator but the MAC Address sent by the trap uses ":" as the separator.
For causes #1 and #2 listed above, the resolution is to use the ToString() procedure on the OctetString before calling the ToOctetString() procedure. Using the above Event Procedure as an example, the Event Procedure will need to be changes as follows:
For cause #3, a code change has been made to the ToOctetString() procedure to look for both "." and ":" as the MAC Address separator. This code change will be available in Spectrum 10.03.00. No projected release date for Spectrum 10.03.00 at the time of this knowledge document publication.