Configuration API
Configuration Management
- class neoruntime_ipc_sdk.config.Config[source]
Bases:
objectSDK Configuration
Automatically reads configuration from environment variables
- static get_app_id()[source]
Get application ID
- static get_inference_endpoint()[source]
Get AI Runtime endpoint
- static get_event_bus_endpoint()[source]
Get Event Bus endpoint
- static get_device_control_endpoint()[source]
Get Device Control endpoint
- static get_shm_base_path()[source]
Get base path for shared-memory IPC sockets
- static get_camera_control_endpoint()[source]
Get Camera Control gRPC endpoint
- static get_app_manager_endpoint()[source]
Get App Manager gRPC endpoint
- static get_encoded_socket_dir()[source]
Get directory containing EncodedPublisher UDS sockets
- static get_host_prefix()[source]
Get host install prefix (canonical root: /data/aipc).
The container sees /opt/aipc via volume mounts, but ai-runtime on the host resolves paths under the real install root. AIPC_HOST_PREFIX overrides for non-standard deployments (e.g. /opt/aipc legacy).
- static translate_path_to_host(container_path)[source]
Translate a container-internal path to the host filesystem path.
The container sees /opt/aipc via volume mounts even when the platform is installed under the canonical /data/aipc host root; ai-runtime on the host needs the actual host path. This function translates container paths to host paths using AIPC_HOST_PREFIX (default /data/aipc).
Also handles /data/ paths for devices where the platform is installed under /data/ instead of /opt/.
- static is_debug()[source]
Check if debug mode is enabled
- static get_log_level()[source]
Get log level
Config
- class neoruntime_ipc_sdk.Config[source]
Bases:
objectSDK Configuration
Automatically reads configuration from environment variables
- static get_host_prefix()[source]
Get host install prefix (canonical root: /data/aipc).
The container sees /opt/aipc via volume mounts, but ai-runtime on the host resolves paths under the real install root. AIPC_HOST_PREFIX overrides for non-standard deployments (e.g. /opt/aipc legacy).
- static translate_path_to_host(container_path)[source]
Translate a container-internal path to the host filesystem path.
The container sees /opt/aipc via volume mounts even when the platform is installed under the canonical /data/aipc host root; ai-runtime on the host needs the actual host path. This function translates container paths to host paths using AIPC_HOST_PREFIX (default /data/aipc).
Also handles /data/ paths for devices where the platform is installed under /data/ instead of /opt/.
Usage Examples
Static Methods
from neoruntime_ipc_sdk import Config
# Get application ID
app_id = Config.get_app_id()
# Get service endpoints
ai_runtime_endpoint = Config.get_inference_endpoint()
event_bus_endpoint = Config.get_event_bus_endpoint()
device_control_endpoint = Config.get_device_control_endpoint()
# Get SHM path
shm_base_path = Config.get_shm_base_path()
# Debug and logging
is_debug = Config.is_debug()
log_level = Config.get_log_level()
Environment Variable Configuration
The SDK automatically reads configuration from environment variables:
export APP_ID=my_app
export AI_RUNTIME_ENDPOINT=unix:///run/aipc/ai-runtime.sock
export EVENT_BUS_ENDPOINT=unix:///run/aipc/event-bus.sock
export DEVICE_CONTROL_ENDPOINT=unix:///run/aipc/device-control.sock
export SHM_BASE_PATH=/run/aipc/shm
export DEBUG=1
export LOG_LEVEL=DEBUG
from neoruntime_ipc_sdk import Config
# Automatically loaded from environment variables
print(Config.get_app_id()) # Output: my_app
print(Config.get_inference_endpoint()) # Output: unix:///run/aipc/ai-runtime.sock