コード例 #1
0
 def initialize(self):
     """
     This is called by the framework immediately after your component registers with the NameService.
     
     In general, you should add customization here and not in the __init__ constructor.  If you have 
     a custom port implementation you can override the specific implementation here with a statement
     similar to the following:
       self.some_port = MyPortImplementation()
     """
     Resource.initialize(self)
     self.port_a = CxPortBULKIODataFloatIn_i("a", maxsize=self.DEFAULT_QUEUE_SIZE)
     self.port_b = CxPortBULKIODataFloatIn_i("b", maxsize=self.DEFAULT_QUEUE_SIZE)
     self.port_out = CxPortBULKIODataFloatOut_i("out")       
     
     #take care of the requested imports    
     #we are supporting both syntax for imports
     #IE - "import x" and "from x import *"
     #this allows users to use either math.cos or just cos 
     #and they will both work
     self.globals = {}
     self.oldA = []
     self.oldB = []
     self.useA = False
     self.useB = False    
     #call this in case we already have a good equation 
     self.sri = None
     self.streamID = None
     self.firsttime = True
     
     self.addPropertyChangeListener("import", self.propChange_import)
     self.addPropertyChangeListener("equation", self.propChange_equation)
コード例 #2
0
        def initialize(self):
            Resource.initialize(self)
            
            # Instantiate the default implementations for all ports on this component
            self.port_inputPort = PortBULKIODataFloatIn_i(self, "inputPort", self.DEFAULT_QUEUE_SIZE)

            self.port_outputPort = PortBULKIODataFloatOut_i(self, "outputPort")
コード例 #3
0
        def initialize(self):
            Resource.initialize(self)

            self.port_dataCharIn = bulkio.InCharPort( "dataCharIn")
            self.port_dataOctetIn = bulkio.InOctetPort( "dataOctetIn")
            self.port_dataShortIn = bulkio.InShortPort( "dataShortIn")
            self.port_dataUShortIn = bulkio.InUShortPort( "dataUShortIn")
            self.port_dataLongIn = bulkio.InLongPort( "dataLongIn")
            self.port_dataULongIn = bulkio.InULongPort( "dataULongIn")
            self.port_dataLongLongIn = bulkio.InLongLongPort( "dataLongLongIn")
            self.port_dataULongLongIn = bulkio.InULongLongPort( "dataULongLongIn")
            self.port_dataFloatIn = bulkio.InFloatPort( "dataFloatIn")
            self.port_dataDoubleIn = bulkio.InDoublePort( "dataDoubleIn")
            self.port_dataFileIn = bulkio.InFilePort( "dataFileIn")
            self.port_dataXMLIn = bulkio.InXMLPort( "dataXMLIn")
            self.port_dataSDDSIn = bulkio.InSDDSPort( "dataSDDSIn")


            self.port_dataCharOut = bulkio.OutCharPort( "dataCharOut")
            self.port_dataOctetOut = bulkio.OutOctetPort( "dataOctetOut")
            self.port_dataShortOut = bulkio.OutShortPort( "dataShortOut")
            self.port_dataUShortOut = bulkio.OutUShortPort( "dataUShortOut")
            self.port_dataLongOut = bulkio.OutLongPort( "dataLongOut")
            self.port_dataULongOut = bulkio.OutULongPort( "dataULongOut")
            self.port_dataLongLongOut = bulkio.OutLongLongPort( "dataLongLongOut")
            self.port_dataULongLongOut = bulkio.OutULongLongPort( "dataULongLongOut")
            self.port_dataFloatOut = bulkio.OutFloatPort( "dataFloatOut")
            self.port_dataDoubleOut = bulkio.OutDoublePort( "dataDoubleOut")
            self.port_dataFileOut = bulkio.OutFilePort( "dataFileOut")
            self.port_dataXMLOut = bulkio.OutXMLPort( "dataXMLOut")
            self.port_dataSDDSOut = bulkio.OutSDDSPort( "dataSDDSOut")

            self.port_propEvent = PropertyEventSupplier(self)
コード例 #4
0
        def initialize(self):
            Resource.initialize(self)
            
            # Instantiate the default implementations for all ports on this component
            self.port_comp_resource_in = PortCFResourceIn_i(self, "comp_resource_in")

            self.port_comp_resource_out = PortCFResourceOut_i(self, "comp_resource_out")
