當前位置: 首頁>>代碼示例>>Python>>正文


Python device.ExecutableDevice類代碼示例

本文整理匯總了Python中ossie.device.ExecutableDevice的典型用法代碼示例。如果您正苦於以下問題:Python ExecutableDevice類的具體用法?Python ExecutableDevice怎麽用?Python ExecutableDevice使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ExecutableDevice類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: initialize

        def initialize(self):
            ExecutableDevice.initialize(self)
            
            # Instantiate the default implementations for all ports on this component
            self.port_dev_resource_in = PortCFResourceIn_i(self, "dev_resource_in")

            self.port_dev_resource_out = PortCFResourceOut_i(self, "dev_resource_out")
開發者ID:RedhawkSDR,項目名稱:framework-core,代碼行數:7,代碼來源:SADUsesDevice_base.py

示例2: __init__

 def __init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams):
     ExecutableDevice.__init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams)
     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
開發者ID:horn545,項目名稱:framework-core,代碼行數:8,代碼來源:test_collocation_device_base.py

示例3: initialize

 def initialize(self):
   ExecutableDevice.initialize(self)
   self._props["memCapacity"] = 100000000
   self._props["BogoMipsCapacity"] = 100000000
   self._props["nicCapacity"] = 100.0
   self._props["fakeCapacity"] = 3
   #self._props["execparams"] = " ".join(["%s %s" % x for x in execparams.items()])
   self._usageState = CF.Device.BUSY
開發者ID:Axios-Engineering,項目名稱:framework-core,代碼行數:8,代碼來源:BasicAlwaysBusyDevice.py

示例4: __init__

 def __init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams):
   ExecutableDevice.__init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams, PROPERTIES)
   AggregateDevice.__init__(self)
   self._props["memCapacity"] = 100000000
   self._props["BogoMipsCapacity"] = 100000000
   self._props["nicCapacity"] = 100.0
   self._props["fakeCapacity"] = 3
   self._props["execparams"] = " ".join(["%s %s" % x for x in execparams.items()])
開發者ID:Axios-Engineering,項目名稱:framework-core,代碼行數:8,代碼來源:BasicTestDevice.py

示例5: start

 def start(self):
     self.threadControlLock.acquire()
     try:
         ExecutableDevice.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()
開發者ID:horn545,項目名稱:framework-core,代碼行數:9,代碼來源:test_collocation_device_base.py

示例6: releaseObject

 def releaseObject(self):
     try:
         self.stop()
     except Exception:
         self._log.exception("Error stopping")
     self.threadControlLock.acquire()
     try:
         ExecutableDevice.releaseObject(self)
     finally:
         self.threadControlLock.release()
開發者ID:horn545,項目名稱:framework-core,代碼行數:10,代碼來源:test_collocation_device_base.py

示例7: stop

    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")
        ExecutableDevice.stop(self)
開發者ID:RedhawkSDR,項目名稱:framework-core,代碼行數:11,代碼來源:BasicTestDevice_python_impl1.py

示例8: __init__

 def __init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams):
   self.exit_lock = threading.Lock()
   self.exit_lock.acquire()
   self.process_thread = threading.Thread(target=self.TerminationThread)
   ExecutableDevice.__init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams, PROPERTIES)
   AggregateDevice.__init__(self)
   self._props["memCapacity"] = 100000000
   self._props["BogoMipsCapacity"] = 100000000
   self._props["nicCapacity"] = 100.0
   self._props["fakeCapacity"] = 3
   self._props["execparams"] = " ".join(["%s %s" % x for x in execparams.items()])
開發者ID:Axios-Engineering,項目名稱:framework-core,代碼行數:11,代碼來源:SelfTerminatingDevice.py

示例9: __init__

    def __init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams):
        # NB: For now, the ports must be created before calling ExecutableDevice.__init__(),
        #     which registers with the DomainManager, otherwise a race condition may exist.
        #     The DomainManager attempts to make the connections from the DCD, and it is
        #     possible that getPort() will be called before __init__() completes.
        self.ports = {}
        self.ports['event_supplier'] = supplierOut_i(self, 'event_supplier')
        self.ports['event_consumer'] = consumerOut_i(self, 'event_consumer')

        ExecutableDevice.__init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams, PROPERTIES)
        self._props["memCapacity"] = 100000000
        self._props["BogoMipsCapacity"] = 100000000
開發者ID:RedhawkSDR,項目名稱:framework-core,代碼行數:12,代碼來源:EventPortTestDevice.py

示例10: __init__

    def __init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams):
        ExecutableDevice.__init__(self, devmgr, uuid, label, softwareProfile, compositeDevice, execparams, PROPERTIES)
        AggregateDevice.__init__(self)

        self.__MAX_MEMORY   = 2048
        self.__MAX_BOGOMIPS = 1024
        self.allocated_mem  = 0
        self.allocated_bog  = 0
        self.__mem_name     = 'memCapacity'
        self.__bog_name     = 'BogoMipsCapacity'
        self.__mem_id       = 'DCE:7aeaace8-350e-48da-8d77-f97c2e722e06'
        self.__bog_id       = 'DCE:bbdf708f-ce05-469f-8aed-f5c93e353e14'
開發者ID:Axios-Engineering,項目名稱:framework-core,代碼行數:12,代碼來源:BasicTestDevice_python_impl1.py

示例11: stop

        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")
                ExecutableDevice.stop(self)
            finally:
                self.threadControlLock.release()
開發者ID:horn545,項目名稱:framework-core,代碼行數:14,代碼來源:test_collocation_device_base.py

示例12: execute

 def execute(self, name, options, parameters):
   retval = ExecutableDevice.execute(self, name, options, parameters)
   for option in options:
       if option.id == 'STACK_SIZE':
           self._props['check_STACK_SIZE'] = option.value._v
       elif option.id == 'PRIORITY':
           self._props['check_PRIORITY'] = option.value._v
   return retval
開發者ID:Axios-Engineering,項目名稱:framework-core,代碼行數:8,代碼來源:BasicTestDevice.py

示例13: __getattribute__

 def __getattribute__ (self, attrname):
   """
   Intercept lookup of attributes to allow any method to throw an
   error via the 'exceptionPoint' and 'exceptionType' properties.
   """
   # Use the base class __getattribute__ to avoid recursion.
   getattribute = lambda x: ExecutableDevice.__getattribute__(self, x)
   attribute = getattribute(attrname)
   if callable(attribute) and attrname == getattribute('exceptionPoint'):
     if getattribute('exceptionType') == 'CF.InvalidFileName':
       exception = CF.InvalidFileName(CF.CF_EINVAL, "Test exception")
     elif self.exceptionType == 'CF.Device.InvalidCapacity':
       exception = CF.Device.InvalidCapacity("Test exception", [])
     else:
       exception = Exception()
     return ExceptionFunc(exception)
   return attribute
開發者ID:Axios-Engineering,項目名稱:framework-core,代碼行數:17,代碼來源:BrokenExecutableDevice.py

示例14: initialize

 def initialize(self):
     ExecutableDevice.initialize(self)
開發者ID:RedhawkSDR,項目名稱:redhawk-ide-uitests,代碼行數:2,代碼來源:ExampleExecutableDevice02_base.py

示例15: configure

 def configure(self, properties):
   ExecutableDevice.configure(self, properties)
   self.process_thread.start()
開發者ID:Axios-Engineering,項目名稱:framework-core,代碼行數:3,代碼來源:SelfTerminatingDevice.py


注:本文中的ossie.device.ExecutableDevice類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。