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: genSub subroutine compilation and ioc access |
From: | Matthieu Bec <[email protected]> |
To: | Emmanuel Mayssat <[email protected]> |
Cc: | [email protected] |
Date: | Thu, 21 Feb 2008 01:05:03 -0300 |
static registryFunctionRef myGensubLibRef[] = { {"xxx", (REGISTRYFUNCTION) my_xxx}, {"yyy", (REGISTRYFUNCTION) my_yyy} }; static void myGensubLibRegistrar (void) { registryFunctionRefAdd (myGensubLibRef, NELEMENTS (myGensubLibRef)); }
Hi Emmanuel,
yes you need to export your gensub's INAM/SNAM - There might be other ways to do this but this work. I rarely use the INAM, that can be left blank.
say SNAM=xxx
in C source, do: epicsExportRegistrar(xxx)
in dbd include, do: registrar("xxx")
the application developper's guide has more details, I remember convenience macros(?) to epicsExportRegistrar
Matthieu
Emmanuel Mayssat wrote:Hello,
I recently decided to have a look at genSub. I want to calculate the standard deviation of a waveform of samples.
At this point, I am just trying have genSub work with a simple formulas. Where do you compile the subroutines? How do you make them available in the ioc? Should they be registar'ed? The genSub doc is not really clear on that matter.
I compiled the subroutines (as is) in the device support library. I liked that library to the ioc binary. Obvisouly that is not enough for the genSub record to find them. What am I missing?
Dpes anybody have a simple genSub record to send my way ?
Regards, -- Emmanuel 650/793-0626
-- Matthieu Bec Gemini Observatory Tel: +56 51 205785 c/o AURA, Casilla 603 Fax: +56 51 205650 La Serena, Chile