Exemple #1
0
void WIDomainPlatformRestOfPowerChanged::execute(void)
{
    writeDomainWorkItemStartingInfoMessage();

    try
    {
        getParticipantPtr()->domainPlatformRestOfPowerChanged();
    }
    catch (std::exception& ex)
    {
        writeDomainWorkItemErrorMessage(ex, "Participant::domainPlatformRestOfPowerChanged");
    }

    auto policyManager = getPolicyManager();
    UIntN policyListCount = policyManager->getPolicyListCount();

    for (UIntN i = 0; i < policyListCount; i++)
    {
        try
        {
            Policy* policy = policyManager->getPolicyPtr(i);
            policy->executeDomainPlatformRestOfPowerChanged(getParticipantIndex());
        }
        catch (policy_index_invalid ex)
        {
            // do nothing.  No item in the policy list at this index.
        }
        catch (std::exception& ex)
        {
            writeDomainWorkItemErrorMessagePolicy(ex, "Policy::executeDomainPlatformRestOfPowerChanged", i);
        }
    }
}
Exemple #2
0
void WIPolicyPowerBossConditionsTableChanged::execute(void)
{
    writeWorkItemStartingInfoMessage();

    auto policyManager = getPolicyManager();
    UIntN policyListCount = policyManager->getPolicyListCount();

    for (UIntN i = 0; i < policyListCount; i++)
    {
        try
        {
            Policy* policy = policyManager->getPolicyPtr(i);
            policy->executePolicyPowerBossConditionsTableChanged();
        }
        catch (policy_index_invalid ex)
        {
            // do nothing.  No item in the policy list at this index.
        }
        catch (std::exception& ex)
        {
            writeWorkItemErrorMessagePolicy(ex, 
                "Policy::executePolicyPowerBossConditionsTableChanged", i);
        }
    }
}
Exemple #3
0
void WIDomainCreate::execute(void)
{
    writeDomainWorkItemStartingInfoMessage();

    Bool domainCreated = false;

    try
    {
        getParticipantPtr()->createDomain(getDomainIndex(), m_domainDataPtr, m_domainEnabled);
        domainCreated = true;
    }
    catch (std::exception& ex)
    {
        writeDomainWorkItemErrorMessage(ex, "Participant::createDomain");
    }

    *m_domainCreated = domainCreated;

    if (domainCreated == true)
    {
        //
        // Iterate through the list of policies and let them know about the new domain
        //

        auto policyManager = getPolicyManager();
        UIntN policyListCount = policyManager->getPolicyListCount();

        for (UIntN i = 0; i < policyListCount; i++)
        {
            try
            {
                Policy* policy = policyManager->getPolicyPtr(i);
                policy->bindDomain(getParticipantIndex(), getDomainIndex());
            }
            catch (policy_index_invalid ex)
            {
                // do nothing.  No item in the policy list at this index.
            }
            catch (std::exception& ex)
            {
                writeDomainWorkItemErrorMessagePolicy(ex, "Policy::bindDomain", i);
            }
        }
    }
}
Exemple #4
0
void WIParticipantSpecificInfoChanged::execute(void)
{
    writeParticipantWorkItemStartingInfoMessage();

    try
    {
        getParticipantPtr()->participantSpecificInfoChanged();
    }
    catch (std::exception& ex)
    {
        writeParticipantWorkItemErrorMessage(ex, "Participant::participantSpecificInfoChanged");
    }

    auto policyManager = getPolicyManager();
    UIntN policyListCount = policyManager->getPolicyListCount();

    for (UIntN i = 0; i < policyListCount; i++)
    {
        try
        {
            Policy* policy = policyManager->getPolicyPtr(i);
            policy->executeParticipantSpecificInfoChanged(getParticipantIndex());
        }
        catch (policy_index_invalid ex)
        {
            // do nothing.  No item in the policy list at this index.
        }
        catch (temperature_out_of_range ex)
        {
            writeParticipantWorkItemWarningMessagePolicy(ex, "Policy::executeParticipantSpecificInfoChanged", i);
        }
        catch (std::exception& ex)
        {
            writeParticipantWorkItemWarningMessagePolicy(ex, "Policy::executeParticipantSpecificInfoChanged", i);
        }
    }
}