def connectIDMChannel(self, idm_ior=None ):
self._log.debug("Connecting to IDM CHANNEL idm_ior:" + str(idm_ior) )
if self._idm_publisher == None:
if idm_ior != None and idm_ior != "":
# Get DomainManager incoming event channel and connect the device to it,
# where applicable.
try:
idm_channel_obj = resource.createOrb().string_to_object(idm_ior)
idm_channel = idm_channel_obj._narrow(CosEventChannelAdmin.EventChannel)
self._idm_publisher = Publisher( idm_channel )
self._log.info("Connected to IDM CHANNEL, (command line IOR).... DEV-ID:" + self._id )
except Exception, err:
#traceback.print_exc()
self._log.warn("Unable to connect to IDM channel (command line IOR).... DEV-ID:" + self._id )
else:
try:
# make sure we have access to get to the EventChanneManager for the domain
if self._domMgr:
if self._ecm == None:
self._log.debug("Setting up EventManager .... DEV-ID:" + self._id )
evt_mgr= Manager.GetManager(self)
self._ecm = evt_mgr
else:
evt_mgr = self._ecm
self._log.debug("Requesting registration with IDM Channel .... DEV-ID:" + self._id )
self._idm_publisher = evt_mgr.Publisher( ossie.events.IDM_Channel_Spec )
self._log.info("Registered with IDM CHANNEL (Domain::EventChannelManager).... DEV-ID:" + self._id )
except:
#traceback.print_exc()
self._log.warn("Unable to connect to IDM channel (Domain::EventChannelManager).... DEV-ID:" + self._id )
#########################################
# CF::LifeCycle
评论列表
文章目录