コード例 #5
0
        def initialize(self):
            Resource.initialize(self)
            
            # Instantiate the default implementations for all ports on this component
            self.port_dataDouble = PortBULKIODataDoubleIn_i(self, "dataDouble", self.DEFAULT_QUEUE_SIZE)

            self.port_dataFloat = PortBULKIODataFloatOut_i(self, "dataFloat")
コード例 #6
0
ファイル: fcalc.py プロジェクト: RedhawkSDR/fcalc
 def initialize(self):
     """
     This is called by the framework immediately after your component registers with the NameService.
     
     In general, you should add customization here and not in the __init__ constructor.  If you have 
     a custom port implementation you can override the specific implementation here with a statement
     similar to the following:
       self.some_port = MyPortImplementation()
     """
     Resource.initialize(self)
     self.port_a = CxPortBULKIODataFloatIn_i("a", maxsize=self.DEFAULT_QUEUE_SIZE)
     self.port_b = CxPortBULKIODataFloatIn_i("b", maxsize=self.DEFAULT_QUEUE_SIZE)
     self.port_out = CxPortBULKIODataFloatOut_i("out")       
     
     #take care of the requested imports    
     #we are supporting both syntax for imports
     #IE - "import x" and "from x import *"
     #this allows users to use either math.cos or just cos 
     #and they will both work
     self.globals = {}
     self.oldA = []
     self.oldB = []
     self.useA = False
     self.useB = False    
     #call this in case we already have a good equation 
     self.sri = None
     self.streamID = None
     self.firsttime = True
     
     self.addPropertyChangeListener("import", self.propChange_import)
     self.addPropertyChangeListener("equation", self.propChange_equation)
コード例 #7
0
    def initialize(self):
        Resource.initialize(self)

        self.port_dataCharIn = bulkio.InCharPort("dataCharIn")
        self.port_dataOctetIn = bulkio.InOctetPort("dataOctetIn")
        self.port_dataShortIn = bulkio.InShortPort("dataShortIn")
        self.port_dataUShortIn = bulkio.InUShortPort("dataUShortIn")
        self.port_dataLongIn = bulkio.InLongPort("dataLongIn")
        self.port_dataULongIn = bulkio.InULongPort("dataULongIn")
        self.port_dataLongLongIn = bulkio.InLongLongPort("dataLongLongIn")
        self.port_dataULongLongIn = bulkio.InULongLongPort("dataULongLongIn")
        self.port_dataFloatIn = bulkio.InFloatPort("dataFloatIn")
        self.port_dataDoubleIn = bulkio.InDoublePort("dataDoubleIn")
        self.port_dataFileIn = bulkio.InFilePort("dataFileIn")
        self.port_dataXMLIn = bulkio.InXMLPort("dataXMLIn")
        self.port_dataSDDSIn = bulkio.InSDDSPort("dataSDDSIn")

        self.port_dataCharOut = bulkio.OutCharPort("dataCharOut")
        self.port_dataOctetOut = bulkio.OutOctetPort("dataOctetOut")
        self.port_dataShortOut = bulkio.OutShortPort("dataShortOut")
        self.port_dataUShortOut = bulkio.OutUShortPort("dataUShortOut")
        self.port_dataLongOut = bulkio.OutLongPort("dataLongOut")
        self.port_dataULongOut = bulkio.OutULongPort("dataULongOut")
        self.port_dataLongLongOut = bulkio.OutLongLongPort("dataLongLongOut")
        self.port_dataULongLongOut = bulkio.OutULongLongPort(
            "dataULongLongOut")
        self.port_dataFloatOut = bulkio.OutFloatPort("dataFloatOut")
        self.port_dataDoubleOut = bulkio.OutDoublePort("dataDoubleOut")
        self.port_dataFileOut = bulkio.OutFilePort("dataFileOut")
        self.port_dataXMLOut = bulkio.OutXMLPort("dataXMLOut")
        self.port_dataSDDSOut = bulkio.OutSDDSPort("dataSDDSOut")

        self.port_propEvent = PropertyEventSupplier(self)
コード例 #8
0
        def initialize(self):
            Resource.initialize(self)
            
            # Instantiate the default implementations for all ports on this component
            self.port_dataShort_in = PortBULKIODataShortIn_i(self, "dataShort_in", self.DEFAULT_QUEUE_SIZE)

            self.port_dataShort_out = PortBULKIODataShortOut_i(self, "dataShort_out")
