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  <20082009  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  <20082009  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
... this is properly documented in the manual.

a sample epicsExportRegistrar might look like:

static registryFunctionRef myGensubLibRef[] = {
   {"xxx", (REGISTRYFUNCTION) my_xxx},
   {"yyy", (REGISTRYFUNCTION) my_yyy}
};
static void myGensubLibRegistrar (void)
{
   registryFunctionRefAdd (myGensubLibRef,
                           NELEMENTS (myGensubLibRef));
}

epicsExportRegistrar (myGensubLibRegistrar);


simpler convenience macro (where names match) makes it:


epicsRegisterFunction(xxx);

Matthieu




Matthieu Bec wrote:
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

References:
genSub subroutine compilation and ioc access Emmanuel Mayssat
Re: genSub subroutine compilation and ioc access Matthieu Bec

Navigate by Date:
Prev: Re: genSub subroutine compilation and ioc access Matthieu Bec
Next: updated information of EPICS 2008 meeting and seminar LIU Songqiang
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: genSub subroutine compilation and ioc access Matthieu Bec
Next: Operations Engineer Position at Gemini North Matt Rippa
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·