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


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

本文整理汇总了C++中ManagerMessage::setParticipantAndDomainIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ ManagerMessage::setParticipantAndDomainIndex方法的具体用法?C++ ManagerMessage::setParticipantAndDomainIndex怎么用?C++ ManagerMessage::setParticipantAndDomainIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ManagerMessage的用法示例。


在下文中一共展示了ManagerMessage::setParticipantAndDomainIndex方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: throwIfNotSuccessful

void EsifServices::throwIfNotSuccessful(const std::string& fileName, UIntN lineNumber,
    const std::string& executingFunctionName, eEsifError returnCode, esif_primitive_type primitive,
    UIntN participantIndex, UIntN domainIndex, UInt8 instance)
{
    if (returnCode == ESIF_OK)
    {
        return;
    }

    ManagerMessage message = ManagerMessage(m_dptfManager, fileName, lineNumber, executingFunctionName,
        "Error returned from ESIF services interface function call");
    message.setEsifPrimitive(primitive, instance);
    message.setParticipantAndDomainIndex(participantIndex, domainIndex);
    message.setEsifErrorCode(returnCode);

    if ((primitive == GET_TRIP_POINT_ACTIVE) && (returnCode == ESIF_I_ACPI_TRIP_POINT_NOT_PRESENT))
    {
        // no message.  we still throw an exception to inform the policy.
    }
    else
    {
        writeMessageWarning(message);
    }

    throw primitive_execution_failed(message);
}
开发者ID:zeros1122,项目名称:dptf,代码行数:26,代码来源:EsifServices.cpp

示例2: primitiveExecuteGetAsTemperatureC

Temperature EsifServices::primitiveExecuteGetAsTemperatureC(esif_primitive_type primitive,
    UIntN participantIndex, UIntN domainIndex, UInt8 instance)
{
    throwIfParticipantDomainCombinationInvalid(FLF, participantIndex, domainIndex);

    EsifDataTemperature esifResult;

    eEsifError rc = m_esifInterface.fPrimitiveFuncPtr(m_esifHandle, m_dptfManager,
        (void*)m_dptfManager->getIndexContainer()->getIndexPtr(participantIndex),
        (void*)m_dptfManager->getIndexContainer()->getIndexPtr(domainIndex),
        EsifDataVoid(), esifResult, primitive, instance);

#ifdef ONLY_LOG_TEMPERATURE_THRESHOLDS
    // Added to help debug issue with missing temperature threshold events
    if (primitive == esif_primitive_type::GET_TEMPERATURE)
    {
        ManagerMessage message = ManagerMessage(m_dptfManager, FLF,
            "Requested participant temperature from ESIF.");
        message.addMessage("Temperature", esifResult);
        message.setEsifPrimitive(primitive, instance);
        message.setParticipantAndDomainIndex(participantIndex, domainIndex);
        message.setEsifErrorCode(rc);
        writeMessageDebug(message, MessageCategory::TemperatureThresholds);
    }
#endif

    throwIfNotSuccessful(FLF, rc, primitive, participantIndex, domainIndex, instance);

    return esifResult;
}
开发者ID:zeros1122,项目名称:dptf,代码行数:30,代码来源:EsifServices.cpp

示例3: primitiveExecuteSetAsTemperatureC

void EsifServices::primitiveExecuteSetAsTemperatureC(esif_primitive_type primitive, Temperature temperature,
    UIntN participantIndex, UIntN domainIndex, UInt8 instance)
{
    throwIfParticipantDomainCombinationInvalid(FLF, participantIndex, domainIndex);

#ifdef ONLY_LOG_TEMPERATURE_THRESHOLDS
    // Added to help debug issue with missing temperature threshold events
    if (primitive == esif_primitive_type::SET_TEMPERATURE_THRESHOLDS)
    {
        ManagerMessage message = ManagerMessage(m_dptfManager, FLF,
            "Setting new temperature threshold for participant.");
        message.addMessage("Temperature", temperature.toString());
        message.setEsifPrimitive(primitive, instance);
        message.setParticipantAndDomainIndex(participantIndex, domainIndex);
        writeMessageDebug(message, MessageCategory::TemperatureThresholds);
    }
#endif

    eEsifError rc = m_esifInterface.fPrimitiveFuncPtr(m_esifHandle, m_dptfManager,
        (void*)m_dptfManager->getIndexContainer()->getIndexPtr(participantIndex),
        (void*)m_dptfManager->getIndexContainer()->getIndexPtr(domainIndex),
        EsifDataTemperature(temperature), EsifDataVoid(), primitive, instance);

#ifdef ONLY_LOG_TEMPERATURE_THRESHOLDS
    // Added to help debug issue with missing temperature threshold events
    if (primitive == esif_primitive_type::SET_TEMPERATURE_THRESHOLDS &&
        rc != ESIF_OK)
    {
        ManagerMessage message = ManagerMessage(m_dptfManager, FLF,
            "Failed to set new temperature threshold.");
        message.addMessage("Temperature", temperature.toString());
        message.setEsifPrimitive(primitive, instance);
        message.setParticipantAndDomainIndex(participantIndex, domainIndex);
        message.setEsifErrorCode(rc);
        writeMessageError(message, MessageCategory::TemperatureThresholds);
    }
#endif

    throwIfNotSuccessful(FLF, rc, primitive, participantIndex, domainIndex, instance);
}
开发者ID:zeros1122,项目名称:dptf,代码行数:40,代码来源:EsifServices.cpp

示例4: throwIfParticipantDomainCombinationInvalid

void EsifServices::throwIfParticipantDomainCombinationInvalid(const std::string& fileName, UIntN lineNumber,
    const std::string& executingFunctionName, UIntN participantIndex, UIntN domainIndex)
{
    if ((participantIndex == Constants::Esif::NoParticipant) && (domainIndex != Constants::Esif::NoDomain))
    {
        ManagerMessage message = ManagerMessage(m_dptfManager, fileName, lineNumber, executingFunctionName,
            "Domain index not valid without associated participant index");
        message.setParticipantAndDomainIndex(participantIndex, domainIndex);

        writeMessageWarning(message);
        throw dptf_exception(message);
    }
}
开发者ID:zeros1122,项目名称:dptf,代码行数:13,代码来源:EsifServices.cpp

示例5: 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

示例6: unregisterEvent

void EsifServices::unregisterEvent(FrameworkEvent::Type frameworkEvent, UIntN participantIndex, UIntN domainIndex)
{
    throwIfParticipantDomainCombinationInvalid(FLF, participantIndex, domainIndex);

    Guid guid = FrameworkEventInfo::instance()->getGuid(frameworkEvent);

    eEsifError rc = m_esifInterface.fUnregisterEventFuncPtr(m_esifHandle, m_dptfManager,
        (void*)m_dptfManager->getIndexContainer()->getIndexPtr(participantIndex),
        (void*)m_dptfManager->getIndexContainer()->getIndexPtr(domainIndex),
        EsifDataGuid(guid));

    // FIXME:  this should throw an exception if we get an unexpected return code.  For now we will just log an
    //         error so we can see a list of items to correct.
    if (rc != ESIF_OK)
    {
        ManagerMessage message = ManagerMessage(m_dptfManager, FLF,
            "Error returned from ESIF unregister event function call");
        message.setFrameworkEvent(frameworkEvent);
        message.addMessage("Guid", guid.toString());
        message.setParticipantAndDomainIndex(participantIndex, domainIndex);
        message.setEsifErrorCode(rc);
        writeMessageWarning(message);
    }
}
开发者ID:zeros1122,项目名称:dptf,代码行数:24,代码来源:EsifServices.cpp


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