Dear All,
I have implemented a Python function ca.add_fd_registration() in our
CaPython software.
The following is a sample Python script which uses
ca.add_fd_registration() to register
fd registration function.
#===========
def myFdRegister(arg, fd, condition):
if condition:
sys.stderr.write( "registering fd:%d msg:%s\n"%(fd,arg))
sys.stderr.flush()
else:
sys.stderr.write("deleting fd:%d\n"%fd)
sys.stderr.flush()
import ca
ca.add_fd_registration(myFdRegister, "Hello World")
print ca.Get("CO_IOC:COCCC:CLOCK")
#===========
ca.add_fd_registration() corresponds to the ca_add_fd_registration()
function in CA library. A registered function( myFdRegister() in the
above example) will called every time CA libaray opens or closes a file descriptor.
As in the case of ca_add_fd_registration(), ca.add_fd_registration()
should be called before any access to the channel.
_ca.c uses Tk_CreateFileHandler()/Tk_DeleteFileHandler() in the default
fd_registration function. So most user may not need this function.
Noboru Yamamoto
KEKB control group
KEK, JAPAN
- Navigate by Date:
- Prev:
Hardware Collaboration BiRa
- Next:
Synergy VME PowerPC 750 VGMD luchini
- 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:
Hardware Collaboration BiRa
- Next:
Synergy VME PowerPC 750 VGMD luchini
- 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
|