IscPlugin

The IscPlugin class provides access to an IPSA plugin, to set and get data values and assign the plugin to a component. To use the functions in this section an IscPlugin plugin object must be created from the CreatePlugin function of the IscNetwork class. One such object should be created each time a plugin is to be assigned to a network component. The sequence of operations is as follows:

  1. Create an IscPlugin from the CreatePlugin function of IscNetwork

    1. The plugin name should be obtained from the plugin documentation

  2. Set the ControlledUID field value to the UID of the component that the plugin is to be assigned to

  3. Set the Plugin field value of the component itself to the UID of the plugin created in step 1

  4. The plugin parameters can now be set using the normal SetIntParameterValue function calls etc

  1. Note that the Set.../Get... functions are used only to get and set IscPlugin field values such as Name and Type

Refer to the documentation provided with each plugin to determine the usage and parameter values available.

Field Values

IscPlugin Field Values

Type

Field Name

Description

Integer

ControlledUID

Gets the unique ID for controlled plugin.

String

Name

Gets the plugin name.

Integer

Type

Returns the type of the plugin, defined as follows:

  • 1 = Synchronous Machine AVR

  • 2 = Synchronous Machine Governor

  • 3 = DC Machine AVR

  • 4 = DC Machine Governor

  • 5 = Induction Machine D Axis AVR

  • 6 = Induction Machine Q Axis AVR

  • 7 = Induction Machine Governor

  • 8 = Synchronous Machine

  • 9 = DC Machine

  • 10 = AC/DC Converter

  • 11 = AC Converter Controller

  • 12 = DC Converter Controller

  • 13 = DC Non – Linear Devive

  • 14 = Universal Machine Active Power Controller

  • 15 = Universal Machine Reactive Power Controller

  • 16 = Induction Machine

  • 17 = Universal Machine

  • 18 = MSC Controller

  • 19 = SVC Controller

  • 20 = Transformer AVR

  • 21 = Network Controller

  • 30 = Line Dynamic Rating

  • 31 = Transformer Dynamic Rating

  • 32 = Transformer Reverse Rating

  • 50 = Battery Dynamic Model

String

Model

Returns the model name of the plugin.

IscPlugin Class

class ipsa.IscPlugin

Provides access to an IPSA plugin.

SetName(strName: str) bool

Sets the name as a string.

Parameters:

strName (str) – The selected string name.

Returns:

True if successful.

Return type:

bool

GetIValue(nFieldIndex: int) int

Returns an integer value for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The integer value.

Return type:

int

GetDValue(nFieldIndex: int) float

Returns a double value for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The double value.

Return type:

float

GetSValue(nFieldIndex: int) str

Returns a string value for the enumerated field.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The string value.

Return type:

str

SetIValue(nFieldIndex: int, nValue: int) bool

Sets the value for the enumerated field from an integer.

Parameters:
  • nFieldIndex (int) – The field index.

  • nValue (int) – The given integer value.

Returns:

True if successful.

Return type:

bool

SetDValue(nFieldIndex: int, dValue: float) bool

Sets the value for the enumerated field from a double.

Parameters:
  • nFieldIndex (int) – The field index.

  • dValue (float) – The given double value.

Returns:

True if successful.

Return type:

bool

SetSValue(nFieldIndex: int, strValue: int) bool

Sets the value for the enumerated field from a string.

Parameters:
  • nFieldIndex (int) – The field index.

  • strValue (str) – The given string value.

Returns:

True if successful.

Return type:

bool

SetIntParameter(nPluginIndex: int, nValue: int) bool

Sets the index of the specific plugin parameter for the field from an integer value. The parameters are specific for the plugin object.

Parameters:
  • nPluginIndex (int) – The index to the specific plugin parameter.

  • nValue (int) – The given integer value.

Returns:

True if successful.

Return type:

bool

SetDoubleParameter(nPluginIndex: int, dValue: float) bool

Sets the index of the specific plugin parameter for the field from a double value. The parameters are specific for the plugin object.

Parameters:
  • nPluginIndex (int) – The index to the specific plugin parameter.

  • dValue (float) – The given double value.

Returns:

True if successful.

Return type:

bool

SetBoolParameter(nPluginIndex: int, strValue: int) bool

Sets the index of the specific plugin parameter for the field from a boolean value. The parameters are specific for the plugin object.

Parameters:
  • nPluginIndex (int) – The index to the specific plugin parameter.

  • strValue (str) – The given string value.

Returns:

True if successful.

Return type:

bool

GetIntParameter(nPluginIndex: int) int

Returns an integer parameter for the enumerated field defined by the specific plugin parameter. The parameters are specific for the plugin object.

Parameters:

nPluginIndex (int) – The index to the specific plugin parameter.

Returns:

The integer value.

Return type:

int

GetDoubleParameter(nPluginIndex: int) float

Returns a double parameter for the enumerated field defined by the specific plugin parameter. The parameters are specific for the plugin object.

Parameters:

nPluginIndex (int) – The index to the specific plugin parameter.

Returns:

The double value.

Return type:

float

GetBoolParameter(nPluginIndex: int) bool

Returns a boolean parameter for the enumerated field defined by the specific plugin parameter. The parameters are specific for the plugin object.

Parameters:

nPluginIndex (int) – The index to the specific plugin parameter.

Returns:

The string value.

Return type:

bool

GetIntOutput(nFieldIndex: int) int

Returns the integer output of the plugin itself for the field. The parameters are specific for the plugin object.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The integer value.

Return type:

int

GetDoubleOutput(nFieldIndex: int) float

Returns the double output of the plugin itself for the field. The parameters are specific for the plugin object.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The double value.

Return type:

float

GetBoolOutput(nFieldIndex: int) bool

Returns the boolean output of the plugin itself for the field. The parameters are specific for the plugin object.

Parameters:

nFieldIndex (int) – The field index.

Returns:

The string value.

Return type:

bool