コード例 #9
0
 def __init__(self, identifier, execparams):
     loggerName = execparams['NAME_BINDING'].replace('/', '.')
     Resource.__init__(self, identifier, execparams, loggerName=loggerName)
     self._pid = None
     self.execparams = " ".join(["%s %s" % x for x in execparams.items()])
     command = "python"
     args = [command, "components/CommandWrapperSubProcess/executables/FirstChild.py"]
     sp = subprocess.Popen(args, executable=command, cwd=os.getcwd())
コード例 #10
0
 def __init__(self, identifier, execparams):
     loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0]
     Resource.__init__(self, identifier, execparams, loggerName=loggerName)
     self.process_thread = None
     # self.auto_start is deprecated and is only kept for API compatability
     # with 1.7.X and 1.8.0 components.  This variable may be removed
     # in future releases
     self.auto_start = False
コード例 #11
0
        def initialize(self):
            Resource.initialize(self)
            
            # Instantiate the default implementations for all ports on this component
            self.port_a = PortBULKIODataDoubleIn_i(self, "a", self.DEFAULT_QUEUE_SIZE)
            self.port_b = PortBULKIODataDoubleIn_i(self, "b", self.DEFAULT_QUEUE_SIZE)

            self.port_out = PortBULKIODataDoubleOut_i(self, "out")
コード例 #12
0
    def initialize(self):
        Resource.initialize(self)

        # Instantiate the default implementations for all ports on this component
        self.port_comp_resource_in = PortCFResourceIn_i(
            self, "comp_resource_in")

        self.port_comp_resource_out = PortCFResourceOut_i(
            self, "comp_resource_out")
コード例 #13
0
 def __init__(self, identifier, execparams):
     loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0]
     Resource.__init__(self, identifier, execparams, loggerName=loggerName)
     self.threadControlLock = threading.RLock()
     self.process_thread = None
     # self.auto_start is deprecated and is only kept for API compatability
     # with 1.7.X and 1.8.0 components.  This variable may be removed
     # in future releases
     self.auto_start = False
コード例 #14
0
 def start(self):
     self.threadControlLock.acquire()
     try:
         Resource.start(self)
         if self.process_thread == None:
             self.process_thread = ProcessThread(target=self.process, pause=self.PAUSE)
             self.process_thread.start()
     finally:
         self.threadControlLock.release()
コード例 #15
0
    def __init__(self, *args, **kwargs):
        Resource.__init__(self, *args, **kwargs)

        # Ignore normal termination signals to ensure that the process is
        # orphaned when the parent is terminated; start_component() normally
        # establishes handlers for these before creating the component instance
        signal.signal(signal.SIGINT, signal.SIG_IGN)
        signal.signal(signal.SIGTERM, signal.SIG_IGN)
        signal.signal(signal.SIGQUIT, signal.SIG_IGN)
コード例 #16
0
ファイル: PortTest.py プロジェクト: RedhawkSDR/framework-core
 def initialize(self):
     Resource.initialize(self)
     self.toTest = TestUsesPort()
     self.fromOther = TestProvidesPort(self._get_identifier() + "/resource_in")
     self.toPropSet = PropSetUsesPort()
     self.eventSupplier = EventSupplierPort()
     self.eventConsumer = EventConsumerPort(self._onPush)
     self.toDomainManager = DomainManagerUsesPort()
     self.toDeviceManager = DeviceManagerUsesPort()
コード例 #17
0
 def start(self):
     self.threadControlLock.acquire()
     try:
         Resource.start(self)
         if self.process_thread == None:
             self.process_thread = ProcessThread(target=self.process, pause=self.PAUSE)
             self.process_thread.start()
     finally:
         self.threadControlLock.release()
コード例 #18
0
 def releaseObject(self):
     try:
         self.stop()
     except Exception:
         self._log.exception("Error stopping")
     self.threadControlLock.acquire()
     try:
         Resource.releaseObject(self)
     finally:
         self.threadControlLock.release()
コード例 #19
0
 def releaseObject(self):
     try:
         self.stop()
     except Exception:
         self._log.exception("Error stopping")
     self.threadControlLock.acquire()
     try:
         Resource.releaseObject(self)
     finally:
         self.threadControlLock.release()
コード例 #20
0
 def __init__(self, identifier, execparams):
     loggerName = execparams['NAME_BINDING'].replace('/', '.')
     Resource.__init__(self,
                       identifier,
                       execparams,
                       propertydefs=PROPERTIES,
                       loggerName=loggerName)
     self._props["execparams"] = " ".join(
         ["%s %s" % x for x in execparams.items()])
     self._pid = None
