EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: StreamDevice protocol file help needed
From: Michael Westfall <[email protected]>
To: "[email protected] Talk" <[email protected]>
Date: Wed, 26 Oct 2016 11:56:53 -0300
What I'd like to do is set a stringout record (using the "%(otherrecord)s" method) to a specific string value, based on which exception handler is called in a protocol.


Here is what I have tried, but it doesn't seem to work.
What am I doing wrong?

---
OutTerminator = CR LF CR LF;
InTerminator = "</html>";
ExtraInput = ignore;
ReadTimeout = 10000;
ReplyTimeout = 30000;

getData {
   connect 1000;
   out "GET /weather/current/ukirt/ HTTP/1.1" CR LF
       "Host:" CR LF
       "User-Agent: EPICS IOC";
   in "%*/temperature/%(\$1Temp)f "
      "%*/humidity/%(\$1Humid)f "
      "%*/pressure/%(\$1Press)f "
      "%*/speed/%(\$1WindSpeed)f "
      "%*/direction/%(\$1WindDir)f ";
   disconnect;
   @mismatch {
      out ' "Bad response from web site", %(\$1:errmsg)s;';
   }
   @replytimeout {
      out ' "No response from web site", %(\$1:errmsg)s;';
   }
   @readtimeout {
      out ' "Timeout while reading from web site", %(\$1:errmsg)s;';
   }
}



--
Mike Westfall
Control Systems Software Engineer



Navigate by Date:
Prev: streamdevice exceptions Pedro Gigoux
Next: PyEpics -- full-resolution timestamps? Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: streamdevice exceptions Jeong Han Lee
Next: PyEpics -- full-resolution timestamps? Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 26 Oct 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·