| #ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_GPIO_H_ |
| #define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_GPIO_H_ |
| |
| #include <memory> |
| #include <utility> |
| #include <vector> |
| |
| #include "bus_topology.pb.h" |
| #include "absl/status/statusor.h" |
| #include "tlbmc/collector/gpio_collector.h" |
| #include "gpio_fru_config.pb.h" |
| #include "tlbmc/hal/fru_scanner.h" |
| #include "status.pb.h" |
| |
| namespace milotic_tlbmc { |
| |
| class FruScannerGpio : public FruScanner { |
| public: |
| struct Options { |
| std::vector<milotic_tlbmc::GpioFruComponent> components; |
| GpioCollector* gpio_collector = nullptr; |
| }; |
| |
| static absl::StatusOr<std::unique_ptr<FruScannerGpio>> Create( |
| const Options& option); |
| |
| absl::StatusOr<std::vector<std::unique_ptr<GpioFruInfo>>> ScanAllGpioFrus() |
| const override; |
| |
| protected: |
| FruScannerGpio(std::vector<milotic_tlbmc::GpioFruComponent> components, |
| GpioCollector* gpio_collector) |
| : gpio_components_(std::move(components)), |
| gpio_collector_(gpio_collector) {} |
| |
| std::vector<milotic_tlbmc::GpioFruComponent> gpio_components_; |
| |
| private: |
| GpioCollector* gpio_collector_ = nullptr; |
| }; |
| |
| } // namespace milotic_tlbmc |
| |
| #endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_GPIO_H_ |