Unsolved
This post is more than 5 years old
19 Posts
0
1918
February 4th, 2010 06:00
How to refine an existing Problem or an Event in SMARTS event modeling
Hi,
I am trying to refine an existing problem or event using event modeling but couldn't get through. Please find below the code.
refine interface Card
{
stored attribute boolean test_cardstatus;
event test_carddown = test_cardstatus;
refine problem Down "Card is in down state" => test_carddown, test_carddown explains;
}
I want to generate the Card Down event based on the test_cardstatus which I will set based on my traps. The model file is compiling fine. However while restarting the APM, I am finding an error stating that refine keyword cannot be used in a refine interface. The exact error is below.
"DYN-E-RIR- Test_MLI.mdl:127 Down: use of refine not permitted in a refine interface"
I tried removing the refine keyword, still I am facing another error as below
"Refined event name matches a non-event name"
Kindly advice how we can get this issue resolved.
Thanks in anticipation.
With Warm Regards,
Gopal
bkuhhirte
52 Posts
0
March 4th, 2010 12:00
Gopal,
You have a couple basic things wrong here.
1. Dynamic MODEL *cannot* be used to refine an existing event in an existing class. That would require us to somehow be able to unload the definition of the event from the object model and replace it with something else.
Dynamic MODEL is purely additive. You can refine the event by making a subclass of the original or by adding a new event.
2. There is a natural (and intentional) separation between the behavior of a Card and the sources of data. This is called the base class and the instrumentation class. If you look, you should see a Card->InstrumetedBy relationship that points to a subclass of Card_Fault.
The Down problem will be largely derived from the Status attribute of the Card which in turn is propaged from the instrumentation object. By using a stored instrumentation variant (Card_Fault), you can set the Status attribute from your trap processor directly. Otherwise, you can subclass the instrumentation class used and use your stored attribute in the computation of Status.
Beware that Status is an enum value. You will need to treat the various values as strings in the Dynamic Model code which will be converted back to the enum (numeric) by the runtime.
Regards,
Bill