当前位置: 首页>>代码示例>>C++>>正文


C++ ManagerMessage::setPolicyIndex方法代码示例

本文整理汇总了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);
}
开发者ID:hoangt,项目名称:dptf,代码行数:9,代码来源:PolicyServicesMessageLogging.cpp

示例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);
    }
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例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);
}
开发者ID:qbbian,项目名称:dptf,代码行数:19,代码来源:PolicyServicesDomainTemperature.cpp

示例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;
}
开发者ID:,项目名称:,代码行数:23,代码来源:


注:本文中的ManagerMessage::setPolicyIndex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。