| #ifndef THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_SHARED_MEM_CLIENT_INTERFACE_H |
| #define THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_SHARED_MEM_CLIENT_INTERFACE_H |
| #include <cstdint> |
| #include <string> |
| |
| #include "absl/status/status.h" |
| // copybara:strip_begin(g3-shared-libs) |
| #include "tlbmc/hal/shared_mem/metrics.h" |
| // copybara:strip_end |
| |
| namespace milotic_tlbmc { |
| class IpcClient { |
| public: |
| virtual ~IpcClient() = default; |
| // Updates the sensor value. |
| // Returns whether the update is successful. |
| virtual absl::Status UpdateSensorValue(const std::string& sensor_name, |
| float value) = 0; |
| // Updates the sensor value and timestamp. |
| // Returns whether the update is successful. |
| virtual absl::Status UpdateSensorValue(const std::string& sensor_name, |
| float value, uint64_t timestamp) = 0; |
| |
| // Indicates whether the shared memory segment is ready. |
| virtual bool IsSharedMemoryReady() = 0; |
| |
| // copybara:strip_begin(g3-shared-libs) |
| virtual const milotic_tlbmc::TlbmcMetrics* GetMetrics() = 0; |
| // copybara:strip_end |
| }; |
| } // namespace milotic_tlbmc |
| #endif // THIRD_PARTY_MILOTIC_EXTERNAL_CC_TLBMC_HAL_SHARED_MEM_CLIENT_INTERFACE_H |