Mythili Srinivasan wrote:
>
> I have written myHookInit, myHookFuncioon as mentioned in the application
> developer guide.
> For vxworks based EPICS if the commands in st.cmd are as follows,
>
> ld<bin/myHook.o
> myHookInit
>
> then, what is the equivalent for stcmd.host on linux ?
The ld command is replaced by linking myHook.o into your executable, add
myHook.c to the example_SRCS_DEFAULT variable in your
exampleApp/src/Makefile. Then you just have to get it called early
enough, the simplest way to do this is probably to put a call to
myHookInit() into your main() routine in exampleMain.c before it executes
iocsh(). To call myHookInit() from the startup script you'd need to get
it registered with the registration facility, and I'm not sure what the
simplest way is to do this right now as I haven't worked in this area yet.
> One more query.Can I call
>
> post_event(some_event_number)
>
> from driver support routines?
Yes, you can call post_event() from almost anywhere (I'm not sure about
inside a linux signal handler, it ought to be Ok as far as EPICS is
concerned but I don't think we've thought about that possibility properly
yet). Within a driver or device support it's not necessarily the best way
to signal an event to the database, but it is certainly the simplest for
the driver writer. In most cases you'll eventually want to convert this
into I/O Interrupt support for your device layer, but if you're only just
getting started then don't worry about it to begin with (using soft events
makes it harder to share the driver between different sites which have
different soft event conventions, and it's more difficult to understand
how your databases work as there's no obvious causal connection between
the driver and the records that the event kicks off).
- Andrew
--
The world is such a cheerful place when viewed from upside-down
It makes a rise of every fall, a smile of every frown
- Replies:
- Re: Eric Norum
- Re: Mythili Srinivasan
- References:
- [no subject] Mythili Srinivasan
- Navigate by Date:
- Prev:
[no subject] Mythili Srinivasan
- Next:
Re: 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
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
[no subject] Mythili Srinivasan
- Next:
Re: 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
2016
2017
2018
2019
2020
2021
2022
2023
2024
|