| #ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_USB_H_ |
| #define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_USB_H_ |
| |
| #include <memory> |
| #include <string> |
| #include <utility> |
| #include <vector> |
| |
| #include "absl/status/statusor.h" |
| #include "usb_fru_config.pb.h" |
| #include "tlbmc/hal/fru_scanner.h" |
| |
| namespace milotic_tlbmc { |
| |
| class FruScannerUsb : public FruScanner { |
| public: |
| struct Options { |
| std::string soc_path; |
| std::vector<milotic_tlbmc::UsbFruComponent> components; |
| }; |
| |
| static std::unique_ptr<FruScannerUsb> Create(const Options& options); |
| |
| absl::StatusOr<std::vector<std::unique_ptr<UsbFruInfo>>> ScanAllUsbFrus() |
| const override; |
| |
| protected: |
| FruScannerUsb(std::string soc_path, |
| std::vector<milotic_tlbmc::UsbFruComponent> components) |
| : soc_path_(std::move(soc_path)), |
| usb_components_(std::move(components)) {} |
| |
| std::string soc_path_; |
| std::vector<milotic_tlbmc::UsbFruComponent> usb_components_; |
| }; |
| |
| } // namespace milotic_tlbmc |
| |
| #endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_FRU_SCANNER_USB_H_ |