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: CSS - how to read waveform of CHARS (or STRINGS) in a script? |
From: | Hugo Slepicka <[email protected]> |
To: | Isabella Rey <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Fri, 13 Mar 2015 16:47:27 -0300 |
from org.csstudio.opibuilder.scriptUtil import PVUtilfrom org.csstudio.opibuilder.scriptUtil import ConsoleUtilv = PVUtil.getString(pvs[0]).split(",")myStr = "".join(chr(int(i)) for i in v)ConsoleUtil.writeInfo(myStr)
Hi All,In CSS (Windows), I am trying to read a waveform of CHARS inside a Python script.When I do PVUtil.getString, I get displayed a sequence of numbers instead of characters.Is there any way to get the text in the script??If I create a text update widget pointing at the waveform, I get the text correctly, I want to get the same in the script.If it helps:for what I need to do, I can also have a waveform of strings, rather than chars, and I need to extract the strings in the Python script.Whichever works would be fine!Cheers,Isabella