コード例 #1
0
ファイル: task.py プロジェクト: kaosat-dev/Pollapli
 def __init__(self, parent=None, name="Default Task", description="Default task description", target=None, *args, **kwargs):
     """progress need to be computed base on the number of actions needed
     for this task to complete"""
     BaseComponent.__init__(self, parent)
     self.name = name
     self.description = description
     self.status = TaskStatus()
     self.target = target
コード例 #2
0
ファイル: task.py プロジェクト: kaosat-dev/Pollapli
 def __init__(self,
              parent=None,
              name="Default Task",
              description="Default task description",
              target=None,
              *args,
              **kwargs):
     """progress need to be computed base on the number of actions needed
     for this task to complete"""
     BaseComponent.__init__(self, parent)
     self.name = name
     self.description = description
     self.status = TaskStatus()
     self.target = target
コード例 #3
0
    def __init__(self,parent=None, type="addon", name="Default Package", description="Default Package", version="0.0.0",downloadUrl="",img="",tags=[],installPath="",downloaded=False,installed=False,enabled=False,file=None,fileHash=None,targetId=None,fromVersion=None,toVersion=None,*args,**kwargs):
        BaseComponent.__init__(self, parent)
        self.type = type
        self.name = name
        self.description = description 
        self.version = version
        self.downloadUrl = downloadUrl
        self.img = img
        self.tags = tags
        self.file = file
        self.fileHash = fileHash
        self.downloaded = downloaded
        self.installed = installed
        self.enabled = enabled
        self.installPath = installPath

        if targetId is not None:
            self.targetId = uuid.UUID(targetId)
        self.fromVersion = fromVersion
        self.toVersion = toVersion
コード例 #4
0
    def __init__(self,
                 hardware_id=None,
                 auto_connect=False,
                 max_connection_errors=2,
                 connection_timeout=4,
                 do_hanshake=False,
                 do_authentification=False):
        """
        autoconnect:if autoconnect is True,device will be connected as soon as
        it is plugged in and detected
        max_connection_errors: the number of connection errors above which
        the driver gets disconnected
        connection_timeout: the number of seconds after which the driver
        gets disconnected (only in the initial , configuration phases by
        default)
        """
        BaseComponent.__init__(self, parent=None)
        self.auto_connect = auto_connect
        self.max_connection_errors = max_connection_errors
        self.connection_timeout = connection_timeout
        self.do_authentification = do_authentification
        self.do_handshake = do_hanshake
        self._hardware_interface = None
        self.hardware_id = hardware_id
        self.is_configured = False
        self.is_bound = False  # when port association has not been set
        self.is_handshake_ok = False
        self.is_authentification_ok = False
        self.is_connected = False
        self.is_bound = False
        self.is_busy = False

        self.errors = []
        self.connection_mode = 1
        self._connection_errors = 0
        self._connection_timeout = None
        self.deferred = defer.Deferred()

        self._signal_channel_prefix = ""
        self._signal_dispatcher = SignalDispatcher("driver_manager")
コード例 #5
0
ファイル: driver.py プロジェクト: kaosat-dev/Pollapli
    def __init__(self, hardware_id=None, auto_connect=False,
        max_connection_errors=2, connection_timeout=4, do_hanshake=False,
        do_authentification=False):
        """
        autoconnect:if autoconnect is True,device will be connected as soon as
        it is plugged in and detected
        max_connection_errors: the number of connection errors above which
        the driver gets disconnected
        connection_timeout: the number of seconds after which the driver
        gets disconnected (only in the initial , configuration phases by
        default)
        """
        BaseComponent.__init__(self, parent=None)
        self.auto_connect = auto_connect
        self.max_connection_errors = max_connection_errors
        self.connection_timeout = connection_timeout
        self.do_authentification = do_authentification
        self.do_handshake = do_hanshake
        self._hardware_interface = None
        self.hardware_id = hardware_id
        self.is_configured = False
        self.is_bound = False  # when port association has not been set
        self.is_handshake_ok = False
        self.is_authentification_ok = False
        self.is_connected = False
        self.is_bound = False
        self.is_busy = False

        self.errors = []
        self.connection_mode = 1
        self._connection_errors = 0
        self._connection_timeout = None
        self.deferred = defer.Deferred()

        self._signal_channel_prefix = ""
        self._signal_dispatcher = SignalDispatcher("driver_manager")
コード例 #6
0
 def __init__(self, parent=None, name="", description=""):
     BaseComponent.__init__(self, parent)
     self.name = name
     self.description = description
     self.children_components = []
コード例 #7
0
 def __init__(self, parent=None, name="", description=""):
     BaseComponent.__init__(self, parent)
     self.name = name
     self.description = description
     self.children_components = []