![]() |
SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
|
#include <redis_ipc_configuration.hpp>
Classes | |
| struct | Channels |
| struct | Keys |
Public Member Functions | |
| nlohmann::json | ToJson () const |
Static Public Member Functions | |
| static absl::StatusOr< RedisIpcConfig > | LoadFromJson (const std::filesystem::path &path) |
| static absl::Status | SaveToJson (const RedisIpcConfig &config, const std::filesystem::path &path) |
| static absl::StatusOr< RedisIpcConfig > | FromJson (const nlohmann::json &j) |
Public Attributes | |
| std::string | host = "localhost" |
| int | port = 6379 |
| std::optional< std::string > | password |
| int | database = 0 |
| std::string | key_prefix = "physiology" |
| std::chrono::milliseconds | connection_timeout {1500} |
| std::chrono::milliseconds | operation_timeout {1000} |
| std::chrono::milliseconds | reconnect_interval {5000} |
| size_t | max_reconnect_attempts = 10 |
| struct presage::smartspectra::redis_ipc::RedisIpcConfig::Channels | channels |
| struct presage::smartspectra::redis_ipc::RedisIpcConfig::Keys | keys |
| size_t | max_list_size = 10000 |
| std::chrono::seconds | frame_ttl {300} |
| bool | enable_pipelining = true |
| bool | enable_debug_logging = false |
| bool | use_streams = false |
| size_t | stream_max_entries = 100000 |
| size_t | max_bulk_string_bytes = 134217728 |
| size_t | max_array_elements = 1000000 |
Configuration for Redis-based IPC communication.
This configuration defines how the physiology system should use Redis pub/sub and data structures to communicate between Edge and Core components.
|
static |
Create a configuration from a JSON object.
| j | The JSON object to deserialize |
|
static |
Load configuration from a JSON file.
| path | Path to the JSON configuration file |
|
static |
Save configuration to a JSON file.
| config | The configuration to save |
| path | Path where the JSON file should be written |
|
nodiscard |
Convert this configuration to a JSON object.
| std::chrono::milliseconds presage::smartspectra::redis_ipc::RedisIpcConfig::connection_timeout {1500} |
Connection timeout for Redis operations. Default: 1500ms
| int presage::smartspectra::redis_ipc::RedisIpcConfig::database = 0 |
Redis database number to use. Default: 0
| bool presage::smartspectra::redis_ipc::RedisIpcConfig::enable_debug_logging = false |
Whether to enable debug logging for Redis operations. Default: false
| bool presage::smartspectra::redis_ipc::RedisIpcConfig::enable_pipelining = true |
Whether to enable Redis command pipelining for better performance. Default: true
| std::chrono::seconds presage::smartspectra::redis_ipc::RedisIpcConfig::frame_ttl {300} |
TTL (time-to-live) for frame data in Redis. Frames older than this will be automatically expired. Default: 300 seconds (5 minutes), 0 = no expiration
| std::string presage::smartspectra::redis_ipc::RedisIpcConfig::host = "localhost" |
Redis server hostname or IP address. Default: "localhost"
| std::string presage::smartspectra::redis_ipc::RedisIpcConfig::key_prefix = "physiology" |
Key prefix for all Redis keys and channels. This allows multiple instances to share the same Redis server. Example: "physiology:instance1" would create keys like:
| size_t presage::smartspectra::redis_ipc::RedisIpcConfig::max_array_elements = 1000000 |
Maximum RESP array element count accepted from Redis replies. Default: 1000000 (1M elements). Set to 0 for no limit.
| size_t presage::smartspectra::redis_ipc::RedisIpcConfig::max_bulk_string_bytes = 134217728 |
Maximum RESP bulk string payload size accepted from Redis (bytes). Default: 134217728 (128MB). Set to 0 for no limit.
| size_t presage::smartspectra::redis_ipc::RedisIpcConfig::max_list_size = 10000 |
Maximum size for Redis lists (for buffering). Older entries will be removed when limit is exceeded. Default: 10000 entries (0 = unlimited)
| size_t presage::smartspectra::redis_ipc::RedisIpcConfig::max_reconnect_attempts = 10 |
Maximum number of reconnection attempts before giving up. Default: 10 (0 = unlimited)
| std::chrono::milliseconds presage::smartspectra::redis_ipc::RedisIpcConfig::operation_timeout {1000} |
Read/write timeout for individual Redis operations. Default: 1000ms
| std::optional<std::string> presage::smartspectra::redis_ipc::RedisIpcConfig::password |
Optional Redis password for authentication. If empty, no authentication will be attempted.
| int presage::smartspectra::redis_ipc::RedisIpcConfig::port = 6379 |
Redis server port number. Default: 6379 (standard Redis port)
| std::chrono::milliseconds presage::smartspectra::redis_ipc::RedisIpcConfig::reconnect_interval {5000} |
Reconnection interval when connection is lost. Default: 5000ms
| size_t presage::smartspectra::redis_ipc::RedisIpcConfig::stream_max_entries = 100000 |
Maximum entries in Redis Streams (if use_streams is true). Default: 100000 entries
| bool presage::smartspectra::redis_ipc::RedisIpcConfig::use_streams = false |
Whether to use Redis Streams instead of pub/sub for metrics. Streams provide persistence and guaranteed delivery. Default: false (use pub/sub)