def __init__(self, identifier, execparams): loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0] Component.__init__(self, identifier, execparams, loggerName=loggerName) ThreadedComponent.__init__(self) # self.auto_start is deprecated and is only kept for API compatibility # with 1.7.X and 1.8.0 components. This variable may be removed # in future releases self.auto_start = False
def __init__(self, identifier, execparams): loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0] Component.__init__(self, identifier, execparams, loggerName=loggerName) ThreadedComponent.__init__(self) # self.auto_start is deprecated and is only kept for API compatibility # with 1.7.X and 1.8.0 components. This variable may be removed # in future releases self.auto_start = False # Instantiate the default implementations for all ports on this component self.port_dataFloat_out = bulkio.OutFloatPort("dataFloat_out")
def __init__(self, identifier, execparams): loggerName = (execparams["NAME_BINDING"].replace("/", ".")).rsplit("_", 1)[0] Component.__init__(self, identifier, execparams, loggerName=loggerName) ThreadedComponent.__init__(self) # self.auto_start is deprecated and is only kept for API compatibility # with 1.7.X and 1.8.0 components. This variable may be removed # in future releases self.auto_start = False # Instantiate the default implementations for all ports on this component self.port_dataFloat_in = MessageConsumerPort(thread_sleep=0.1, parent=self) self.port_dataFloat_in2 = MessageConsumerPort(thread_sleep=0.1, parent=self)
def __init__(self, identifier, execparams): loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0] Component.__init__(self, identifier, execparams, loggerName=loggerName) ThreadedComponent.__init__(self) # self.auto_start is deprecated and is only kept for API compatibility # with 1.7.X and 1.8.0 components. This variable may be removed # in future releases self.auto_start = False # Instantiate the default implementations for all ports on this component self.port_message_out = MessageSupplierPort() self.port_eventChannel_out = PortCosEventChannelAdminEventChannelOut_i(self, "eventChannel_out")
def __init__(self, identifier, execparams): loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0] Component.__init__(self, identifier, execparams, loggerName=loggerName) ThreadedComponent.__init__(self) # self.auto_start is deprecated and is only kept for API compatibility # with 1.7.X and 1.8.0 components. This variable may be removed # in future releases self.auto_start = False # Instantiate the default implementations for all ports on this component self.port_negotiable_in = PortExtendedCFNegotiableProvidesPortIn_i(self, "negotiable_in") self.port_negotiable_in._portLog = self._baseLog.getChildLogger('negotiable_in', 'ports') self.port_negotiable_out = PortExtendedCFNegotiableProvidesPortOut_i(self, "negotiable_out") self.port_negotiable_out._portLog = self._baseLog.getChildLogger('negotiable_out', 'ports')
def releaseObject(self): try: self.stop() except Exception: self._log.exception("Error stopping") Component.releaseObject(self)
def stop(self): Component.stop(self) if not ThreadedComponent.stopThread(self, self.TIMEOUT): raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
def start(self): Component.start(self) ThreadedComponent.startThread(self, pause=self.PAUSE)