Start a Conversation

Unsolved

This post is more than 5 years old

913

October 8th, 2008 02:00

EMS Smarts Model, Propagate enum attribute with instrumented attribute

Hello all.
Sorry for the subject of this thread is not quite clear.

So, i want to build next construction in Dynamic Model:

I have enum attribute

enum bat_state { UNKNOWN = 1, NORMAL, LOW };
readonly attribute bat_state BatteryStatus
"UPS battery Status"
= UNKNOWN
and i want to propagate this attribute from other instrumented attribute
the propagate constructions is
propagate attribute int prod Status
"Value of ups status oid"
<= AppProcInstrument, InstrumentedBy, BatteryStatus;

I have not found examples on documentation model_ref.pdf
Thanks

138 Posts

November 20th, 2008 00:00

A solution is :

propagate attribute int prod ups_Status
"Value of ups status oid"
<= AppProcInstrument, InstrumentedBy, Status;

enum ups_state { Unknown = 1, OnLine, OnBattery };

computed attribute ups_state xUps_Status
"UPS status value"
=ups_state(ups_Status);

13 Posts

February 25th, 2014 17:00

Any idea on how to propagate string attribute ?

From what the documents says, it seems propagate only works for integer or boolean attributes.

Thanks!

170 Posts

March 6th, 2014 02:00

Hi hhe@mactel,

Have you tried the following::

propagate attribute string str_Status

"String of status "

= AppProcInstrument, InstrumentedBy, Status;

Kind Regards,

Paul

13 Posts

March 6th, 2014 22:00

Thanks Paul,

I actually got the answer from yahoo incharge group - thanks to the help from Chris and Alan.

The following 2 methods should work to propagate string value.

Option1:

AttributeB = unique(InstrumentationAName(InstrumentedBy)->AttributeAoftheInstrumentationAName) else "UNKNOWN";

Options2:

propagate attribute string max AttributeB <= InstrumentationAName,InstrumentedBy,AttributeA;

I will also try your solution then update here.

Cheers,

Hubery

No Events found!

Top