| #ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_CABLE_H_ |
| #define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_CABLE_H_ |
| |
| #include <memory> |
| #include <string> |
| #include <utility> |
| #include <vector> |
| |
| #include "bus_topology.pb.h" |
| #include "absl/status/statusor.h" |
| #include "absl/time/time.h" |
| #include "tlbmc/hal/fru_scanner.h" |
| |
| namespace milotic_tlbmc { |
| |
| class FruScannerCable : public FruScanner { |
| public: |
| struct Options { |
| std::string root_dir = "/"; |
| std::vector<uhmm::BmcMonitoredComponentsResponse::MonitoredComponent> |
| components; |
| }; |
| |
| static std::unique_ptr<FruScannerCable> Create(const Options& option); |
| |
| absl::StatusOr<std::vector<std::unique_ptr<CableFruInfo>>> ScanAllCableFrus() |
| const override; |
| |
| protected: |
| FruScannerCable( |
| std::vector<uhmm::BmcMonitoredComponentsResponse::MonitoredComponent> |
| components, |
| std::string root_dir) |
| : cable_components_(std::move(components)), |
| root_dir_(std::move(root_dir)) {} |
| |
| std::vector<uhmm::BmcMonitoredComponentsResponse::MonitoredComponent> |
| cable_components_; |
| std::string root_dir_; |
| }; |
| |
| } // namespace milotic_tlbmc |
| |
| #endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_CABLE_H_ |