Search Results for

    Show / Hide Table of Contents

    Interface IStimulationCore

    Stimulation core lifecycle and control surface. Implementations manage connection, setup, and a background streaming loop. Public mutators should enqueue edits and return immediately.

    Namespace: Wss.CoreModule
    Assembly: WSS_Core_Interface.dll
    Syntax
    public interface IStimulationCore

    Methods

    GetCoreConfigController()

    Gets the JSON-backed stimulation configuration controller currently used by this core.

    Declaration
    CoreConfigController GetCoreConfigController()
    Returns
    Type Description
    CoreConfigController

    The active CoreConfigController instance that provides read/write access to stimulation parameters and constants loaded from the configuration file.

    Remarks

    Returned reference is live, not a copy and thread safe.

    Initialize()

    Initializes the core: loads JSON config, prepares buffers, and begins connecting to the transport. Non-blocking; call Tick() to advance state.

    Declaration
    void Initialize()

    IsChannelInRange(int)

    Returns true if ch is within the valid channel range.

    Declaration
    bool IsChannelInRange(int ch)
    Parameters
    Type Name Description
    int ch

    1-based channel to check.

    Returns
    Type Description
    bool

    LoadConfigFile()

    Reloads the stimulation JSON configuration from disk into memory.

    Declaration
    void LoadConfigFile()

    Ready()

    True when the core is ready to accept start stimulation.

    Declaration
    bool Ready()
    Returns
    Type Description
    bool

    Shutdown()

    Stops streaming, attempts to zero outputs, disconnects transport, and releases resources. Safe to call multiple times.

    Declaration
    void Shutdown()

    StartStim(WssTarget)

    Starts stimulation on the target and launches streaming when ready.

    Declaration
    void StartStim(WssTarget wssTarget)
    Parameters
    Type Name Description
    WssTarget wssTarget

    Target device or broadcast.

    Started()

    True when device transport is started or streaming.

    Declaration
    bool Started()
    Returns
    Type Description
    bool

    StimulateAnalog(int, int, float, int)

    Caches per-channel amplitude, pulse width, and IPI. No I/O here; the streaming loop pushes cached values to the device.

    Declaration
    void StimulateAnalog(int channel, int PW, float amp, int IPI)
    Parameters
    Type Name Description
    int channel

    1-based logical channel.

    int PW

    Pulse width (µs).

    float amp

    Amplitude (mA domain; mapped to device scale during streaming).

    int IPI

    Inter-pulse interval (ms).

    StopStim(WssTarget)

    Stops stimulation on the target and, if streaming, stops the background loop.

    Declaration
    void StopStim(WssTarget wssTarget)
    Parameters
    Type Name Description
    WssTarget wssTarget

    Target device or broadcast.

    Tick()

    Advances the internal state machine (e.g., Connecting → SettingUp → Ready → Streaming). Call regularly from the main loop.

    Declaration
    void Tick()

    ZeroOutStim(WssTarget)

    Sends a zero-out command. Does not alter cached values.

    Declaration
    void ZeroOutStim(WssTarget wssTarget)
    Parameters
    Type Name Description
    WssTarget wssTarget

    Target device or broadcast.

    In this article
    Back to top Generated by DocFX