blob: 1da057710eb9ae3aed1adeffa287b97d71373ddd [file]
#ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_DETERMINISTIC_BMC_OFFLINE_CONFIG_PARSER_OFFLINE_CONFIG_PARSER_H_
#define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_DETERMINISTIC_BMC_OFFLINE_CONFIG_PARSER_OFFLINE_CONFIG_PARSER_H_
#include <memory>
#include "bus_topology.pb.h"
#include "absl/status/statusor.h"
#include "tlbmc/deterministic_bmc/offline_config_parser/offline_config_parser_interface.h"
#include "fru_i2c.pb.h"
namespace deterministic_bmc {
class OfflineConfigParser : public ConfigParserInterface {
public:
// Factory method to create an instance of OfflineConfigParser.
static absl::StatusOr<std::unique_ptr<OfflineConfigParser>> Create(
ConfigParserOptions options);
// Returns the I2C root from the proto file.
absl::StatusOr<uhmm::I2cRoot> GetI2cRoot() const override;
// Returns the BMC monitored components response from the proto file.
absl::StatusOr<uhmm::BmcMonitoredComponentsResponse>
GetBmcMonitoredComponentsResponse() const override;
bool isUhmmConfigValid() const override { return is_uhmm_config_valid_; }
private:
explicit OfflineConfigParser(
uhmm::I2cRoot i2c_root,
uhmm::BmcMonitoredComponentsResponse bmc_monitored_components_response,
bool is_uhmm_config_valid);
uhmm::I2cRoot i2c_root_;
uhmm::BmcMonitoredComponentsResponse bmc_monitored_components_response_;
bool is_uhmm_config_valid_ = false;
};
} // namespace deterministic_bmc
#endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_DETERMINISTIC_BMC_OFFLINE_CONFIG_PARSER_OFFLINE_CONFIG_PARSER_H_