Revised error codes and functional PlaybackEngine
All internal and public errors have been revised (GPT 5.6 Sol) to return more detail without horrendously long error classes, this has reduced the number of error types but each now carries a reason and a code for differentiation if needed PlaybackEngine has been implemented and is functional, core mode changes what signal descriptors are returned to avoid duplicates, the playback engine currently discards the derived signals that would be recorded in the DLPak and derived signals are reprocessed live Future will require the behavior listed above to be selectable so one of two options are possible: A - Derived signals are reprocessed live by the relevant derive units (current behavior B - Derived signals are played back directly from the PlaybackEngine, this requires turning off the routing to the live derive units to avoid duplicate values This will also require the option to perform offline processing with derive units to be able to create derived signals after the fact, this will likely incur a new 'offline' mode in the core to gate things correctly, this will likely be useful for heavier processing that cannot be done live, filters that require a lookahead, or more precise derived signals using interpolated signals for higher acurracy which also brings the ability to offline process on a fixed timebase instead of following either input signal to the derived signal
This commit is contained in:
18 files changed
+1160
-178
No files matched your search
+34
-34
@@ -2,53 +2,53 @@
|
||||
# Copyright (C) 2026 Association Exergie <association.exergie@gmail.com>
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Core error declarations
|
||||
class CoreError(Exception):
|
||||
"""DynaLab Core error."""
|
||||
"""Public exceptions raised by DynaLab Core.
|
||||
|
||||
Catch a subsystem exception when recovery depends on where an operation failed,
|
||||
or catch :class:`DynaLabError` to handle every expected library error. The
|
||||
``code`` attribute is stable and intended for programmatic decisions; the
|
||||
exception message is written for people.
|
||||
"""
|
||||
|
||||
|
||||
class CoreModeIncorrectError(CoreError):
|
||||
"""DynaLab Core mode error."""
|
||||
class DynaLabError(Exception):
|
||||
"""Base class for expected errors raised by DynaLab Core."""
|
||||
|
||||
def __init__(self, message: str, *, code: str) -> None:
|
||||
self.code = code
|
||||
super().__init__(message)
|
||||
|
||||
|
||||
class CoreModeSwitchImpossibleError(CoreError):
|
||||
"""DynaLab Core mode error."""
|
||||
class CoreError(DynaLabError):
|
||||
"""The core cannot perform the requested lifecycle or mode operation."""
|
||||
|
||||
|
||||
class CoreStateMismatchError(CoreError):
|
||||
"""DynaLab Core state error."""
|
||||
class DLPakError(DynaLabError):
|
||||
"""A DLPak archive cannot be prepared, read, or written."""
|
||||
|
||||
|
||||
# DLPak error declarations
|
||||
class DLPakError(Exception):
|
||||
"""DLPak error."""
|
||||
class DeriveError(DynaLabError):
|
||||
"""A derive unit cannot be created or used as requested."""
|
||||
|
||||
|
||||
class DLPakNoDataError(DLPakError):
|
||||
"""DLPak no data error."""
|
||||
class PlaybackError(DynaLabError):
|
||||
"""The playback engine cannot perform the requested operation."""
|
||||
|
||||
|
||||
# DeriveUnit error declarations
|
||||
class DeriveUnitError(Exception):
|
||||
"""DeriveUnit error."""
|
||||
class ConnectorError(DynaLabError):
|
||||
"""A connector endpoint or registry operation failed."""
|
||||
|
||||
|
||||
class DeriveUnitInvalidSignatureError(DeriveUnitError):
|
||||
"""DeriveUnit invalid processing function signature error."""
|
||||
class JsonServerError(DynaLabError):
|
||||
"""The JSON protocol server cannot perform the requested operation."""
|
||||
|
||||
|
||||
class DeriveUnitArgsMismatchError(DeriveUnitError):
|
||||
"""DeriveUnit incorrect arguments provided error."""
|
||||
|
||||
|
||||
class DeriveUnitMultipleFunctionsFoundError(DeriveUnitError):
|
||||
"""DynaLab Core multiple functions found while trying to create derive unit."""
|
||||
|
||||
|
||||
# DeriveRegistry error declarations
|
||||
class DeriveRegistryError(Exception):
|
||||
"""Generic ConnectorRegistry Error"""
|
||||
|
||||
|
||||
class DeriveRegistryAlreadyRegisteredError(DeriveRegistryError):
|
||||
"""ConnectorRegistry endpoint already registered"""
|
||||
__all__ = [
|
||||
"ConnectorError",
|
||||
"CoreError",
|
||||
"DLPakError",
|
||||
"DeriveError",
|
||||
"DynaLabError",
|
||||
"JsonServerError",
|
||||
"PlaybackError",
|
||||
]
|
||||
Reference in new issue
Block a user