def _configure_default_interface(self, component, interface): for child in component.children: if child.is_morseable(): if not Configuration.has_datastream_configuration(child, interface) and \ child.is_exportable(): child.add_stream(interface) if not Configuration.has_service_configuration(child, interface): child.add_service(interface) self._configure_default_interface(child, interface)
def _configure_default_interface(self, component, interface): for child in component.children: if child.is_morseable(): if not Configuration.has_datastream_configuration(child, interface) and \ child.is_exportable(): child.add_stream(interface) if not Configuration.has_service_configuration( child, interface): child.add_service(interface) self._configure_default_interface(child, interface)
def _handle_default_interface(self): """ Handle the semantic of default interface. For each robot, for each of this children, if the child has no specific configuration for its 'default_interface', the function adds it automatically. """ for component in AbstractComponent.components: if isinstance(component, Robot) and component.default_interface: for child in component.children: if child.is_morseable(): if not Configuration.has_datastream_configuration(child, component.default_interface): child.add_stream(component.default_interface) if not Configuration.has_service_configuration(child, component.default_interface): child.add_service(component.default_interface)
def _handle_default_interface(self): """ Handle the semantic of default interface. For each robot, for each of this children, if the child has no specific configuration for its 'default_interface', the function adds it automatically. """ for component in AbstractComponent.components: if isinstance(component, Robot) and component.default_interface: for child in component.children: if child.is_morseable(): if not Configuration.has_datastream_configuration( child, component.default_interface): child.add_stream(component.default_interface) if not Configuration.has_service_configuration( child, component.default_interface): child.add_service(component.default_interface)