Example #1
0
    def register_component(self, component_name, component_instance, mw_data):
        """ Open the port used to communicate by the specified component.
        """

        mw_data[3]["__hla_node"] = self.node

        DatastreamManager.register_component(self, component_name, component_instance, mw_data)
Example #2
0
    def register_component(self, component_name, component_instance, mw_data):
        """ Open the port used to communicate by the specified component.
        """

        mw_data[2]['__hla_node'] = self.node

        DatastreamManager.register_component(self, component_name,
                                             component_instance, mw_data)
Example #3
0
    def register_component(self, component_name, component_instance, mw_data):
        """ Open the port used to communicate by the specified component.
        """
        register_success = False
        must_inc_base_port = False

        if not 'port' in mw_data[2]:
            must_inc_base_port = True
            mw_data[2]['port'] = self._base_port

        while not register_success:
            try:
                # Create a socket server for this component
                serv = DatastreamManager.register_component(self, component_name,
                                                 component_instance, mw_data)
                register_success = True
            except socket.error as error_info:
                if error_info.errno ==  errno.EADDRINUSE:
                    mw_data[2]['port'] += 1
                    if must_inc_base_port:
                        self._base_port += 1
                else:
                    raise

        self._server_dict[mw_data[2]['port']] = serv
        self._component_nameservice[component_name] = mw_data[2]['port']
        if must_inc_base_port:
            self._base_port += 1
Example #4
0
    def register_component(self, component_name, component_instance, mw_data):
        """ Open the port used to communicate by the specified component.
        """
        register_success = False
        must_inc_base_port = False

        if not 'port' in mw_data[2]:
            must_inc_base_port = True
            mw_data[2]['port'] = self._base_port

        while not register_success:
            try:
                # Create a socket server for this component
                serv = DatastreamManager.register_component(
                    self, component_name, component_instance, mw_data)
                register_success = True
            except socket.error as error_info:
                if error_info.errno == errno.EADDRINUSE:
                    mw_data[2]['port'] += 1
                    if must_inc_base_port:
                        self._base_port += 1
                else:
                    raise

        self._server_dict[mw_data[2]['port']] = serv
        self._component_nameservice[component_name] = mw_data[2]['port']
        if must_inc_base_port:
            self._base_port += 1
Example #5
0
    def register_component(self, component_name, component_instance, mw_data):
        """ Open the port used to communicate by the specified component.
        """

        # Create a socket server for this component
        datastream = DatastreamManager.register_component(
            self, component_name, component_instance, mw_data)
        datastream.setup(self._conn_manager, self._mav, self._boot_time)
Example #6
0
    def register_component(self, component_name, component_instance, mw_data):
        """ Open the port used to communicate by the specified component.
        """

        # Create a socket server for this component
        datastream  = DatastreamManager.register_component(self, component_name,
                                         component_instance, mw_data)
        datastream.setup(self._conn_manager, self._mav, self._boot_time)
    def register_component(self, component_name, component_instance, mw_data):
        """ Open the port used to communicate by the specified component.
        """
        global BASE_PORT

        register_success = False

        while not register_success:
            try:
                # Create a socket server for this component
                serv = DatastreamManager.register_component(self, component_name,
                                                 component_instance, mw_data)
                register_success = True
            except socket.error as error_info:
                if error_info.errno ==  errno.EADDRINUSE:
                    BASE_PORT += 1
                else:
                    raise

        self._server_dict[BASE_PORT] = serv
        self._component_nameservice[component_name] = BASE_PORT
        BASE_PORT += 1