EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  <20002001  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  <20002001  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: add_fd_registration in Python/CA.
From: Noboru Yamamoto <[email protected]>
To: "[email protected]" <[email protected]>
Cc: Tatsuro Nakamura <[email protected]>, "Kazuro.FURUKAWA" <[email protected]>, [email protected], Kaji Masahiro <[email protected]>, akasaka <[email protected]>
Date: Wed, 26 Jan 2000 19:18:53 +0900
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  <20002001  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  <20002001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·