Пример #1
0
    def add_plugin(self, process, pid, own_process, queue, plugin, id):
        """
        Add plugin with necessary information.

        :param process: Plugin is running in this process
        :param pid: Process ID of the process in which the plugin is running
        :param queue: Event queue needed for events which should be received by this plugin
        :param plugin: Plugin object
        :param plugin_id: ID of this plugin
        :param id: ID for the new DPlugin
        :return: Returns the data object DPlugin
        :rtype: DPlugin
        """

        d_pl = DPlugin()

        d_pl.process = process
        d_pl.pid = pid
        d_pl.queue = queue
        d_pl.plugin = plugin
        d_pl.id = id
        d_pl.own_process = own_process

        self.__DPlugins[id] = d_pl

        return d_pl
Пример #2
0
    def add_plugin(self, process, pid, own_process, queue, plugin, id):
        """
        Add plugin with necessary information.

        :param process: Plugin is running in this process
        :param pid: Process ID of the process in which the plugin is running
        :param queue: Event queue needed for events which should be received by this plugin
        :param plugin: Plugin object
        :param plugin_id: ID of this plugin
        :param id: ID for the new DPlugin
        :return: Returns the data object DPlugin
        :rtype: DPlugin
        """

        d_pl = DPlugin()

        d_pl.process = process
        d_pl.pid = pid
        d_pl.queue = queue
        d_pl.plugin = plugin
        d_pl.id = id
        d_pl.own_process = own_process

        self.__DPlugins[id] = d_pl

        return d_pl