1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 <2021> 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Detect PV connect and disconnect events in CSS |
From: | "Kasemir, Kay via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, "Pogacnik, Matic" <mpogacnik at anl.gov> |
Date: | Tue, 16 Feb 2021 13:22:42 +0000 |
> Is there a way to detect a PV connect and disconnect events in the CSS/Phoebus/DisplayBuilder?
Yes, it's built-in. Alarm-sensitive widgets indicate alarms, and that includes INVALID/Disconnected, via a border around the widget.
The border color defaults to yellow/orange for MINOR, red for MAJOR, and purple for INVALID/disconnected. In addition to the color, the minor alarm is a single line, the major alarm a double line, and the disconnected a type of dashed line (subtle difference
for never connected and later disconnected after having initially been connected).
To see this, open the "Text Update" page from the example displays, it includes simulated PVs that cycle through alarms, including
one that keeps disconnecting.
> If
there are multiple options what would be the "cleanest" way to do it?
> The use case for which I would like to use this is to set the
display background color based on the PV state: connected->green, disconnected->red.
There are on purpose not multiple options because we aim for consistent displays.
In the display builder, alarms are indicated via the border. There is no mechanism to instead indicate them via the foreground
color or background color or icons that would pop up at the edge or blinking or ... because if we offered these options, each display would likely look different and end users then have a hard time figuring it out.
Best regards,
Kay
|