Search Results for

    Show / Hide Table of Contents

    Interface IModelParamsCore

    Model-driven stimulation surface layered over params + core. Extends the params API and adds controller-mode stimulation (P/PD).

    Inherited Members
    IStimParamsCore.StimulateNormalized(int, float)
    IStimParamsCore.GetStimIntensity(int)
    IStimParamsCore.SaveParamsJson()
    IStimParamsCore.LoadParamsJson()
    IStimParamsCore.LoadParamsJson(string)
    IStimParamsCore.AddOrUpdateStimParam(string, float)
    IStimParamsCore.GetStimParam(string)
    IStimParamsCore.TryGetStimParam(string, out float)
    IStimParamsCore.GetAllStimParams()
    IStimParamsCore.GetStimParamsConfigController()
    IStimParamsCore.SetChannelAmp(int, float)
    IStimParamsCore.SetChannelPAMin(int, float)
    IStimParamsCore.SetChannelPAMax(int, float)
    IStimParamsCore.SetChannelPWMin(int, int)
    IStimParamsCore.SetChannelPWMax(int, int)
    IStimParamsCore.SetChannelDefaultPW(int, int)
    IStimParamsCore.SetChannelIPI(int, int)
    IStimParamsCore.SetChannelAmpMode(int, string)
    IStimParamsCore.SetAllChannelsAmpMode(string)
    IStimParamsCore.SetChannelMin(int, float)
    IStimParamsCore.SetChannelMax(int, float)
    IStimParamsCore.SetChannelDefault(int, float)
    IStimParamsCore.GetChannelAmp(int)
    IStimParamsCore.GetChannelPAMin(int)
    IStimParamsCore.GetChannelPAMax(int)
    IStimParamsCore.GetChannelPWMin(int)
    IStimParamsCore.GetChannelPWMax(int)
    IStimParamsCore.GetChannelDefaultPW(int)
    IStimParamsCore.GetChannelIPI(int)
    IStimParamsCore.GetChannelAmpMode(int)
    IStimParamsCore.GetChannelMin(int)
    IStimParamsCore.GetChannelMax(int)
    IStimParamsCore.GetChannelDefault(int)
    IStimParamsCore.TryGetBasic(out IBasicStimulation)
    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.ModelModule
    Assembly: WSS_Core_Interface.dll
    Syntax
    public interface IModelParamsCore : IStimParamsCore, IStimulationCore

    Methods

    GetModelConfigController()

    Returns the model-layer configuration controller used to read and write model constants (e.g., proportional/derivative gains, offsets, and mode selection).

    Declaration
    ModelConfigController GetModelConfigController()
    Returns
    Type Description
    ModelConfigController

    The active ModelConfigController instance.

    Remarks

    Use this to query constants like PModeProportional or to persist model settings.

    Examples
    var mc = model.GetModelConfigController();
    float kp = mc.GetConstant("PModeProportional");
    mc.SetConstant("PDModeDerivative", 0.15f);
    mc.SaveJson();

    IsModeValid()

    Validates the current controller mode from model config (e.g., P or PD).

    Declaration
    bool IsModeValid()
    Returns
    Type Description
    bool

    true if the mode is supported; otherwise false.

    Examples
    if (!model.IsModeValid()) { /* fallback or warn */ }

    StimWithMode(int, float)

    Computes a pulse width from magnitude using the active controller mode and stimulates the resolved channel. Updates cached per-channel PW and amp internally.

    Declaration
    void StimWithMode(int ch, float magnitude)
    Parameters
    Type Name Description
    int ch

    1-based channel index.

    float magnitude

    Normalized input typically in [0..1]. Values are clamped.

    Examples
    model.StimWithMode("index", 0.42f);     // P/PD mapping → PW → StimulateAnalog
    model.StimWithMode("ch3",   0.75f);

    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