redfish-core/lib/systems.hpp
inline void
    updateDimmProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                         const std::variant<bool>& dimmState)
{
    const bool* isDimmFunctional = std::get_if<bool>(&dimmState);
    if (isDimmFunctional == nullptr)
    {
        messages::internalError(aResp->res);
        return;
    }
    BMCWEB_LOG_DEBUG << "Dimm Functional: " << *isDimmFunctional;

    // Set it as Enabled if at least one DIMM is functional
    // Update STATE only if previous State was DISABLED and current Dimm is
    // ENABLED.
    nlohmann::json& prevMemSummary =
        aResp->res.jsonValue["MemorySummary"]["Status"]["State"];
    if (prevMemSummary == "Disabled")
    {
        if (*isDimmFunctional == true)
        {
            aResp->res.jsonValue["MemorySummary"]["Status"]["State"] =
                "Enabled";
        }
    }
}
/**
 * @brief Updates the Functional State of DIMMs
 *
 * @param[in] aResp Shared pointer for completing asynchronous calls
 * @param[in] dimmState Dimm's Functional state, true/false
 *
 * @return None.
 */
@brief Updates the Functional State of DIMMs
@param[in] aResp Shared pointer for completing asynchronous calls
@param[in] dimmState Dimm's Functional state, true/false

@return None.
@brief Updates the Functional State of DIMMs @param [ in ] aResp Shared pointer for completing asynchronous calls @param [ in ] dimmState Dimm ' s Functional state true / false @return None .
inline void
    updateDimmProperties(const std::shared_ptr<bmcweb::AsyncResp>& aResp,
                         const std::variant<bool>& dimmState)
{
    const bool* isDimmFunctional = std::get_if<bool>(&dimmState);
    if (isDimmFunctional == nullptr)
    {
        messages::internalError(aResp->res);
        return;
    }
    BMCWEB_LOG_DEBUG << "Dimm Functional: " << *isDimmFunctional;
    nlohmann::json& prevMemSummary =
        aResp->res.jsonValue["MemorySummary"]["Status"]["State"];
    if (prevMemSummary == "Disabled")
    {
        if (*isDimmFunctional == true)
        {
            aResp->res.jsonValue["MemorySummary"]["Status"]["State"] =
                "Enabled";
        }
    }
}
inline void updateDimmProperties ( const std :: shared_ptr < bmcweb :: AsyncResp > & aResp , const std :: variant < bool > & dimmState ) { const bool * isDimmFunctional = std :: get_if < bool > ( & dimmState ) ; if ( isDimmFunctional == nullptr ) { messages :: internalError ( aResp -> res ) ; return ; } BMCWEB_LOG_DEBUG << " " << * isDimmFunctional ; nlohmann :: json & prevMemSummary = aResp -> res . jsonValue [ " " ] [ " " ] [ " " ] ; if ( prevMemSummary == " " ) { if ( * isDimmFunctional == true ) { aResp -> res . jsonValue [ " " ] [ " " ] [ " " ] = " " ; } } }
@brief Updates the Functional State of DIMMs
 @param[in] aResp Shared pointer for completing asynchronous calls
 @param[in] dimmState Dimm's Functional state, true/false
@brief Updates the Functional State of DIMMs @param [ in ] aResp Shared pointer for completing asynchronous calls @param [ in ] dimmState Dimm ' s Functional state true / false
// Set it as Enabled if at least one DIMM is functional // Update STATE only if previous State was DISABLED and current Dimm is // ENABLED.