Ejemplo n.º 1
0
void DomainDisplayControl_001::sendActivityLoggingDataIfEnabled(UIntN participantIndex, UIntN domainIndex)
{
    if (isActivityLoggingEnabled() == true) 
    {
        auto dynamicCaps = getDisplayControlDynamicCaps(participantIndex, domainIndex);
        auto displaySet = getDisplayControlSet(participantIndex, domainIndex);

        UInt32 displayControlIndex;
        if (m_currentDisplayControlIndex.isInvalid())
        {
            displayControlIndex = dynamicCaps.getCurrentUpperLimit();
        }
        else
        {
            displayControlIndex = m_currentDisplayControlIndex.get();
        }

        EsifCapabilityData capability;
        capability.type = ESIF_CAPABILITY_TYPE_DISPLAY_CONTROL;
        capability.size = sizeof(capability);
        capability.data.displayControl.currentDPTFLimit = displaySet[displayControlIndex].getBrightness().toWholeNumber();
        capability.data.displayControl.lowerLimit = displaySet[dynamicCaps.getCurrentLowerLimit()].getBrightness().toWholeNumber();
        capability.data.displayControl.upperLimit = displaySet[dynamicCaps.getCurrentUpperLimit()].getBrightness().toWholeNumber();

        getParticipantServices()->sendDptfEvent(ParticipantEvent::DptfParticipantControlAction,
            domainIndex, Capability::getEsifDataFromCapabilityData(&capability));
    }
}
Ejemplo n.º 2
0
void DomainPerformanceControlBase::sendActivityLoggingDataIfEnabled(UIntN participantIndex, UIntN domainIndex)
{
    try
    {
        if (isActivityLoggingEnabled() == true)
        {
            UInt32 performanceControlIndex = getCurrentPerformanceControlIndex(participantIndex, domainIndex);

            if (performanceControlIndex == Constants::Invalid)
            {
                performanceControlIndex = 0;
            }
            EsifCapabilityData capability;
            capability.type = ESIF_CAPABILITY_TYPE_PERF_CONTROL;
            capability.size = sizeof(capability);
            capability.data.performanceControl.pStateLimit = performanceControlIndex;
            capability.data.performanceControl.lowerLimit = 
                getPerformanceControlDynamicCaps(participantIndex, domainIndex).getCurrentLowerLimitIndex();
            capability.data.performanceControl.upperLimit = 
                getPerformanceControlDynamicCaps(participantIndex, domainIndex).getCurrentUpperLimitIndex();

            getParticipantServices()->sendDptfEvent(ParticipantEvent::DptfParticipantControlAction,
                domainIndex, Capability::getEsifDataFromCapabilityData(&capability));
        }
    }
    catch (...)
    {
        // skip if there are any issue in sending log data
    }
}
Ejemplo n.º 3
0
void DomainRfProfileStatus_001::sendActivityLoggingDataIfEnabled(UIntN participantIndex, UIntN domainIndex)
{
    try
    {
        if (isActivityLoggingEnabled() == true) {
            EsifCapabilityData capability;
            capability.type = ESIF_CAPABILITY_TYPE_RFPROFILE_STATUS;
            capability.size = sizeof(capability);

            getParticipantServices()->sendDptfEvent(ParticipantEvent::DptfParticipantControlAction,
                domainIndex, Capability::getEsifDataFromCapabilityData(&capability));
        }
    }
    catch (...)
    {
        // skip if there are any issue in sending log data
    }
}
Ejemplo n.º 4
0
void DomainCoreControl_001::sendActivityLoggingDataIfEnabled(UIntN participantIndex, UIntN domainIndex)
{
	try
	{
		if (isActivityLoggingEnabled() == true)
		{
			createCoreControlStaticCaps(domainIndex);
			UInt32 activeCores = getCoreControlStatus(participantIndex, domainIndex).getNumActiveLogicalProcessors();

			if (activeCores == Constants::Invalid)
			{
				activeCores = getCoreControlStaticCaps(participantIndex, domainIndex).getTotalLogicalProcessors();
			}

			EsifCapabilityData capability;
			capability.type = ESIF_CAPABILITY_TYPE_CORE_CONTROL;
			capability.size = sizeof(capability);
			capability.data.coreControl.activeLogicalProcessors = activeCores;
			capability.data.coreControl.minimumActiveCores = 1;
			capability.data.coreControl.maximumActiveCores =
				getCoreControlStaticCaps(participantIndex, domainIndex).getTotalLogicalProcessors();

			getParticipantServices()->sendDptfEvent(
				ParticipantEvent::DptfParticipantControlAction,
				domainIndex,
				Capability::getEsifDataFromCapabilityData(&capability));

			std::stringstream message;
			message << "Published activity for participant " << getParticipantIndex() << ", "
					<< "domain " << getName() << " "
					<< "("
					<< "Core Control"
					<< ")";
			getParticipantServices()->writeMessageInfo(ParticipantMessage(FLF, message.str()));
		}
	}
	catch (...)
	{
		// skip if there are any issue in sending log data
	}
}
Ejemplo n.º 5
0
void DomainPowerStatus_001::sendActivityLoggingDataIfEnabled(UIntN participantIndex, UIntN domainIndex)
{
    try
    {
        if (isActivityLoggingEnabled() == true)
        {
            EsifCapabilityData capability;
            capability.type = ESIF_CAPABILITY_TYPE_POWER_STATUS;
            capability.size = sizeof(capability);
            capability.data.powerStatus.powerFilterData.currentPowerSentToFilter = m_lastPowerSentToFilter;
            capability.data.powerStatus.powerFilterData.powerCalculatedByFilter = m_domainPowerFilter.getLastPowerUsed(PowerControlType::PL1);

            getParticipantServices()->sendDptfEvent(ParticipantEvent::DptfParticipantControlAction,
                domainIndex, Capability::getEsifDataFromCapabilityData(&capability));
        }
    }
    catch (...)
    {
        // skip if there are any issue in sending log data
    }
}