![]() |
SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
|
#include <redis_ipc_stream_writer.hpp>
Public Types | |
| using | Base = ipc::IpcStreamWriter<TIntegrationMode> |
| using | BackgroundContainer |
| Public Types inherited from presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode > | |
| using | BackgroundContainer |
Public Member Functions | |
| RedisIpcStreamWriter (const RedisIpcConfig &configuration) | |
| absl::Status | WriteStatus (const presage::physiology::StatusValue &status) override |
| absl::Status | WriteCoreMetrics (const presage::physiology::MetricsBuffer &metrics, int64_t timestamp_us) override |
| absl::Status | WriteEdgeMetrics (const presage::physiology::Metrics &metrics, int64_t timestamp_us) override |
| absl::Status | WriteFrame (const cv::Mat &frame, int64_t timestamp_us) override |
| void | Close () override |
| bool | IsOperational () const override |
| absl::Status | Flush () override |
| absl::Status | PublishRecordingState (bool recording) |
| Public Member Functions inherited from presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode > | |
| virtual absl::Status | SwapContainer (std::shared_ptr< BackgroundContainer > new_container) |
| const BackgroundContainer * | GetContainer () const |
Protected Member Functions | |
| absl::Status | Initialize () |
| std::string | BuildKey (const std::string &suffix) const |
| std::string | BuildChannel (const std::string &suffix) const |
| Protected Member Functions inherited from presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode > | |
| virtual absl::Status | RegisterCallbacks () |
| virtual absl::Status | SendInitialStatus () |
| int64_t | GetCurrentTimestampUs () |
Additional Inherited Members | |
| Protected Attributes inherited from presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode > | |
| std::shared_ptr< BackgroundContainer > | container_ |
Redis-based implementation of IPC stream writer. Uses Redis pub/sub for real-time streaming and Redis keys for state storage.
|
protected |
Build Redis channel name with configured prefix.
|
protected |
Build Redis key with configured prefix.
|
overridevirtual |
Close the stream and release resources. After calling this, the writer should not be used again.
Implements presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode >.
|
overridevirtual |
Flush any buffered data to the underlying stream. Some implementations may buffer data for performance.
Implements presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode >.
|
protected |
Initialize Redis connection and state.
|
overridevirtual |
Check if the writer is currently operational.
Implements presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode >.
| absl::Status presage::smartspectra::redis_ipc::RedisIpcStreamWriter< TIntegrationMode >::PublishRecordingState | ( | bool | recording | ) |
Publish recording state change to Redis channel.
| recording | True if recording started, false if stopped |
|
overridevirtual |
Write core metrics to the stream.
| metrics | The core metrics buffer to write |
| timestamp_us | Timestamp in microseconds since epoch |
Implements presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode >.
|
overridevirtual |
Write edge metrics to the stream.
| metrics | The edge metrics to write |
Implements presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode >.
|
overridevirtual |
Write a video frame to the stream.
| frame | The video frame as an OpenCV Mat (RGB format expected) |
| timestamp_us | Timestamp in microseconds since epoch |
Implements presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode >.
|
overridevirtual |
Write a status value to the stream.
| status | The status value to write |
Implements presage::smartspectra::ipc::IpcStreamWriter< TIntegrationMode >.