Search Results for

    Show / Hide Table of Contents

    Interface IStimParamsCore

    Core + parameters surface layered over IStimulationCore. Provides normalized-drive stimulation, per-channel parameter access, and JSON persistence for stimulation parameters. BASIC is optional and can be exposed via TryGetBasic(out IBasicStimulation).

    Inherited Members
    IStimulationCore.Initialize()
    IStimulationCore.Tick()
    IStimulationCore.Shutdown()
    IStimulationCore.Started()
    IStimulationCore.Ready()
    IStimulationCore.StimulateAnalog(int, int, float, int)
    IStimulationCore.ZeroOutStim(WssTarget)
    IStimulationCore.StartStim(WssTarget)
    IStimulationCore.StopStim(WssTarget)
    IStimulationCore.LoadConfigFile()
    IStimulationCore.GetCoreConfigController()
    IStimulationCore.IsChannelInRange(int)
    Namespace: Wss.CalibrationModule
    Assembly: WSS_Core_Interface.dll
    Syntax
    public interface IStimParamsCore : IStimulationCore

    Methods

    AddOrUpdateStimParam(string, float)

    Adds or updates a parameter by dotted key. Examples: stim.ch.1.defaultPA, stim.ch.2.minPW, stim.ch.3.maxPW, stim.ch.4.IPI.

    Declaration
    void AddOrUpdateStimParam(string key, float value)
    Parameters
    Type Name Description
    string key

    Dotted parameter key.

    float value

    Value to set.

    GetAllStimParams()

    Returns a copy of all current stimulation parameters as a dotted-key map.

    Declaration
    Dictionary<string, float> GetAllStimParams()
    Returns
    Type Description
    Dictionary<string, float>

    Dictionary mapping dotted keys to parameter values.

    GetChannelAmp(int)

    Gets the per-channel default amplitude (PA) in mA.

    Declaration
    float GetChannelAmp(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    float

    Default amplitude in milliamps.

    GetChannelAmpMode(int)

    Gets the current amplitude-control mode for a channel.

    Declaration
    string GetChannelAmpMode(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    string

    "PW" or "PA".

    GetChannelDefault(int)

    Gets the non-controlled axis default (PA when PW mode, PW when PA mode).

    Declaration
    float GetChannelDefault(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    float

    Default value expressed in the non-controlled axis units (µs for PA mode).

    GetChannelDefaultPW(int)

    Gets the per-channel default pulse width in µs.

    Declaration
    int GetChannelDefaultPW(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    int

    Default pulse width in microseconds.

    GetChannelIPI(int)

    Gets per-channel IPI in ms.

    Declaration
    int GetChannelIPI(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    int

    Inter-pulse interval in milliseconds.

    GetChannelMax(int)

    Gets the active-control maximum (µs when PW mode, mA when PA mode).

    Declaration
    float GetChannelMax(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    float

    Maximum value in the active axis units (µs for PW mode).

    GetChannelMin(int)

    Gets the active-control minimum (µs when PW mode, mA when PA mode).

    Declaration
    float GetChannelMin(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    float

    Minimum value in the active axis units (µs for PW mode).

    GetChannelPAMax(int)

    Gets per-channel maximum PA in mA.

    Declaration
    float GetChannelPAMax(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    float

    Maximum amplitude in milliamps.

    GetChannelPAMin(int)

    Gets per-channel minimum PA in mA.

    Declaration
    float GetChannelPAMin(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    float

    Minimum amplitude in milliamps.

    GetChannelPWMax(int)

    Gets per-channel maximum pulse width in µs.

    Declaration
    int GetChannelPWMax(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    int

    Maximum pulse width in microseconds.

    GetChannelPWMin(int)

    Gets per-channel minimum pulse width in µs.

    Declaration
    int GetChannelPWMin(int ch)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    Returns
    Type Description
    int

    Minimum pulse width in microseconds.

    GetStimIntensity(int)

    Returns the most recently computed stimulation intensity for the channel. For PW-driven systems, this is the last pulse width (µs) sent by StimulateNormalized(int, float).

    Declaration
    float GetStimIntensity(int channel)
    Parameters
    Type Name Description
    int channel

    1-based logical channel.

    Returns
    Type Description
    float

    Most recent intensity value (µs or mA depending on mode).

    GetStimParam(string)

    Reads a parameter by dotted key. Throws if the key is missing.

    Declaration
    float GetStimParam(string key)
    Parameters
    Type Name Description
    string key

    Dotted parameter key.

    Returns
    Type Description
    float

    Parameter value as float.

    GetStimParamsConfigController()

    Returns the parameters/configuration controller for stimulation params.

    Declaration
    StimParamsConfigController GetStimParamsConfigController()
    Returns
    Type Description
    StimParamsConfigController

    The active StimParamsConfigController.

    LoadParamsJson()

    Loads the stimulation-parameters JSON from the default location.

    Declaration
    void LoadParamsJson()

    LoadParamsJson(string)

    Loads the stimulation-parameters JSON from a specific file path or directory.

    Declaration
    void LoadParamsJson(string path)
    Parameters
    Type Name Description
    string path

    File path or directory.

    SaveParamsJson()

    Saves the current stimulation-parameters JSON to disk.

    Declaration
    void SaveParamsJson()

    SetAllChannelsAmpMode(string)

    Sets the same amplitude-control mode for all channels.

    Declaration
    void SetAllChannelsAmpMode(string mode)
    Parameters
    Type Name Description
    string mode

    Target amplitude mode string.

    SetChannelAmp(int, float)

    Sets the per-channel default amplitude (PA) in mA.

    Declaration
    void SetChannelAmp(int ch, float mA)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    float mA

    Amplitude in milliamps.

    SetChannelAmpMode(int, string)

    Sets the amplitude-control mode ("PW"/"PA") for a channel.

    Declaration
    void SetChannelAmpMode(int ch, string mode)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    string mode

    Target amplitude mode string.

    SetChannelDefault(int, float)

    Sets the non-controlled axis default (PA when PW mode, PW when PA mode).

    Declaration
    void SetChannelDefault(int ch, float value)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    float value

    Default value expressed in the non-controlled axis units (µs for PA mode).

    SetChannelDefaultPW(int, int)

    Sets the per-channel default pulse width in µs.

    Declaration
    void SetChannelDefaultPW(int ch, int us)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    int us

    Default pulse width in microseconds.

    SetChannelIPI(int, int)

    Sets per-channel IPI in ms.

    Declaration
    void SetChannelIPI(int ch, int ms)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    int ms

    Inter-pulse interval in milliseconds.

    SetChannelMax(int, float)

    Sets the active-control maximum for a channel (µs when PW mode, mA when PA mode).

    Declaration
    void SetChannelMax(int ch, float value)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    float value

    Maximum value in the active axis units (µs for PW mode).

    SetChannelMin(int, float)

    Sets the active-control minimum for a channel (µs when PW mode, mA when PA mode).

    Declaration
    void SetChannelMin(int ch, float value)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    float value

    Minimum value in the active axis units (µs for PW mode).

    SetChannelPAMax(int, float)

    Sets per-channel maximum PA in mA.

    Declaration
    void SetChannelPAMax(int ch, float mA)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    float mA

    Maximum amplitude in milliamps.

    SetChannelPAMin(int, float)

    Sets per-channel minimum PA in mA.

    Declaration
    void SetChannelPAMin(int ch, float mA)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    float mA

    Minimum amplitude in milliamps.

    SetChannelPWMax(int, int)

    Sets per-channel maximum pulse width in µs.

    Declaration
    void SetChannelPWMax(int ch, int us)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    int us

    Maximum pulse width in microseconds.

    SetChannelPWMin(int, int)

    Sets per-channel minimum pulse width in µs.

    Declaration
    void SetChannelPWMin(int ch, int us)
    Parameters
    Type Name Description
    int ch

    1-based logical channel.

    int us

    Minimum pulse width in microseconds.

    StimulateNormalized(int, float)

    Computes a pulse width from a normalized value in [0,1] using per-channel parameters (minPW, maxPW, amp, IPI) and forwards the result to the core. Implementations clamp the input to [0,1] and cache the last PW sent.

    Declaration
    void StimulateNormalized(int channel, float normalizedValue)
    Parameters
    Type Name Description
    int channel

    1-based logical channel.

    float normalizedValue

    Normalized drive in [0,1].

    TryGetBasic(out IBasicStimulation)

    Exposes the optional BASIC capability if available from the wrapped core. Returns true and sets basic if supported.

    Declaration
    bool TryGetBasic(out IBasicStimulation basic)
    Parameters
    Type Name Description
    IBasicStimulation basic

    Out parameter for the BASIC interface.

    Returns
    Type Description
    bool

    true when BASIC is available, otherwise false.

    TryGetStimParam(string, out float)

    Tries to read a parameter by dotted key.

    Declaration
    bool TryGetStimParam(string key, out float value)
    Parameters
    Type Name Description
    string key

    Dotted parameter key.

    float value

    Out value if the key exists.

    Returns
    Type Description
    bool

    true if found, otherwise false.

    Extension Methods

    StimParamsBasicExtensions.LoadBoard(IStimParamsCore, WssTarget)
    StimParamsBasicExtensions.LoadWaveform(IStimParamsCore, string, int)
    StimParamsBasicExtensions.RequestConfigs(IStimParamsCore, int, int, WssTarget)
    StimParamsBasicExtensions.SaveBoard(IStimParamsCore, WssTarget)
    StimParamsBasicExtensions.TryUpdateWaveform(IStimParamsCore, WaveformBuilder, int, WssTarget)
    StimParamsBasicExtensions.UpdateEventShape(IStimParamsCore, int, int, int, WssTarget)
    StimParamsBasicExtensions.UpdateWaveform(IStimParamsCore, int[], int, WssTarget)
    StimParamsBasicExtensions.UpdateWaveform(IStimParamsCore, WaveformBuilder, int, WssTarget)
    StimParamsBasicExtensions.WaveformSetup(IStimParamsCore, WaveformBuilder, int, WssTarget)
    In this article
    Back to top Generated by DocFX