コード例 #21
0
 def start(self):
     self._log.debug("start()")
     if self.get_commandAlive() == False:
         command = self._props["command"]
         args = copy.copy(self._props["args"])
         args.insert(0, command)
         self._log.debug("start %s %r", command, args)
         self._pid = os.spawnv(os.P_NOWAIT, command, args)
         self._log.debug("spawned %s", self._pid)
     Resource.start(self)
コード例 #22
0
ファイル: PortTest.py プロジェクト: koonihc/framework-core
 def initialize(self):
     Resource.initialize(self)
     self.toTest = TestUsesPort()
     self.fromOther = TestProvidesPort(self._get_identifier() +
                                       "/resource_in")
     self.toPropSet = PropSetUsesPort()
     self.eventSupplier = EventSupplierPort()
     self.eventConsumer = EventConsumerPort(self._onPush)
     self.toDomainManager = DomainManagerUsesPort()
     self.toDeviceManager = DeviceManagerUsesPort()
コード例 #23
0
        def stop(self):
            # Technically not thread-safe but close enough for now
            process_thread = self.process_thread
            self.process_thread = None

            if process_thread != None:
                process_thread.stop()
                process_thread.join(self.TIMEOUT)
                if process_thread.isAlive():
                    raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
            Resource.stop(self)
コード例 #24
0
 def __init__(self, identifier, execparams):
     loggerName = execparams['NAME_BINDING'].replace('/', '.')
     Resource.__init__(self, identifier, execparams, loggerName=loggerName)
     self._pid = None
     self.execparams = " ".join(["%s %s" % x for x in execparams.items()])
     command = "python"
     args = [
         command,
         "components/CommandWrapperSubProcess/executables/FirstChild.py"
     ]
     sp = subprocess.Popen(args, executable=command, cwd=os.getcwd())
コード例 #25
0
        def stop(self):
            # Technically not thread-safe but close enough for now
            process_thread = self.process_thread
            self.process_thread = None

            if process_thread != None:
                process_thread.stop()
                process_thread.join(self.TIMEOUT)
                if process_thread.isAlive():
                    raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
            Resource.stop(self)
コード例 #26
0
        def __init__(self, identifier, execparams):
            loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0]
            Resource.__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_DomainManager_out = PortCFDomainManagerOut_i(self, "DomainManager_out")
コード例 #27
0
ファイル: SigGen_base.py プロジェクト: RedhawkSDR/SigGen
    def __init__(self, identifier, execparams):
        loggerName = (execparams["NAME_BINDING"].replace("/", ".")).rsplit("_", 1)[0]
        Resource.__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")
        self.port_dataShort_out = bulkio.OutShortPort("dataShort_out")
コード例 #28
0
ファイル: SigGen_base.py プロジェクト: scottwedge/assets
        def __init__(self, identifier, execparams):
            loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0]
            Resource.__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")
            self.port_dataShort_out = bulkio.OutShortPort("dataShort_out")
コード例 #29
0
ファイル: fcalc_base.py プロジェクト: RedhawkSDR/fcalc
        def __init__(self, identifier, execparams):
            loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0]
            Resource.__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_a = bulkio.InFloatPort("a", maxsize=self.DEFAULT_QUEUE_SIZE)
            self.port_b = bulkio.InFloatPort("b", maxsize=self.DEFAULT_QUEUE_SIZE)
            self.port_out = bulkio.OutFloatPort("out")
コード例 #30
0
    def initialize(self):
        Resource.initialize(self)
        self.prop1 = "MyDefault1"
        self.prop2.append("1")
        self.prop2.append("2")
        self.prop2.append("3")

        self.struct.field1 = "StructDefault"
        self.struct.field2 = 100
        self.struct.field3 = 1.0

        self.multicasts.append(TestPythonProps.MulticastAddress("127.0.0.1", 123))
        self.multicasts.append(TestPythonProps.MulticastAddress("127.0.0.1", 456))
コード例 #31
0
        def stop(self):
            self.threadControlLock.acquire()
            try:
                process_thread = self.process_thread
                self.process_thread = None

                if process_thread != None:
                    process_thread.stop()
                    process_thread.join(self.TIMEOUT)
                    if process_thread.isAlive():
                        raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
                Resource.stop(self)
            finally:
                self.threadControlLock.release()
