def name(self): """Channel name specified when the channel was connected. >>> chan = CaChannel('catest') >>> chan.searchw() >>> chan.name() 'catest' """ return ca.name(self.__chid)
def _block_connection_callback(epics_args, user_args): connection_state = epics_args[1] if connection_state == ca.CA_OP_CONN_UP: print ca.name(epics_args[0]), "UP" # First time through creates the monitor if ca.name(epics_args[0]) not in self.curr_values: self._create_monitor(user_args[0], ca.name(epics_args[0])) else: print ca.name(epics_args[0]), "DOWN" self.curr_lock.acquire() try: self.curr_values[ca.name(epics_args[0])] = ("*** disconnected", None) except: # Don't care, it is all about releasing the lock pass finally: # Must release lock self.curr_lock.release()