本文整理汇总了C++中ManagerMessage::setPolicyIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ ManagerMessage::setPolicyIndex方法的具体用法?C++ ManagerMessage::setPolicyIndex怎么用?C++ ManagerMessage::setPolicyIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ManagerMessage
的用法示例。
在下文中一共展示了ManagerMessage::setPolicyIndex方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeMessageDebug
void PolicyServicesMessageLogging::writeMessageDebug(const DptfMessage& message)
{
throwIfNotWorkItemThread();
ManagerMessage updatedMessage = ManagerMessage(getDptfManager(), message);
updatedMessage.setPolicyIndex(getPolicyIndex());
getEsifServices()->writeMessageDebug(updatedMessage);
}
示例2: throwIfTemperatureThresholdsInvalid
void TemperatureThresholdArbitrator::throwIfTemperatureThresholdsInvalid(UIntN policyIndex,
const TemperatureThresholds& temperatureThresholds, const Temperature& currentTemperature)
{
Temperature aux0 = temperatureThresholds.getAux0();
Temperature aux1 = temperatureThresholds.getAux1();
if ((aux0.isValid() == true && aux0 > currentTemperature) ||
(aux1.isValid() == true && aux1 < currentTemperature))
{
ManagerMessage message = ManagerMessage(m_dptfManager, FLF,
"Received invalid temperature thresholds from policy.");
message.setPolicyIndex(policyIndex);
message.addMessage("Current Temperature", currentTemperature);
message.addMessage("Requested Aux0/Aux1", aux0.toString() + "/" + aux1.toString());
m_dptfManager->getEsifServices()->writeMessageError(message, MessageCategory::TemperatureThresholds);
throw dptf_exception(message);
}
}
示例3: setTemperatureThresholds
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);
}
示例4: arbitrate
Bool TemperatureThresholdArbitrator::arbitrate(UIntN policyIndex, const TemperatureThresholds& temperatureThresholds,
const Temperature& currentTemperature)
{
#ifdef ONLY_LOG_TEMPERATURE_THRESHOLDS
ManagerMessage message = ManagerMessage(m_dptfManager, FLF,
"Temperature arbitration data is being updated for a policy request.");
message.setPolicyIndex(policyIndex);
message.addMessage("Current Temperature", currentTemperature);
message.addMessage("Requested Aux0/Aux1", temperatureThresholds.getAux0().toString() + "/" + temperatureThresholds.getAux1().toString());
addArbitrationDataToMessage(message, "Arbitration data before applying update");
#endif
throwIfTemperatureThresholdsInvalid(policyIndex, temperatureThresholds, currentTemperature);
updateTemperatureDataForPolicy(policyIndex, temperatureThresholds);
Bool result = findNewTemperatureThresholds(currentTemperature);
#ifdef ONLY_LOG_TEMPERATURE_THRESHOLDS
addArbitrationDataToMessage(message, "Arbitration data after applying update");
m_dptfManager->getEsifServices()->writeMessageDebug(message, MessageCategory::TemperatureThresholds);
#endif
return result;
}