Interface IModelParamsCore
Model-driven stimulation surface layered over params + core. Extends the params API and adds controller-mode stimulation (P/PD).
Inherited Members
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 |
|
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);