SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
Loading...
Searching...
No Matches
alt_ipc_example_on_prem_client.IpcApp Class Reference

Public Member Functions

 __init__ (self)
 build_redis_channel (self, channel_name)
 build_redis_key (self, key_name)
None graceful_shutdown (self)
 handle_keyboard_input (self)
None frame_display_loop (self)
None handle_core_metrics (self)
None handle_edge_metrics (self)
None handle_status_codes (self)
None handle_redis_pubsub (self)
None handle_redis_command_queue (self)
None handle_logs (self)
int run (self)

Public Attributes

str stream_backend = 'file'
 ipc_base_dir = Path("/tmp/physiology_ipc")
str frames_dir = self.ipc_base_dir / "frames"
str redis_host = "localhost"
int redis_port = 6379
str redis_key_prefix = "physiology"
 redis_client = None
 pubsub = None
 core_metrics_reader = None
 edge_metrics_reader = None
 status_reader = None
bool print_full_core_metrics = False
bool print_full_edge_metrics = False
 physiology_client = None
bool recording = False
bool continue_running = True
dict latest_microexpression = None
 latest_frame_path = None
 latest_frame = None
list tasks = []
int display_fps = 30
float frame_display_interval = 1.0 / self.display_fps
 headless = args.headless

Protected Member Functions

 _process_metrics_envelope (self, str envelope_data)
None _frame_display_loop_file (self)
None _frame_display_loop_redis (self)

Member Function Documentation

◆ _frame_display_loop_file()

None alt_ipc_example_on_prem_client.IpcApp._frame_display_loop_file ( self)
protected
Display frames from filesystem

◆ _frame_display_loop_redis()

None alt_ipc_example_on_prem_client.IpcApp._frame_display_loop_redis ( self)
protected
Display frames from Redis pub/sub

◆ _process_metrics_envelope()

alt_ipc_example_on_prem_client.IpcApp._process_metrics_envelope ( self,
str envelope_data )
protected
Shared method to process metrics envelope (works for both file and redis)

◆ build_redis_channel()

alt_ipc_example_on_prem_client.IpcApp.build_redis_channel ( self,
channel_name )
Build full Redis channel name with prefix

◆ build_redis_key()

alt_ipc_example_on_prem_client.IpcApp.build_redis_key ( self,
key_name )
Build full Redis key name with prefix

◆ frame_display_loop()

None alt_ipc_example_on_prem_client.IpcApp.frame_display_loop ( self)
Display frames - dispatches to backend-specific implementation

◆ graceful_shutdown()

None alt_ipc_example_on_prem_client.IpcApp.graceful_shutdown ( self)
Clean shutdown of all resources

◆ handle_core_metrics()

None alt_ipc_example_on_prem_client.IpcApp.handle_core_metrics ( self)
Handle core metrics - file backend

◆ handle_edge_metrics()

None alt_ipc_example_on_prem_client.IpcApp.handle_edge_metrics ( self)
Handle edge metrics - file backend

◆ handle_keyboard_input()

alt_ipc_example_on_prem_client.IpcApp.handle_keyboard_input ( self)
Process keyboard input for controls

◆ handle_logs()

None alt_ipc_example_on_prem_client.IpcApp.handle_logs ( self)
Handle log streaming via gRPC (still uses gRPC for logs)

◆ handle_redis_command_queue()

None alt_ipc_example_on_prem_client.IpcApp.handle_redis_command_queue ( self)
Monitor Redis command queue for recording commands from UI

◆ handle_redis_pubsub()

None alt_ipc_example_on_prem_client.IpcApp.handle_redis_pubsub ( self)
Handle all Redis pub/sub messages

◆ handle_status_codes()

None alt_ipc_example_on_prem_client.IpcApp.handle_status_codes ( self)
Handle status codes - file backend

The documentation for this class was generated from the following file:
  • on_prem/samples/alt_ipc_example_on_prem_client.py