| #ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_SHARED_MEM_STATIC_CLIENT_SEGMENT_H_ |
| #define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_SHARED_MEM_STATIC_CLIENT_SEGMENT_H_ |
| |
| #include <memory> |
| #include <string> |
| |
| #include "absl/base/call_once.h" |
| #include "tlbmc/hal/shared_mem/client_segment.h" |
| // copybara:strip_begin(g3-shared-libs) |
| #include "tlbmc/hal/shared_mem/metrics.h" |
| // copybara:strip_end |
| #include "tlbmc/hal/shared_mem/sensors.h" |
| #include "tlbmc/hal/shared_mem/static_shm_common.h" |
| |
| namespace milotic_tlbmc { |
| |
| class StaticClientSegment : public ClientSegment { |
| public: |
| static std::unique_ptr<StaticClientSegment> Create( |
| const std::string& shared_memory_name); |
| |
| explicit StaticClientSegment(std::unique_ptr<TlbmcSharedMemoryType> memory); |
| |
| [[nodiscard]] IpcSensor* FindSensor( |
| const std::string& sensor_name) const override; |
| // copybara:strip_begin(g3-shared-libs) |
| [[nodiscard]] TlbmcMetrics* GetMetrics() override; |
| // copybara:strip_end |
| |
| private: |
| std::unique_ptr<TlbmcSharedMemoryType> memory_; |
| }; |
| |
| } // namespace milotic_tlbmc |
| |
| #endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_SHARED_MEM_STATIC_CLIENT_SEGMENT_H_ |