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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: error code mapping best practice |
From: | Tim Mooney <[email protected]> |
To: | Emmanuel Mayssat <[email protected]> |
Cc: | [email protected] |
Date: | Mon, 09 Jul 2007 16:54:21 -0500 |
Hello, I have a device that returns error codes as integers (error code stored in a ai record). The error codes needs to be mapped to the corresponding strings. I have approximately 300 error codes. What would you say is the most elegant way to implement the translation? Custom record? seq? etc.
Thank you for your advice,
I think I would write device support for the stringin record that reads an error code from the device and looks it up in a local table. If I had to do the translation starting with the number in an ai record, I would write an SNL program.
-- Tim Mooney ([email protected]) (630)252-5417 Beamline Controls & Data Acquisition Group Advanced Photon Source, Argonne National Lab.