SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
Loading...
Searching...
No Matches
edge_metrics_provider.hpp
1//
2// Created by greg on 7/17/25.
3// Copyright (c) 2025 Presage Technologies
4//
5// SPDX-License-Identifier: LGPL-3.0-or-later
6
7#pragma once
8// === standard library includes (if any) ===
9#include <queue>
10// === third-party includes (if any) ===
11#include <grpc/grpc.h>
12#include <grpcpp/grpcpp.h>
13#include <grpcpp/impl/codegen/server_callback.h>
14#include <physiology/modules/rpc.h>
15// === local includes (if any) ===
16#include <smartspectra/cpp/physiology_service.pb.h>
17#include <smartspectra/container/background_container.hpp>
18#include "queued_server_write_reactor.hpp"
19
20
21namespace presage::smartspectra::grpc_bindings {
22
23template<container::settings::IntegrationMode TIntegrationMode>
24class EdgeMetricsProvider :
25 public QueuedServerWriteReactor<presage::physiology::Metrics> {
26public:
27 using BackgroundContainer =
29 presage::platform_independence::DeviceType::Cpu,
30 smartspectra::container::settings::OperationMode::Continuous,
31 TIntegrationMode
32 >;
33
34 explicit EdgeMetricsProvider(std::shared_ptr<BackgroundContainer> container);
35
36 void SwapContainer(std::shared_ptr<BackgroundContainer> new_container);
37
38 const BackgroundContainer* GetContainer() const { return this->container.get(); }
39
40private:
41 std::shared_ptr<BackgroundContainer> container;
42};
43
44} // namespace presage::smartspectra::grpc_bindings
Container for background thread processing.
Definition background_container.hpp:40