EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Handling failures in st.cmd
From: "Ernest L. Williams Jr." <[email protected]>
To: Till Straumann <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 12 May 2011 17:07:20 -0700
Till Straumann wrote:
On 05/12/2011 05:22 PM, Zelazny, Michael Stanley wrote:
If, for example, dbLoadRecords, initializing some hardware module, cd("some/dir"), etc. fails while an IOC is booting, is there any way to trap this in my st.cmd and take an action, such as abort the IOC boot?




Under RTEMS (cexpsh shell -- every line is a C expression)
you can easily do that (provided that the routine you want to trap returns a status)

dbLoadRecords(...) && bsp_reset()

will reset the board if dbLoadRecords() returns
a non-zero value.

However, rebooting is maybe not the best way to
handle this since you will most likely end up in
an endless loop (since the error condition doesn't
go away with a reboot).
What we really want is for the whole process to just stop.
For example, in RTEMS if there is an undefined symbol the system errors out and stops.
Or is that vxWorks, I am thinking of?

-- Ernest



HTH
-- Till



Replies:
Re: Handling failures in st.cmd Benjamin Franksen
Re: Handling failures in st.cmd Till Straumann
References:
Handling failures in st.cmd Zelazny, Michael Stanley
Re: Handling failures in st.cmd Till Straumann

Navigate by Date:
Prev: Re: Handling failures in st.cmd Till Straumann
Next: Re: Handling failures in st.cmd Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Handling failures in st.cmd Till Straumann
Next: Re: Handling failures in st.cmd Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024