コード例 #1
0
void PolicyServicesDomainActiveControl::setActiveControl(UIntN participantIndex, UIntN domainIndex,
    const Percentage& fanSpeed)
{
    throwIfNotWorkItemThread();
    getParticipantManager()->getParticipantPtr(participantIndex)->setActiveControl(domainIndex,
        getPolicyIndex(), fanSpeed);
}
コード例 #2
0
void PolicyServicesDomainRfProfileControl::setRfProfileCenterFrequency(UIntN participantIndex, UIntN domainIndex,
    const Frequency& centerFrequency)
{
    throwIfNotWorkItemThread();
    getParticipantManager()->getParticipantPtr(participantIndex)->setRfProfileCenterFrequency(domainIndex,
        getPolicyIndex(), centerFrequency);
}
コード例 #3
0
void PolicyServicesDomainCoreControl::setActiveCoreControl(UIntN participantIndex, UIntN domainIndex,
    const CoreControlStatus& coreControlStatus)
{
    throwIfNotWorkItemThread();
    getParticipantManager()->getParticipantPtr(participantIndex)->setActiveCoreControl(domainIndex,
        getPolicyIndex(), coreControlStatus);
}
コード例 #4
0
Temperature PolicyServicesDomainTemperature::getPowerShareTemperatureThreshold(
	UIntN participantIndex,
	UIntN domainIndex)
{
	throwIfNotWorkItemThread();
	return getParticipantManager()->getParticipantPtr(participantIndex)->getPowerShareTemperatureThreshold(domainIndex);
}
コード例 #5
0
void PolicyServicesDomainTemperature::setVirtualTemperature(
	UIntN participantIndex,
	UIntN domainIndex,
	const Temperature& temperature)
{
	throwIfNotWorkItemThread();
	return getParticipantManager()
		->getParticipantPtr(participantIndex)
		->setVirtualTemperature(domainIndex, temperature);
}
コード例 #6
0
void WIDptfConnectedStandbyEntry::execute(void)
{
	writeWorkItemStartingInfoMessage();

	// First let all policies know that we are entering connected standby

	auto policyManager = getPolicyManager();
	auto policyIndexes = policyManager->getPolicyIndexes();

	for (auto i = policyIndexes.begin(); i != policyIndexes.end(); ++i)
	{
		try
		{
			Policy* policy = policyManager->getPolicyPtr(*i);
			policy->executeConnectedStandbyEntry();
		}
		catch (policy_index_invalid& ex)
		{
			// do nothing.  No item in the policy list at this index.
		}
		catch (std::exception& ex)
		{
			writeWorkItemErrorMessagePolicy(ex, "Policy::executeConnectedStandbyEntry", *i);
		}
	}

	// Now let all participants know

	auto participantManager = getParticipantManager();
	auto participantIndexList = participantManager->getParticipantIndexes();

	for (auto i = participantIndexList.begin(); i != participantIndexList.end(); ++i)
	{
		try
		{
			Participant* participant = participantManager->getParticipantPtr(*i);
			participant->connectedStandbyEntry();
		}
		catch (participant_index_invalid& ex)
		{
			// do nothing.  No item in the participant list at this index.
		}
		catch (std::exception& ex)
		{
			writeWorkItemErrorMessageParticipant(ex, "Participant::connectedStandbyEntry", *i);
		}
	}
}
コード例 #7
0
void PolicyServicesDomainTemperature::setTemperatureThresholds(UIntN participantIndex,
    UIntN domainIndex, const TemperatureThresholds& temperatureThresholds)
{
    throwIfNotWorkItemThread();

#ifdef ONLY_LOG_TEMPERATURE_THRESHOLDS
    // Added to help debug issue with missing temperature threshold events
    ManagerMessage message = ManagerMessage(getDptfManager(), FLF,
        "Policy is calling PolicyServicesDomainTemperature::setTemperatureThresholds().");
    message.addMessage("Aux0", temperatureThresholds.getAux0());
    message.addMessage("Aux1", temperatureThresholds.getAux1());
    message.setParticipantAndDomainIndex(participantIndex, domainIndex);
    message.setPolicyIndex(getPolicyIndex());
    getDptfManager()->getEsifServices()->writeMessageDebug(message, MessageCategory::TemperatureThresholds);
#endif

    getParticipantManager()->getParticipantPtr(participantIndex)->setTemperatureThresholds(
        domainIndex, getPolicyIndex(), temperatureThresholds);
}
コード例 #8
0
void WIPolicyReload::execute(void)
{
    writeWorkItemStartingInfoMessage();

    // Iterate through the list of policies and unbind all participant and domains from them
    
    DptfManagerInterface* dptfManager = getDptfManager();
    auto policyManager = getPolicyManager();
    auto participantIndexList = getParticipantManager()->getParticipantIndexes();

    // Unbind every participant and domain from every policy
    for (auto participantIndex = participantIndexList.begin(); participantIndex != participantIndexList.end(); ++participantIndex)
    {
        dptfManager->unbindDomainsFromPolicies(*participantIndex);
        dptfManager->unbindParticipantFromPolicies(*participantIndex);
    }

    // No try-catch here because destroyAllPolicies' calling tree catches all exceptions.
    policyManager->destroyAllPolicies();

    try
    {
        policyManager->reloadAllPolicies(dptfManager->getDptfPolicyDirectoryPath());
    }
    catch (dptf_exception ex)
    {
        writeWorkItemErrorMessage(ex, "policyManager::reloadAllPolicies");
    }

    // Bind every participant and domain to every policy
    for (auto participantIndex = participantIndexList.begin(); participantIndex != participantIndexList.end(); ++participantIndex)
    {
        dptfManager->bindParticipantToPolicies(*participantIndex);
        dptfManager->bindDomainsToPolicies(*participantIndex);
    }
}
コード例 #9
0
void PolicyServicesParticipantSetSpecificInfo::setParticipantDeviceTemperatureIndication(
    UIntN participantIndex, const Temperature& temperature)
{
    throwIfNotWorkItemThread();
    getParticipantManager()->getParticipantPtr(participantIndex)->setParticipantDeviceTemperatureIndication(temperature);
}
コード例 #10
0
CoreControlStatus PolicyServicesDomainCoreControl::getCoreControlStatus(UIntN participantIndex, UIntN domainIndex)
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getCoreControlStatus(domainIndex);
}
コード例 #11
0
UtilizationStatus PolicyServicesDomainUtilization::getUtilizationStatus(UIntN participantIndex, UIntN domainIndex)
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getUtilizationStatus(domainIndex);
}
コード例 #12
0
TemperatureStatus PolicyServicesDomainTemperature::getTemperatureStatus(UIntN participantIndex, UIntN domainIndex)
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getTemperatureStatus(domainIndex);
}
コード例 #13
0
void PolicyServicesDomainHardwareDutyCycleControl::setHardwareDutyCycle(
    UIntN participantIndex, UIntN domainIndex, const Percentage& dutyCycle)
{
    throwIfNotWorkItemThread();
    getParticipantManager()->getParticipantPtr(participantIndex)->setHardwareDutyCycle(domainIndex, dutyCycle);
}
コード例 #14
0
DptfBuffer PolicyServicesDomainHardwareDutyCycleControl::getHardwareDutyCycleUtilizationSet(
    UIntN participantIndex, UIntN domainIndex) const
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getHardwareDutyCycleUtilizationSet(domainIndex);
}
コード例 #15
0
DptfBuffer PolicyServicesDomainTemperature::getPollingTable(UIntN participantIndex, UIntN domainIndex)
{
	throwIfNotWorkItemThread();
	return getParticipantManager()->getParticipantPtr(participantIndex)->getVirtualSensorPollingTable(domainIndex);
}
コード例 #16
0
RfProfileCapabilities PolicyServicesDomainRfProfileControl::getRfProfileCapabilities(UIntN participantIndex,
    UIntN domainIndex)
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getRfProfileCapabilities(domainIndex);
}
コード例 #17
0
Bool PolicyServicesDomainHardwareDutyCycleControl::isSupportedByOperatingSystem(
    UIntN participantIndex, UIntN domainIndex) const
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->isSupportedByOperatingSystem(domainIndex);
}
コード例 #18
0
std::map<ParticipantSpecificInfoKey::Type, UIntN> PolicyServicesParticipantGetSpecificInfo::getParticipantSpecificInfo(
    UIntN participantIndex, const std::vector<ParticipantSpecificInfoKey::Type>& requestedInfo)
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getParticipantSpecificInfo(requestedInfo);
}
コード例 #19
0
DomainPropertiesSet PolicyServicesParticipantProperties::getDomainPropertiesSet(UIntN participantIndex) const
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getDomainPropertiesSet();
}
コード例 #20
0
Percentage PolicyServicesDomainHardwareDutyCycleControl::getHardwareDutyCycle(
    UIntN participantIndex, UIntN domainIndex) const
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getHardwareDutyCycle(domainIndex);
}
コード例 #21
0
TimeSpan PolicyServicesDomainPlatformPowerStatus::getACPeakTimeWindow(UIntN participantIndex, UIntN domainIndex)
{
    throwIfNotWorkItemThread();
    auto participant = getParticipantManager()->getParticipantPtr(participantIndex);
    return participant->getACPeakTimeWindow(domainIndex);
}
コード例 #22
0
Bool PolicyServicesDomainTemperature::isVirtualTemperature(UIntN participantIndex, UIntN domainIndex)
{
	throwIfNotWorkItemThread();
	return getParticipantManager()->getParticipantPtr(participantIndex)->isVirtualTemperature(domainIndex);
}
コード例 #23
0
Power PolicyServicesDomainPlatformPowerStatus::getPlatformBatterySteadyState(UIntN participantIndex, UIntN domainIndex)
{
    throwIfNotWorkItemThread();
    auto participant = getParticipantManager()->getParticipantPtr(participantIndex);
    return participant->getPlatformBatterySteadyState(domainIndex);
}
コード例 #24
0
void PolicyServicesParticipantSetSpecificInfo::setParticipantCoolingPolicy(
    UIntN participantIndex, const CoolingPreference& coolingPreference)
{
    throwIfNotWorkItemThread();
    getParticipantManager()->getParticipantPtr(participantIndex)->setParticipantCoolingPolicy(coolingPreference);
}
コード例 #25
0
ActiveControlSet PolicyServicesDomainActiveControl::getActiveControlSet(UIntN participantIndex, UIntN domainIndex)
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->getActiveControlSet(domainIndex);
}
コード例 #26
0
Bool PolicyServicesDomainHardwareDutyCycleControl::isHdcOobEnabled(
    UIntN participantIndex, UIntN domainIndex) const
{
    throwIfNotWorkItemThread();
    return getParticipantManager()->getParticipantPtr(participantIndex)->isHdcOobEnabled(domainIndex);
}