How symphony-das/symphony-core works
Project Type and Purpose
• This is an open‐source, modular data‐acquisition framework (“Symphony Core”) written in C#/.NET with C++ interop layers.
• Its goal is to provide a unified API for recording, streaming, and persisting electrophysiology data from multiple hardware sources (Heka ITCMM, NI DAQ, simulated DAQ) and external devices (Axopatch, MultiClamp).
High‐level Architectural Layers
• Layer 1: Client Applications & Tools
• MessageTrapper (diagnostics)
• HekaSandbox (demo/test harness)
• Installer (WiX Setup project)
• Layer 2: Core Framework (Symphony.Core)
• Defines abstractions: IHardwareController, DAQStream, Epoch, Measurement, Pipeline, IEpochPersistor
• Orchestrates device controllers, data streams, event scheduling
• Layer 3: Hardware Controller Plugins
• HekaDAQController
• NIDAQController
• SimulationDAQController
• Each implements IHardwareController and provides Input/Output streams
• Layer 4: External Device Modules (Symphony.ExternalDevices)
• Axopatch200B, MultiClampCommander, etc.
• Plug into core’s external‐device API to control secondary devices synchronously with DAQ
• Layer 5: Persistence
• HDF5 wrapper (HDF5DotNet + custom H5EpochPersistor) for hierarchical data storage
• XML persistence modules (legacy doc)
• Layer 6: Native Interop & Libraries
• HekaNativeInterop (P/Invoke bindings to ITCMM headers)
• HekaIOBridge (C++ DLL for cross‐language bridging)
• External third-party binaries under /externals (HDF5, ITCMM, GoogleTest)
Component Relationships & Data Flows
• Client apps invoke Core APIs to
• SELECT a hardware controller plugin → calls into Native Interop → hardware driver
• REQUEST data stream → Core dispatches via DAQController → returns DAQStream of IOData
• CONTROL external devices concurrently via ExternalDevices modules
• Core → HardwareController → NativeInterop → Physical Device
• Core → Persistence → HDF5 library → Disk
• Core → ExternalDevices → Device SDKs
• Client Apps → Core
Architectural Patterns & Design Principles
• Plugin pattern: Hardware controllers and external devices are interchangeable modules implementing interfaces.
• Layered architecture: Clear separation between core logic, hardware abstraction, persistence, and native interop.
• Dependency inversion: Core depends on interfaces (IHardwareController, IEpochPersistor) not concrete implementations.
• Adapter/Bridge: Native interop projects adapt unmanaged APIs (ITCMM, NIDAQ) to .NET types.
Details to Capture
• Interfaces and key classes in Core: IHardwareController, DAQStream, Epoch, IEpochPersistor
• How controller plugins implement these interfaces and rely on native layers.
• The use of HDF5DotNet underpinnings in Persistence.
• ExternalDevices module hooking into Core’s device‐control API.
• Test coverage: IntegrationTests sitting atop controllers/core.