Ejemplo n.º 1
0
    def __init__(self, pvName=None, wait=True):
        """
        Create an EPICS channel if pvName is specified, and optionally wait for connection.

        :param str pvName: An optional name of an EPICS Process Variable.
        :param bool wait: If wait is True and pvName is not None then this constructor will do a
                          :meth:`CaChannel.CaChannel.searchw` on the PV. If wait is False and pvName ist not None then
                          this constructor will do a :meth:`CaChannel.CaChannel.search` on the PV, and the user
                          must subsequently do a :meth:`CaChannel.CaChannel.pend_io` on this
                          or another :class:`epicsPV` or :class:`CaChannel` object.
        """
        # Invoke the base class initialization
        self.callBack = callBack()
        CaChannel.__init__(self)
        if pvName is not None:
            if wait:
                self.searchw(pvName)
            else:
                self.search(pvName)