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


C++ Temperature::toString方法代码示例

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


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

示例1: setTemperatureThresholds

void ParticipantProxy::setTemperatureThresholds(const Temperature& lowerBound, const Temperature& upperBound)
{
    refreshDomainSetIfUninitialized();
    if (m_domains.size() > 0)
    {
        if (m_domains[0].getTemperatureProperty().implementsTemperatureInterface())
        {
            m_policyServices.messageLogging->writeMessageDebug(PolicyMessage(FLF,
                "Setting thresholds to " + lowerBound.toString() + ":" + upperBound.toString() + "."));
            m_domains[0].getTemperatureProperty().setTemperatureNotificationThresholds(lowerBound, upperBound);
        }
    }

    m_previousLowerBound = lowerBound;
    m_previousUpperBound = upperBound;
}
开发者ID:hoangt,项目名称:dptf,代码行数:16,代码来源:ParticipantProxy.cpp

示例2: addMessage

void DptfMessage::addMessage(const std::string& messageKey, Temperature messageValue)
{
    try
    {
        m_messageKeyValuePair.push_back(MessageKeyValuePair(messageKey, messageValue.toString()));
    }
    catch (...)
    {
    }
}
开发者ID:hoangt,项目名称:dptf,代码行数:10,代码来源:DptfMessage.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


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