pyJoules/device/device.py
def configure(self, domains: List[Domain] = None):
        """
        configure the device to return only the energy consumption of the given energy domain when calling the
        :py:meth:`pyJoules.device.Device.get_energy` method

        :param domains: domains to be monitored by the device, if None, all the available domain will be monitored
        :raise NoSuchDomainError: if one given domain could not be monitored on this machine
        """
        if domains is None:
            domains = self._available_domains
        else:
            # check if given domain list are available
            for domain in domains:
                if domain not in self._available_domains:
                    raise NoSuchDomainError(domain)

        self._configured_domains = domains

        configure the device to return only the energy consumption of the given energy domain when calling the
        :py:meth:`pyJoules.device.Device.get_energy` method

        :param domains: domains to be monitored by the device, if None, all the available domain will be monitored
        :raise NoSuchDomainError: if one given domain could not be monitored on this machine
        
configure the device to return only the energy consumption of the given energy domain when calling the
configure the device to return only the energy consumption of the given energy domain when calling the
def configure(self, domains: List[Domain] = None):
        if domains is None:
            domains = self._available_domains
        else:
            for domain in domains:
                if domain not in self._available_domains:
                    raise NoSuchDomainError(domain)
        self._configured_domains = domains
def configure ( self , domains : List [ Domain ] = None ) : if domains is None : domains = self . _available_domains else : for domain in domains : if domain not in self . _available_domains : raise NoSuchDomainError ( domain ) self . _configured_domains = domains
configure the device to return only the energy consumption of the given energy domain when calling the
configure the device to return only the energy consumption of the given energy domain when calling the
"""
        configure the device to return only the energy consumption of the given energy domain when calling the
        :py:meth:`pyJoules.device.Device.get_energy` method

        :param domains: domains to be monitored by the device, if None, all the available domain will be monitored
        :raise NoSuchDomainError: if one given domain could not be monitored on this machine
        """ # check if given domain list are available
if one given domain could not be monitored on this machine
if one given domain could not be monitored on this machine
NoSuchDomainError
self
domains
List[Domain]
domains to be monitored by the device, if None, all the available domain will be monitored
domains to be monitored by the device if None all the available domain will be monitored
py
None