refactor: rename QoS configuration from "Default" to "Robust" and add QoS preset selection
- Rename `AuracastQosDefault` class to `AuracastQosRobust` to better reflect its characteristics (4 retransmissions) - Replace RTN (retransmission number) dropdown with QoS preset selector offering "Fast" (2 RTN) and "Robust" (4 RTN) options - Update frontend and backend to use QoS preset mapping instead of manual QoS config construction - Add `_resolve_qos_preset_name()` helper function to convert QoS config
This commit is contained in:
@@ -7,7 +7,7 @@ class AuracastQoSConfig(BaseModel):
|
||||
number_of_retransmissions: int
|
||||
max_transport_latency_ms: int
|
||||
|
||||
class AuracastQosDefault(AuracastQoSConfig):
|
||||
class AuracastQosRobust(AuracastQoSConfig):
|
||||
iso_int_multiple_10ms: int = 1
|
||||
number_of_retransmissions:int = 4 #4
|
||||
max_transport_latency_ms:int = 43 #varies from the default value in bumble (was 65)
|
||||
@@ -19,7 +19,7 @@ class AuracastQosFast(AuracastQoSConfig):
|
||||
|
||||
|
||||
class AuracastGlobalConfig(BaseModel):
|
||||
qos_config: AuracastQoSConfig = AuracastQosDefault()
|
||||
qos_config: AuracastQoSConfig = AuracastQosRobust()
|
||||
debug: bool = False
|
||||
device_name: str = 'Auracaster'
|
||||
transport: str = ''
|
||||
|
||||
@@ -918,7 +918,7 @@ if __name__ == "__main__":
|
||||
)
|
||||
|
||||
# TODO: How can we use other iso interval than 10ms ?(medium or low rel) ? - nrf53audio receiver repports I2S tx underrun
|
||||
config.qos_config=auracast_config.AuracastQosDefault()
|
||||
config.qos_config=auracast_config.AuracastQosRobust()
|
||||
|
||||
#config.transport='serial:/dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_81BD14B8D71B5662-if00,1000000,rtscts' # transport for nrf52 dongle
|
||||
#config.transport='serial:/dev/serial/by-id/usb-SEGGER_J-Link_001050076061-if02,1000000,rtscts' # transport for nrf53dk
|
||||
|
||||
@@ -140,7 +140,7 @@ async def main():
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
||||
global_conf = auracast_config.AuracastGlobalConfig(
|
||||
qos_config=auracast_config.AuracastQosDefault()
|
||||
qos_config=auracast_config.AuracastQosRobust()
|
||||
)
|
||||
#global_conf.transport='serial:/dev/serial/by-id/usb-SEGGER_J-Link_001057705357-if02,1000000,rtscts' # transport for nrf54l15dk
|
||||
global_conf.transport='serial:/dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_81BD14B8D71B5662-if00,115200,rtscts' #nrf52dongle hci_uart usb cdc
|
||||
|
||||
@@ -159,7 +159,7 @@ if __name__ == "__main__":
|
||||
],
|
||||
immediate_rendering=False,
|
||||
presentation_delay_us=40000,
|
||||
qos_config=auracast_config.AuracastQosDefault(),
|
||||
qos_config=auracast_config.AuracastQosRobust(),
|
||||
auracast_sampling_rate_hz = LC3_SRATE,
|
||||
octets_per_frame = OCTETS_PER_FRAME,
|
||||
transport=TRANSPORT1,
|
||||
|
||||
@@ -90,6 +90,11 @@ QUALITY_MAP = {
|
||||
"Fair (16kHz)": {"rate": 16000, "octets": 40},
|
||||
}
|
||||
|
||||
QOS_PRESET_MAP = {
|
||||
"Fast": auracast_config.AuracastQosFast(),
|
||||
"Robust": auracast_config.AuracastQosRobust(),
|
||||
}
|
||||
|
||||
# Try loading persisted settings from backend
|
||||
saved_settings = {}
|
||||
try:
|
||||
@@ -215,7 +220,7 @@ if audio_mode == "Demo":
|
||||
type=("password"),
|
||||
help="Optional: Set a broadcast code to protect your stream. Leave empty for an open (uncoded) broadcast."
|
||||
)
|
||||
col_flags1, col_flags2, col_pdelay, col_rtn = st.columns([1, 1, 0.7, 0.6], gap="small", vertical_alignment="center")
|
||||
col_flags1, col_flags2, col_pdelay, col_qos = st.columns([1, 1, 0.7, 0.6], gap="small", vertical_alignment="center")
|
||||
with col_flags1:
|
||||
assisted_listening = st.checkbox(
|
||||
"Assistive listening",
|
||||
@@ -237,13 +242,13 @@ if audio_mode == "Demo":
|
||||
min_value=10, max_value=200, step=5, value=default_pdelay_ms,
|
||||
help="Delay between capture and presentation for receivers."
|
||||
)
|
||||
default_rtn = int(saved_settings.get('rtn', 4) or 4)
|
||||
with col_rtn:
|
||||
rtn_options = [1,2,3,4]
|
||||
default_rtn_clamped = min(4, max(1, default_rtn))
|
||||
rtn = st.selectbox(
|
||||
"RTN", options=rtn_options, index=rtn_options.index(default_rtn_clamped),
|
||||
help="Number of ISO retransmissions (higher improves robustness at cost of airtime)."
|
||||
with col_qos:
|
||||
qos_options = list(QOS_PRESET_MAP.keys())
|
||||
saved_qos = saved_settings.get('qos_preset', 'Fast')
|
||||
default_qos_idx = qos_options.index(saved_qos) if saved_qos in qos_options else 0
|
||||
qos_preset = st.selectbox(
|
||||
"QoS", options=qos_options, index=default_qos_idx,
|
||||
help="Fast: 2 retransmissions, lower latency. Robust: 4 retransmissions, better reliability."
|
||||
)
|
||||
#st.info(f"Demo mode selected: {demo_selected} (Streams: {demo_stream_map[demo_selected]['streams']}, Rate: {demo_stream_map[demo_selected]['rate']} Hz)")
|
||||
# Start/Stop buttons for demo mode
|
||||
@@ -295,11 +300,7 @@ if audio_mode == "Demo":
|
||||
assisted_listening_stream=assisted_listening,
|
||||
immediate_rendering=immediate_rendering,
|
||||
presentation_delay_us=int(presentation_delay_ms * 1000),
|
||||
qos_config=auracast_config.AuracastQoSConfig(
|
||||
iso_int_multiple_10ms=1,
|
||||
number_of_retransmissions=int(rtn),
|
||||
max_transport_latency_ms=int(rtn)*10 + 3,
|
||||
),
|
||||
qos_config=QOS_PRESET_MAP[qos_preset],
|
||||
bigs=bigs1
|
||||
)
|
||||
config2 = None
|
||||
@@ -311,11 +312,7 @@ if audio_mode == "Demo":
|
||||
assisted_listening_stream=assisted_listening,
|
||||
immediate_rendering=immediate_rendering,
|
||||
presentation_delay_us=int(presentation_delay_ms * 1000),
|
||||
qos_config=auracast_config.AuracastQoSConfig(
|
||||
iso_int_multiple_10ms=1,
|
||||
number_of_retransmissions=int(rtn),
|
||||
max_transport_latency_ms=int(rtn)*10 + 3,
|
||||
),
|
||||
qos_config=QOS_PRESET_MAP[qos_preset],
|
||||
bigs=bigs2
|
||||
)
|
||||
# Call /init and /init2
|
||||
@@ -385,7 +382,7 @@ else:
|
||||
help="Optional: Set a broadcast code for Radio 1."
|
||||
)
|
||||
|
||||
col_r1_flags1, col_r1_flags2, col_r1_pdelay, col_r1_rtn = st.columns([1, 1, 0.7, 0.6], gap="small")
|
||||
col_r1_flags1, col_r1_flags2, col_r1_pdelay, col_r1_qos = st.columns([1, 1, 0.7, 0.6], gap="small")
|
||||
with col_r1_flags1:
|
||||
assisted_listening1 = st.checkbox(
|
||||
"Assistive listening (R1)",
|
||||
@@ -406,13 +403,13 @@ else:
|
||||
min_value=10, max_value=200, step=5, value=default_pdelay_ms,
|
||||
help="Delay between capture and presentation for Radio 1."
|
||||
)
|
||||
default_rtn = int(saved_settings.get('rtn', 4) or 4)
|
||||
with col_r1_rtn:
|
||||
rtn_options = [1,2,3,4]
|
||||
default_rtn_clamped = min(4, max(1, default_rtn))
|
||||
rtn1 = st.selectbox(
|
||||
"RTN (R1)", options=rtn_options, index=rtn_options.index(default_rtn_clamped),
|
||||
help="Number of ISO retransmissions for Radio 1."
|
||||
with col_r1_qos:
|
||||
qos_options = list(QOS_PRESET_MAP.keys())
|
||||
saved_qos = saved_settings.get('qos_preset', 'Fast')
|
||||
default_qos_idx = qos_options.index(saved_qos) if saved_qos in qos_options else 0
|
||||
qos_preset1 = st.selectbox(
|
||||
"QoS (R1)", options=qos_options, index=default_qos_idx,
|
||||
help="Fast: 2 retransmissions, lower latency. Robust: 4 retransmissions, better reliability."
|
||||
)
|
||||
|
||||
col_r1_name, col_r1_lang = st.columns([2, 1])
|
||||
@@ -507,7 +504,7 @@ else:
|
||||
help="Optional: Set a broadcast code for Radio 2."
|
||||
)
|
||||
|
||||
col_r2_flags1, col_r2_flags2, col_r2_pdelay, col_r2_rtn = st.columns([1, 1, 0.7, 0.6], gap="small")
|
||||
col_r2_flags1, col_r2_flags2, col_r2_pdelay, col_r2_qos = st.columns([1, 1, 0.7, 0.6], gap="small")
|
||||
with col_r2_flags1:
|
||||
assisted_listening2 = st.checkbox(
|
||||
"Assistive listening (R2)",
|
||||
@@ -526,10 +523,12 @@ else:
|
||||
min_value=10, max_value=200, step=5, value=default_pdelay_ms,
|
||||
help="Delay between capture and presentation for Radio 2."
|
||||
)
|
||||
with col_r2_rtn:
|
||||
rtn2 = st.selectbox(
|
||||
"RTN (R2)", options=rtn_options, index=rtn_options.index(default_rtn_clamped),
|
||||
help="Number of ISO retransmissions for Radio 2."
|
||||
with col_r2_qos:
|
||||
saved_qos2 = saved_settings.get('secondary', {}).get('qos_preset', 'Fast')
|
||||
default_qos_idx2 = qos_options.index(saved_qos2) if saved_qos2 in qos_options else 0
|
||||
qos_preset2 = st.selectbox(
|
||||
"QoS (R2)", options=qos_options, index=default_qos_idx2,
|
||||
help="Fast: 2 retransmissions, lower latency. Robust: 4 retransmissions, better reliability."
|
||||
)
|
||||
|
||||
col_r2_name, col_r2_lang = st.columns([2, 1])
|
||||
@@ -582,7 +581,7 @@ else:
|
||||
'assisted_listening': assisted_listening2,
|
||||
'immediate_rendering': immediate_rendering2,
|
||||
'presentation_delay_ms': presentation_delay_ms2,
|
||||
'rtn': rtn2,
|
||||
'qos_preset': qos_preset2,
|
||||
}
|
||||
|
||||
radio1_cfg = {
|
||||
@@ -596,7 +595,7 @@ else:
|
||||
'assisted_listening': assisted_listening1,
|
||||
'immediate_rendering': immediate_rendering1,
|
||||
'presentation_delay_ms': presentation_delay_ms1,
|
||||
'rtn': rtn1,
|
||||
'qos_preset': qos_preset1,
|
||||
}
|
||||
|
||||
else:
|
||||
@@ -617,7 +616,7 @@ else:
|
||||
help="Optional: Set a broadcast code to protect your stream. Leave empty for an open (uncoded) broadcast."
|
||||
)
|
||||
|
||||
col_flags1, col_flags2, col_pdelay, col_rtn = st.columns([1, 1, 0.7, 0.6], gap="small")
|
||||
col_flags1, col_flags2, col_pdelay, col_qos = st.columns([1, 1, 0.7, 0.6], gap="small")
|
||||
with col_flags1:
|
||||
assisted_listening = st.checkbox(
|
||||
"Assistive listening",
|
||||
@@ -638,13 +637,13 @@ else:
|
||||
min_value=10, max_value=200, step=5, value=default_pdelay_ms,
|
||||
help="Delay between capture and presentation for receivers."
|
||||
)
|
||||
default_rtn = int(saved_settings.get('rtn', 4) or 4)
|
||||
with col_rtn:
|
||||
rtn_options = [1,2,3,4]
|
||||
default_rtn_clamped = min(4, max(1, default_rtn))
|
||||
rtn = st.selectbox(
|
||||
"RTN", options=rtn_options, index=rtn_options.index(default_rtn_clamped),
|
||||
help="Number of ISO retransmissions (higher improves robustness at cost of airtime)."
|
||||
with col_qos:
|
||||
qos_options = list(QOS_PRESET_MAP.keys())
|
||||
saved_qos = saved_settings.get('qos_preset', 'Fast')
|
||||
default_qos_idx = qos_options.index(saved_qos) if saved_qos in qos_options else 0
|
||||
qos_preset = st.selectbox(
|
||||
"QoS", options=qos_options, index=default_qos_idx,
|
||||
help="Fast: 2 retransmissions, lower latency. Robust: 4 retransmissions, better reliability."
|
||||
)
|
||||
|
||||
stream_name = st.text_input(
|
||||
@@ -768,11 +767,7 @@ else:
|
||||
assisted_listening_stream=bool(cfg['assisted_listening']),
|
||||
immediate_rendering=bool(cfg['immediate_rendering']),
|
||||
presentation_delay_us=int(cfg['presentation_delay_ms'] * 1000),
|
||||
qos_config=auracast_config.AuracastQoSConfig(
|
||||
iso_int_multiple_10ms=1,
|
||||
number_of_retransmissions=int(cfg['rtn']),
|
||||
max_transport_latency_ms=int(cfg['rtn']) * 10 + 3,
|
||||
),
|
||||
qos_config=QOS_PRESET_MAP[cfg['qos_preset']],
|
||||
bigs=[
|
||||
auracast_config.AuracastBigConfig(
|
||||
id=cfg.get('id', 123456),
|
||||
@@ -820,11 +815,7 @@ else:
|
||||
assisted_listening_stream=assisted_listening,
|
||||
immediate_rendering=immediate_rendering,
|
||||
presentation_delay_us=int(presentation_delay_ms * 1000),
|
||||
qos_config=auracast_config.AuracastQoSConfig(
|
||||
iso_int_multiple_10ms=1,
|
||||
number_of_retransmissions=int(rtn),
|
||||
max_transport_latency_ms=int(rtn)*10 + 3,
|
||||
),
|
||||
qos_config=QOS_PRESET_MAP[qos_preset],
|
||||
bigs=[
|
||||
auracast_config.AuracastBigConfig(
|
||||
code=(stream_passwort.strip() or None),
|
||||
|
||||
@@ -41,6 +41,12 @@ _DEFAULT_BIG = auracast_config.AuracastBigConfig()
|
||||
DEFAULT_BIG_ID = _DEFAULT_BIG.id
|
||||
DEFAULT_RANDOM_ADDRESS = _DEFAULT_BIG.random_address
|
||||
|
||||
# QoS presets mapping - must match frontend
|
||||
QOS_PRESET_MAP = {
|
||||
"Fast": auracast_config.AuracastQosFast(),
|
||||
"Robust": auracast_config.AuracastQosRobust(),
|
||||
}
|
||||
|
||||
# In-memory caches to avoid disk I/O on hot paths like /status
|
||||
SETTINGS_CACHE1: dict = {}
|
||||
SETTINGS_CACHE2: dict = {}
|
||||
@@ -299,6 +305,14 @@ async def _stream_lc3(audio_data: dict[str, str], bigs_template: list) -> None:
|
||||
multicaster1.big_conf = bigs_template
|
||||
await multicaster1.start_streaming()
|
||||
|
||||
def _resolve_qos_preset_name(qos_config) -> str:
|
||||
"""Resolve qos_config to preset name based on retransmission count."""
|
||||
if qos_config is None:
|
||||
return "Fast"
|
||||
rtn = getattr(qos_config, 'number_of_retransmissions', 2)
|
||||
# Fast has 2 retransmissions, Robust has 4
|
||||
return "Robust" if rtn >= 4 else "Fast"
|
||||
|
||||
async def init_radio(transport: str, conf: auracast_config.AuracastConfigGroup, current_mc: multicast_control.Multicaster | None):
|
||||
try:
|
||||
log.info('Initializing multicaster with transport %s and config:\n %s', transport, conf.model_dump_json(indent=2))
|
||||
@@ -373,7 +387,7 @@ async def init_radio(transport: str, conf: auracast_config.AuracastConfigGroup,
|
||||
'auracast_sampling_rate_hz': conf.auracast_sampling_rate_hz,
|
||||
'octets_per_frame': conf.octets_per_frame,
|
||||
'presentation_delay_us': getattr(conf, 'presentation_delay_us', None),
|
||||
'rtn': getattr(getattr(conf, 'qos_config', None), 'number_of_retransmissions', None),
|
||||
'qos_preset': _resolve_qos_preset_name(conf.qos_config),
|
||||
'immediate_rendering': getattr(conf, 'immediate_rendering', False),
|
||||
'assisted_listening_stream': getattr(conf, 'assisted_listening_stream', False),
|
||||
'stream_password': (conf.bigs[0].code if conf.bigs and getattr(conf.bigs[0], 'code', None) else None),
|
||||
@@ -490,7 +504,7 @@ async def _autostart_from_settings():
|
||||
rate = settings.get('auracast_sampling_rate_hz')
|
||||
octets = settings.get('octets_per_frame')
|
||||
pres_delay = settings.get('presentation_delay_us')
|
||||
saved_rtn = settings.get('rtn')
|
||||
saved_qos_preset = settings.get('qos_preset', 'Fast')
|
||||
immediate_rendering = settings.get('immediate_rendering', False)
|
||||
assisted_listening_stream = settings.get('assisted_listening_stream', False)
|
||||
channel_names = settings.get('channel_names') or ["Broadcast0"]
|
||||
@@ -503,13 +517,13 @@ async def _autostart_from_settings():
|
||||
previously_streaming = bool(settings.get('is_streaming'))
|
||||
|
||||
log.info(
|
||||
"[AUTOSTART][PRIMARY] loaded settings: previously_streaming=%s audio_mode=%s rate=%s octets=%s pres_delay=%s rtn=%s immediate_rendering=%s assisted_listening_stream=%s demo_sources=%s",
|
||||
"[AUTOSTART][PRIMARY] loaded settings: previously_streaming=%s audio_mode=%s rate=%s octets=%s pres_delay=%s qos_preset=%s immediate_rendering=%s assisted_listening_stream=%s demo_sources=%s",
|
||||
previously_streaming,
|
||||
audio_mode,
|
||||
rate,
|
||||
octets,
|
||||
pres_delay,
|
||||
saved_rtn,
|
||||
saved_qos_preset,
|
||||
immediate_rendering,
|
||||
assisted_listening_stream,
|
||||
(settings.get('demo_sources') or []),
|
||||
@@ -563,11 +577,7 @@ async def _autostart_from_settings():
|
||||
presentation_delay_us=pres_delay if pres_delay is not None else 40000,
|
||||
bigs=bigs,
|
||||
)
|
||||
conf.qos_config = auracast_config.AuracastQoSConfig(
|
||||
iso_int_multiple_10ms=1,
|
||||
number_of_retransmissions=int(saved_rtn) if saved_rtn is not None else 1,
|
||||
max_transport_latency_ms=(int(saved_rtn) * 10 + 3) if saved_rtn is not None else 13,
|
||||
)
|
||||
conf.qos_config = QOS_PRESET_MAP.get(saved_qos_preset, QOS_PRESET_MAP["Fast"])
|
||||
log.info("[AUTOSTART][PRIMARY] Scheduling demo init_radio in 2s")
|
||||
await asyncio.sleep(2)
|
||||
async with _stream_lock:
|
||||
@@ -631,11 +641,7 @@ async def _autostart_from_settings():
|
||||
presentation_delay_us=pres_delay if pres_delay is not None else 40000,
|
||||
bigs=bigs,
|
||||
)
|
||||
conf.qos_config = auracast_config.AuracastQoSConfig(
|
||||
iso_int_multiple_10ms=1,
|
||||
number_of_retransmissions=int(saved_rtn),
|
||||
max_transport_latency_ms=int(saved_rtn) * 10 + 3,
|
||||
)
|
||||
conf.qos_config = QOS_PRESET_MAP.get(saved_qos_preset, QOS_PRESET_MAP["Fast"])
|
||||
log.info("[AUTOSTART][PRIMARY] Scheduling device init_radio in 2s")
|
||||
await asyncio.sleep(2)
|
||||
async with _stream_lock:
|
||||
@@ -656,7 +662,7 @@ async def _autostart_from_settings():
|
||||
rate = settings.get('auracast_sampling_rate_hz')
|
||||
octets = settings.get('octets_per_frame')
|
||||
pres_delay = settings.get('presentation_delay_us')
|
||||
saved_rtn = settings.get('rtn')
|
||||
saved_qos_preset = settings.get('qos_preset', 'Fast')
|
||||
immediate_rendering = settings.get('immediate_rendering', False)
|
||||
assisted_listening_stream = settings.get('assisted_listening_stream', False)
|
||||
channel_names = settings.get('channel_names') or ["Broadcast0"]
|
||||
@@ -668,13 +674,13 @@ async def _autostart_from_settings():
|
||||
original_ts = settings.get('timestamp')
|
||||
previously_streaming = bool(settings.get('is_streaming'))
|
||||
log.info(
|
||||
"[AUTOSTART][SECONDARY] loaded settings: previously_streaming=%s audio_mode=%s rate=%s octets=%s pres_delay=%s rtn=%s immediate_rendering=%s assisted_listening_stream=%s demo_sources=%s",
|
||||
"[AUTOSTART][SECONDARY] loaded settings: previously_streaming=%s audio_mode=%s rate=%s octets=%s pres_delay=%s qos_preset=%s immediate_rendering=%s assisted_listening_stream=%s demo_sources=%s",
|
||||
previously_streaming,
|
||||
audio_mode,
|
||||
rate,
|
||||
octets,
|
||||
pres_delay,
|
||||
saved_rtn,
|
||||
saved_qos_preset,
|
||||
immediate_rendering,
|
||||
assisted_listening_stream,
|
||||
(settings.get('demo_sources') or []),
|
||||
@@ -718,11 +724,7 @@ async def _autostart_from_settings():
|
||||
presentation_delay_us=pres_delay if pres_delay is not None else 40000,
|
||||
bigs=bigs,
|
||||
)
|
||||
conf.qos_config = auracast_config.AuracastQoSConfig(
|
||||
iso_int_multiple_10ms=1,
|
||||
number_of_retransmissions=int(saved_rtn) if saved_rtn is not None else 1,
|
||||
max_transport_latency_ms=(int(saved_rtn) * 10 + 3) if saved_rtn is not None else 13,
|
||||
)
|
||||
conf.qos_config = QOS_PRESET_MAP.get(saved_qos_preset, QOS_PRESET_MAP["Fast"])
|
||||
log.info("[AUTOSTART][SECONDARY] Scheduling demo init_radio in 2s")
|
||||
await asyncio.sleep(2)
|
||||
async with _stream_lock:
|
||||
@@ -789,11 +791,7 @@ async def _autostart_from_settings():
|
||||
presentation_delay_us=pres_delay if pres_delay is not None else 40000,
|
||||
bigs=bigs,
|
||||
)
|
||||
conf.qos_config = auracast_config.AuracastQoSConfig(
|
||||
iso_int_multiple_10ms=1,
|
||||
number_of_retransmissions=int(saved_rtn),
|
||||
max_transport_latency_ms=int(saved_rtn) * 10 + 3,
|
||||
)
|
||||
conf.qos_config = QOS_PRESET_MAP.get(saved_qos_preset, QOS_PRESET_MAP["Fast"])
|
||||
log.info("[AUTOSTART][SECONDARY] Scheduling device init_radio in 2s")
|
||||
await asyncio.sleep(2)
|
||||
async with _stream_lock:
|
||||
|
||||
@@ -7,7 +7,7 @@ Configuration: 16kHz, 40 octets/frame, stereo (2 BISes), QoS _2 variant
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if __name__ == "__main__":
|
||||
|
||||
config = AuracastGlobalConfig()
|
||||
# _2 variant uses different QoS (RTN=2, higher latency)
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
config.transport = "serial:/dev/ttyAMA3,1000000,rtscts"
|
||||
|
||||
# 16_2_2: 16kHz, 40 octets/frame
|
||||
|
||||
@@ -7,7 +7,7 @@ Configuration: 24kHz, 60 octets/frame, stereo (2 BISes), QoS _2 variant
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if __name__ == "__main__":
|
||||
|
||||
config = AuracastGlobalConfig()
|
||||
# _2 variant uses different QoS (RTN=2, higher latency)
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
config.transport = "serial:/dev/ttyAMA3,1000000,rtscts"
|
||||
|
||||
# 24_2_2: 24kHz, 60 octets/frame
|
||||
|
||||
@@ -7,7 +7,7 @@ Configuration: 48kHz, 100 octets/frame, stereo (2 BISes), QoS _2 variant
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if __name__ == "__main__":
|
||||
|
||||
config = AuracastGlobalConfig()
|
||||
# _2 variant uses different QoS (RTN=2, higher latency)
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
config.transport = "serial:/dev/ttyAMA3,1000000,rtscts"
|
||||
|
||||
# 48_2_2: 48kHz, 100 octets/frame
|
||||
|
||||
@@ -7,7 +7,7 @@ Configuration: 48kHz, 120 octets/frame, stereo (2 BISes), QoS _2 variant
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if __name__ == "__main__":
|
||||
|
||||
config = AuracastGlobalConfig()
|
||||
# _2 variant uses different QoS (RTN=2, higher latency)
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
config.transport = "serial:/dev/ttyAMA3,1000000,rtscts"
|
||||
|
||||
# 48_4_2: 48kHz, 120 octets/frame
|
||||
|
||||
@@ -8,7 +8,7 @@ Configuration: 48kHz, 155 octets/frame, stereo (2 BISes), QoS _2 variant
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ if __name__ == "__main__":
|
||||
|
||||
config = AuracastGlobalConfig()
|
||||
# _2 variant uses different QoS (RTN=2, higher latency)
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
config.transport = "serial:/dev/ttyAMA3,1000000,rtscts"
|
||||
|
||||
# 48_6_2: 48kHz, 155 octets/frame
|
||||
|
||||
@@ -5,7 +5,7 @@ For BV36-C and BV 37-C to success just restart the stream while the testcase is
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ if __name__ == "__main__":
|
||||
config = AuracastGlobalConfig()
|
||||
|
||||
# Use same QoS profile as multicast main
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
|
||||
# Transport similar to multicast main; adjust if needed for your setup
|
||||
# config.transport = "auto" # let multicast auto-detect
|
||||
|
||||
@@ -10,7 +10,7 @@ Restart the stream when asked to terminate.
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ if __name__ == "__main__":
|
||||
config = AuracastGlobalConfig()
|
||||
|
||||
# Use same QoS profile as multicast main
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
|
||||
# Transport similar to multicast main; adjust if needed for your setup
|
||||
# config.transport = "auto" # let multicast auto-detect
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if __name__ == "__main__":
|
||||
config = AuracastGlobalConfig()
|
||||
|
||||
# Use same QoS profile as multicast main
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
|
||||
# Transport similar to multicast main; adjust if needed for your setup
|
||||
# config.transport = "auto" # let multicast auto-detect
|
||||
|
||||
@@ -9,7 +9,7 @@ PBP Features: 0x02 (Standard Quality)
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ if __name__ == "__main__":
|
||||
|
||||
config = AuracastGlobalConfig()
|
||||
# 16_2_2 uses different QoS (RTN=2, higher latency)
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
config.transport = "serial:/dev/ttyAMA3,1000000,rtscts"
|
||||
|
||||
# 16_2_2: 16kHz
|
||||
|
||||
@@ -9,7 +9,7 @@ PBP Features: 0x02 (Standard Quality)
|
||||
import logging
|
||||
import os
|
||||
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosDefault
|
||||
from auracast.auracast_config import AuracastGlobalConfig, AuracastBigConfig, AuracastQosRobust
|
||||
from auracast.multicast import broadcast, run_async
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ if __name__ == "__main__":
|
||||
|
||||
config = AuracastGlobalConfig()
|
||||
# 24_2_2 uses different QoS (RTN=2, higher latency)
|
||||
config.qos_config = AuracastQosDefault()
|
||||
config.qos_config = AuracastQosRobust()
|
||||
config.transport = "serial:/dev/ttyAMA3,1000000,rtscts"
|
||||
|
||||
# 24_2_2: 24kHz
|
||||
|
||||
Reference in New Issue
Block a user