コード例 #32
0
        def stop(self):
            self.threadControlLock.acquire()
            try:
                process_thread = self.process_thread
                self.process_thread = None

                if process_thread != None:
                    process_thread.stop()
                    process_thread.join(self.TIMEOUT)
                    if process_thread.isAlive():
                        raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
                Resource.stop(self)
            finally:
                self.threadControlLock.release()
コード例 #33
0
        def __init__(self, identifier, execparams):
            loggerName = (execparams['NAME_BINDING'].replace('/', '.')).rsplit("_", 1)[0]
            Resource.__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_dataSDDS_in = bulkio.InSDDSPort("dataSDDS_in")
            self.port_dataVITA49_in = bulkio.InVITA49Port("dataVITA49_in")
            self.port_dataFloat_in = bulkio.InFloatPort("dataFloat_in", maxsize=self.DEFAULT_QUEUE_SIZE)
            self.port_dataSDDS_out = bulkio.OutSDDSPort("dataSDDS_out")
            self.port_dataVITA49_out = bulkio.OutVITA49Port("dataVITA49_out")
            self.addPropertyChangeListener('connectionTable',self.updated_connectionTable)
コード例 #34
0
    def initialize(self):
        Resource.initialize(self)

        # Instantiate the default implementations for all ports on this component
        self.port_dataChar = bulkio.OutCharPort("dataChar")
        self.port_dataFile = bulkio.OutFilePort("dataFile")
        self.port_dataShort = bulkio.OutShortPort("dataShort")
        self.port_dataUlong = bulkio.OutULongPort("dataUlong")
        self.port_dataUlongLong = bulkio.OutULongLongPort("dataUlongLong")
        self.port_dataUshort = bulkio.OutUShortPort("dataUshort")
        self.port_dataXML = bulkio.OutXMLPort("dataXML")
        self.port_dataLong = bulkio.OutLongPort("dataLong")
        self.port_dataLongLong = bulkio.OutLongLongPort("dataLongLong")
        self.port_dataOctet = bulkio.OutOctetPort("dataOctet")
        self.port_dataFloat = bulkio.OutFloatPort("dataFloat")
        self.port_dataSDDS = bulkio.OutSDDSPort("dataSDDS")
        self.port_dataDouble = bulkio.OutDoublePort("dataDouble")
コード例 #35
0
    def __init__(self, identifier, execparams):
        loggerName = (execparams['NAME_BINDING'].replace('/',
                                                         '.')).rsplit("_",
                                                                      1)[0]
        Resource.__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_dataSDDS_in = bulkio.InSDDSPort("dataSDDS_in")
        self.port_dataVITA49_in = bulkio.InVITA49Port("dataVITA49_in")
        self.port_dataFloat_in = bulkio.InFloatPort(
            "dataFloat_in", maxsize=self.DEFAULT_QUEUE_SIZE)
        self.port_dataSDDS_out = bulkio.OutSDDSPort("dataSDDS_out")
        self.port_dataVITA49_out = bulkio.OutVITA49Port("dataVITA49_out")
        self.addPropertyChangeListener('connectionTable',
                                       self.updated_connectionTable)
コード例 #36
0
 def stop(self):
     self._log.debug("stop()")
     try:
         if self.get_commandAlive() == True:
             for sig, timeout in self.STOP_SIGNALS:
                 try:
                     os.kill(self._pid, sig)
                 except OSError:
                     self._pid = None
                     return
                 if timeout != None:
                     giveup_time = time.time() + timeout
                     while os.waitpid(self._pid, os.WNOHANG) == (0,0):
                         time.sleep(0.1)
                         if time.time() > giveup_time:
                             break
                 else:
                     # Wait until there is a response
                     os.waitpid(self._pid, 0)
             self._pid = None
     finally:
         Resource.stop(self)
