Hi List,

 

This is a follow-up to a recent post.

 

Other than invoking CreateEventWithAttributes, which requires creating a
new event using values from the current event,

do you know of a way to set values for NEW event variables on the
CURRENT event?

 

e.g. if I receive an event with one variable, which I need to pick apart
into several values,

I presently need to create a new event with the values inserted into
individual variables, 

as Jim demonstrates below in answer to Brad. (see list topic "Passing
Attributes in Event Messages")

 

I have experimented with this unsuccessfully, but I don't have access to
my code samples right now.

But has anyone on this list ever implemented an EventProcedure which
attaches variables to the CURRENT event?

 

Thanks,

--Mark S

 

________________________________

Mark Serencha - Inforonics LLC - (m) +1-781-439-0519 - (w)
+1-978-698-7418 -  [email protected]
<mailto:[email protected]> 

 

From: Pfleger, Jim 
Sent: Wednesday, July 28, 2010 12:52 PM
To: spectrum
Subject: Re: [spectrum] Passing Attributes in Event Messages

 

Since SetEventAttribute() returns the entire attribute list, you can
keep nesting calls to it. The following is untested, but should do what
you're asking:

               0xffff0000 E 50 P "\

                 CreateEventWithAttribute(\
                  {C CURRENT_MODEL},\
                  {H 0xffff0001},\
                  SetEventAttribute(\
                    SetEventAttribute(\
                      GetEventAttributeList(),\
                      {U 111},\
                      ReadAttribute (\
                        {C CURRENT_MODEL},\
                        {H 0x11f7e}\
                      ),\
                      {U 112},\
                      ReadAttribute (\
                        {C CURRENT_MODEL},\
                        {H 0x10e40}\
                      )\
                    )\
                  )\
                )"




On 7/28/10 9:38 AM, "Gray, Brad" <[email protected]> wrote:

Greeting all,
 
I'm trying to pass two attributes in an event message, ifAlias (0x11f7e)
and ifOperStatus (0x10e40).  I understand it can be done by using an
event procedure, but cannot get the syntax working correctly. Does
anyone have an example of how to pass two attributes?  I found the
following and have tried adding in a second attribute, but the code is
not working as expected.
                
                0xffff0000 E 50 P "\
                  CreateEventWithAttribute (\
                  {C CURRENT_MODEL},\
                  {H 0xffff0001},\
                     SetEventAttribute(\
                     GetEventAttributeList(),\
                     {U 111},\
                     ReadAttribute (\
                     {C CURRENT_MODEL},\
                     {H 0x11f7e})))"
 
Kind Regards,
Brad
 
Bradley Gray
Distributed Computing Analyst III
ETA Network Support

 
 
_____________

The information contained in this message is proprietary and/or
confidential. If you are not the intended recipient, please: (i) delete
the message and all copies; (ii) do not disclose, distribute or use the
message in any manner; and (iii) notify the sender immediately. In
addition, please be aware that any message addressed to our domain is
subject to archiving and review by persons other than the intended
recipient. Thank you.
_____________


---
To unsubscribe from spectrum, send email to [email protected] with the body: 
unsubscribe spectrum [email protected]

<<image001.png>>

Reply via email to