chore: add documentation RI
Code functionality left unchanged, only added docs where missing close: N25B-298
This commit is contained in:
@@ -2,7 +2,27 @@ from __future__ import unicode_literals
|
||||
|
||||
|
||||
class AgentSettings(object):
|
||||
"""Agent port configuration."""
|
||||
"""
|
||||
Agent port configuration.
|
||||
|
||||
:param actuating_receiver_port: Port for receiving actuation commands.
|
||||
:type actuating_receiver_port: int
|
||||
:param main_receiver_port: Port for receiving main messages.
|
||||
:type main_receiver_port: int
|
||||
:param video_sender_port: Port used for sending video frames.
|
||||
:type video_sender_port: int
|
||||
:param audio_sender_port: Port used for sending audio data.
|
||||
:type audio_sender_port: int
|
||||
|
||||
:ivar actuating_receiver_port: Port for receiving actuation commands.
|
||||
:type actuating_receiver_port: int
|
||||
:ivar main_receiver_port: Port for receiving main messages.
|
||||
:type main_receiver_port: int
|
||||
:ivar video_sender_port: Port used for sending video frames.
|
||||
:type video_sender_port: int
|
||||
:ivar audio_sender_port: Port used for sending audio data.
|
||||
:type audio_sender_port: int
|
||||
"""
|
||||
def __init__(
|
||||
self,
|
||||
actuating_receiver_port=5557,
|
||||
@@ -17,7 +37,35 @@ class AgentSettings(object):
|
||||
|
||||
|
||||
class VideoConfig(object):
|
||||
"""Video configuration constants."""
|
||||
"""
|
||||
Video configuration constants.
|
||||
|
||||
:param camera_index: Index of the camera to use.
|
||||
:type camera_index: int
|
||||
:param resolution: Video resolution mode.
|
||||
:type resolution: int
|
||||
:param color_space: Color space identifier.
|
||||
:type color_space: int
|
||||
:param fps: Frames per second of the video stream.
|
||||
:type fps: int
|
||||
:param stream_name: Name of the video stream.
|
||||
:type stream_name: str
|
||||
:param image_buffer: Internal buffer size for video frames.
|
||||
:type image_buffer: int
|
||||
|
||||
:ivar camera_index: Index of the camera used.
|
||||
:type camera_index: int
|
||||
:ivar resolution: Video resolution mode.
|
||||
:type resolution: int
|
||||
:ivar color_space: Color space identifier.
|
||||
:type color_space: int
|
||||
:ivar fps: Frames per second of the video stream.
|
||||
:type fps: int
|
||||
:ivar stream_name: Name of the video stream.
|
||||
:type stream_name: str
|
||||
:ivar image_buffer: Internal buffer size for video frames.
|
||||
:type image_buffer: int
|
||||
"""
|
||||
def __init__(
|
||||
self,
|
||||
camera_index=0,
|
||||
@@ -36,7 +84,23 @@ class VideoConfig(object):
|
||||
|
||||
|
||||
class AudioConfig(object):
|
||||
"""Audio configuration constants."""
|
||||
"""
|
||||
Audio configuration constants.
|
||||
|
||||
:param sample_rate: Audio sampling rate in Hz.
|
||||
:type sample_rate: int
|
||||
:param chunk_size: Size of audio chunks to capture/process.
|
||||
:type chunk_size: int
|
||||
:param channels: Number of audio channels.
|
||||
:type channels: int
|
||||
|
||||
:ivar sample_rate: Audio sampling rate in Hz.
|
||||
:type sample_rate: int
|
||||
:ivar chunk_size: Size of audio chunks to capture/process.
|
||||
:type chunk_size: int
|
||||
:ivar channels: Number of audio channels.
|
||||
:type channels: int
|
||||
"""
|
||||
def __init__(self, sample_rate=16000, chunk_size=512, channels=1):
|
||||
self.sample_rate = sample_rate
|
||||
self.chunk_size = chunk_size
|
||||
@@ -44,14 +108,46 @@ class AudioConfig(object):
|
||||
|
||||
|
||||
class MainConfig(object):
|
||||
"""Main configuration"""
|
||||
"""
|
||||
Main system configuration.
|
||||
|
||||
:param poll_timeout_ms: Timeout for polling events, in milliseconds.
|
||||
:type poll_timeout_ms: int
|
||||
:param max_handler_time_ms: Maximum allowed handler time, in milliseconds.
|
||||
:type max_handler_time_ms: int
|
||||
|
||||
:ivar poll_timeout_ms: Timeout for polling events, in milliseconds.
|
||||
:type poll_timeout_ms: int
|
||||
:ivar max_handler_time_ms: Maximum allowed handler time, in milliseconds.
|
||||
:type max_handler_time_ms: int
|
||||
"""
|
||||
def __init__(self, poll_timeout_ms=100, max_handler_time_ms=50):
|
||||
self.poll_timeout_ms = poll_timeout_ms
|
||||
self.max_handler_time_ms = max_handler_time_ms
|
||||
|
||||
|
||||
class Settings(object):
|
||||
"""Global settings container."""
|
||||
"""
|
||||
Global settings container.
|
||||
|
||||
:param agent_settings: Agent settings instance or None for defaults.
|
||||
:type agent_settings: AgentSettings | None
|
||||
:param video_config: VideoConfig instance or None for defaults.
|
||||
:type video_config: VideoConfig | None
|
||||
:param audio_config: AudioConfig instance or None for defaults.
|
||||
:type audio_config: AudioConfig | None
|
||||
:param main_config: MainConfig instance or None for defaults.
|
||||
:type main_config: MainConfig | None
|
||||
|
||||
:ivar agent_settings: Agent-related port configuration.
|
||||
:type agent_settings: AgentSettings
|
||||
:ivar video_config: Video stream configuration.
|
||||
:type video_config: VideoConfig
|
||||
:ivar audio_config: Audio stream configuration.
|
||||
:type audio_config: AudioConfig
|
||||
:ivar main_config: Main system-level configuration.
|
||||
:type main_config: MainConfig
|
||||
"""
|
||||
def __init__(self, agent_settings=None, video_config=None, audio_config=None, main_config=None):
|
||||
self.agent_settings = agent_settings or AgentSettings()
|
||||
self.video_config = video_config or VideoConfig()
|
||||
|
||||
Reference in New Issue
Block a user