コード例 #37
0
class BasicAC_python_impl1_base(CF__POA.Resource, Resource):
    # These values can be altered in the __init__ of your derived class

    PAUSE = 0.0125  # The amount of time to sleep if process return NOOP
    TIMEOUT = 5.0  # The amount of time to wait for the process thread to die when stop() is called
    DEFAULT_QUEUE_SIZE = 100  # The number of BulkIO packets that can be in the queue before pushPacket will block

    def __init__(self, identifier, execparams):
        loggerName = execparams['NAME_BINDING'].replace('/', '.')
        Resource.__init__(self, identifier, execparams, loggerName=loggerName)
        self.process_thread = None

    def initialize(self):
        Resource.initialize(self)
        # Instantiate the default implementations for all ports on this component

        self.port_resourceOut = PortCFResourceOut_i(self, "resourceOut")

    def start(self):
        Resource.start(self)
        self.process_thread = ProcessThread(target=self.process,
                                            pause=self.PAUSE)
        self.process_thread.start()

    def process(self):
        """The process method should process a single "chunk" of data and then return.  This method will be called
            from the processing thread again, and again, and again until it returns FINISH or stop() is called on the
            component.  If no work is performed, then return NOOP"""
        raise NotImplementedError

    def stop(self):
        # Technically not thread-safe but close enough for now
        process_thread = self.process_thread
        self.process_thread = None

        if process_thread != None:
            process_thread.stop()
            process_thread.join(self.TIMEOUT)
            if process_thread.isAlive():
                raise CF.Resource.StopError(CF.CF_NOTSET,
                                            "Processing thread did not die")
        Resource.stop(self)

    def releaseObject(self):
        try:
            self.stop()
        except Exception, e:
            self._log.exception("Error stopping: " + str(e))
        Resource.releaseObject(self)
コード例 #38
0
 def initialize(self):
     Resource.initialize(self)
コード例 #39
0
 def start(self):
     Resource.start(self)
     ThreadedComponent.startThread(self, pause=self.PAUSE)
コード例 #40
0
 def start(self):
     self.prop_short += 1 # FOR NOW, A CRAPPY TEST TO SEE IF REFRESH WORKS
     Resource.start(self)
     pipe_on()
     pipe_start()
コード例 #41
0
 def start(self):
     Resource.start(self)
     ThreadedComponent.startThread(self, pause=self.PAUSE)
コード例 #42
0
 def releaseObject(self):
     try:
         self.stop()
     except Exception:
         self._log.exception("Error stopping")
     Resource.releaseObject(self)
コード例 #43
0
        def initialize(self):
            Resource.initialize(self)
            
            # Instantiate the default implementations for all ports on this component

            self.port_propEvent = PropertyEventSupplier(self)
コード例 #44
0
 def initialize(self):
     Resource.initialize(self)
     
     # Instantiate the default implementations for all ports on this component
     self.port_dataFloat_in = bulkio.InFloatPort("dataFloat_in", maxsize=self.DEFAULT_QUEUE_SIZE)
     self.port_dataFloat_out = bulkio.OutFloatPort("dataFloat_out")
コード例 #45
0
 def initialize(self):
     Resource.initialize(self)
コード例 #46
0
 def releaseObject(self):
     try:
         self.stop()
     except Exception:
         self._log.exception("Error stopping")
     Resource.releaseObject(self)
コード例 #47
0
 def stop(self):
     if not ThreadedComponent.stopThread(self, self.TIMEOUT):
         raise CF.Resource.StopError(CF.CF_NOTSET,
                                     "Processing thread did not die")
     Resource.stop(self)
コード例 #48
0
 def __init__(self, identifier, execparams):
     Resource.__init__(self, identifier, execparams)
     self.received_messages = []
コード例 #49
0
    def initialize(self):
        Resource.initialize(self)

        # Instantiate the default implementations for all ports on this component

        self.port_output = PortCFPropertySetOut_i(self, "output")
コード例 #50
0
 def __init__(self, identifier, execparams):
     Resource.__init__(self, identifier, execparams)
コード例 #51
0
 def stop(self):
     Resource.stop(self)
     pipe_off()
     pipe_wait()
コード例 #52
0
 def stop(self):
     if not ThreadedComponent.stopThread(self, self.TIMEOUT):
         raise CF.Resource.StopError(CF.CF_NOTSET, "Processing thread did not die")
     Resource.stop(self)
コード例 #53
0
 def start(self):
     Resource.start(self)
     if self.process_thread == None:
         self.process_thread = ProcessThread(target=self.process,
                                             pause=self.PAUSE)
         self.process_thread.start()
コード例 #54
0
 def __init__(self, identifier, execparams):
     Resource.__init__(self, identifier, execparams)
コード例 #55
0
 def start(self):
     Resource.start(self)
     if self.process_thread == None:
         self.process_thread = ProcessThread(target=self.process, pause=self.PAUSE)
         self.process_thread.start()