Unsolved
This post is more than 5 years old
138 Posts
0
913
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
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
Hemulll
138 Posts
0
November 20th, 2008 00:00
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);
hhe
13 Posts
0
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!
PaulORourke
170 Posts
0
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
hhe
13 Posts
0
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