Model section items#

ModelElement subclasses#

Each model section item is represented by one of the following classes, which all inherit from ModelElement, thus provide the get_generated_element() method to access the associated generated C element. (see Code section items)

Type Definitions

Operators and Instances

Variables and Parameters

Constants, Sensors, and Probes

Model groups#

Some model items can be returned as groups (ModelGroup) of said items. These items are:

These groups possess a common identifier: respectively name and path for variables and probes. Both possess an attribute projections which is a list of all their respective items, represented as projections. A projection is a list of strings or integers which represent the location of the item in the group hierarchy. Integers are used for positional (location in current level) and strings are used for labels (element name or sub-group name).

Groups cannot use the method get_generated_element() (it will return None), they must use get_generated_group_elements() instead. However, each of a group’s projections can use the method get_generated_element() normally.

Group

Flows

Probes

Found in attributes

inputs and outputs

probes

From elements

ModelOperator

ModelOperator ModelMonoOperator ModelLoopInstance ModelOperatorInstance

Instead of

ModelVariable

ModelProbe

Group type

ModelVariablesGroup

ModelProbesGroup

Group attributes

name (str)

path (str) and kind (ProbeKind)

Group projections

ModelGroupProjection

ModelGroupProjection

To get flattened flows and probes instead of groups, ModelOperator.get_flat_inputs(), ModelOperator.get_flat_outputs() and HasProbesMixin.get_flat_probes() can be used.

API Documentation#

Model module for Swan Code Generator mapping data.

This module implements classes representing elements from the Swan language model. Each model item has a unique integer ID and can reference other model items by their IDs.

class ansys.scadeone.core.svc.cgmapping.model.HasComputedFlagMixin#

Bases: object

Mixin providing computed flag access methods for elements that carry a computed_flag.

get_computed_flag() → CStructField | None#

Get the computed flag structure for this element. The computed flag is set to true when the value of the element is updated during the cycle.

Returns:
CStructField | None

The computed flag structure (CStructField) if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

class ansys.scadeone.core.svc.cgmapping.model.HasProbesMixin#

Bases: object

Mixin providing probe access methods for elements that carry a probes list.

get_flat_probes() → list[ModelProbe]#

Get the probes defined in this element, flattening any groups.

Returns:
list[ModelProbe]

List of all probes, including those expanded from groups.

get_probes() → list[ModelProbe | ModelProbesGroup]#

Get the probes defined in this element, including groups as is.

Returns:
list[ModelProbe | ModelProbesGroup]

List of probes.

class ansys.scadeone.core.svc.cgmapping.model.LoopKind(*values)#

Bases: Enum

Kind of loop instance.

class ansys.scadeone.core.svc.cgmapping.model.ModelArray(id: int, base_type: int, size: int)#

Bases: ModelElement

Model array type definition.

Parameters:
idint

Unique identifier for this array type.

base_typeint

Reference ID to the base type of the array.

sizeint

Size of the array.

get_shape() → list[int]#

Get the successive dimensions of this array type.

Returns:
list[int]

Array shape as a list of successive dimensions.

Raises:
ValueError

If no cgmapping is set on this instance.

class ansys.scadeone.core.svc.cgmapping.model.ModelConstant(id: int, path: str, type: int, external: bool | None = None)#

Bases: ModelElement

Model constant.

Parameters:
idint

Unique identifier for this constant.

pathstr

Path to the constant.

typeint

Reference ID to the type of the constant.

externalbool | None

Whether this constant is external.

get_elaborated_function() → CFunction | None#

Get the generated function for this constant’s elaboration.

Returns:
CFunction | None

The function if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

is_elaborated() → bool#

Whether this constant is elaborated. Returns True if the constant has an associated elaborated function, False otherwise.

class ansys.scadeone.core.svc.cgmapping.model.ModelElement#

Bases: object

Base class for all Swan model elements.

This class provides common functionality for all model elements, including access to their generated code elements through the mapping system.

All model elements that inherit from this class must have an ‘id’ attribute.

get_c_type() → CodeElement | None#

Get the generated C type element associated with this model element.

This method first retrieves the generated code elements for this model element, then looks for a code element that has a ‘type’ attribute and retrieves the corresponding C type element.

Returns:
CodeElement | None

The C type element if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_generated_element() → CodeElement | None#

Get the generated code element for this model element.

Only the code element associated via a role-less mapping is returned, which guarantees at most one result. Code elements associated through a named role (e.g. CycleMethod, ResetMethod) are not returned here; use the dedicated methods (get_cycle, get_reset, etc.) instead.

Returns:
CodeElement | None

The code element mapped to this model element without a role, or None if no such mapping exists.

Raises:
AttributeError

If this instance has no ‘id’ attribute.

ValueError

If no cgmapping is set on this instance.

get_model_type() → ModelElement | None#

Get the model element corresponding to the type of this model element.

This method first checks if this model element has a ‘type’ attribute. If it does, it retrieves the model element with that ID. Otherwise, it gets the generated code element, retrieves its type, and returns the model element associated with that type ID.

Returns:
ModelElement | None

The model element representing the type, None if not found.

Raises:
ValueError

If no cgmapping is set on this instance.

class ansys.scadeone.core.svc.cgmapping.model.ModelEnum(id: int, values: list[ModelEnumValue])#

Bases: ModelElement

Model enum type definition.

Parameters:
idint

Unique identifier for this enum type.

valueslist[ModelEnumValue]

List of enum values.

class ansys.scadeone.core.svc.cgmapping.model.ModelEnumValue(id: int, path: str, default: bool | None = None)#

Bases: ModelElement

Model enum type value.

Parameters:
idint

Unique identifier for this enum value.

pathstr

Path to the enum value.

defaultbool | None

Whether this is the default value.

class ansys.scadeone.core.svc.cgmapping.model.ModelGroup(*, projections: list[ModelGroupProjection] = <factory>)#

Bases: ModelElement

Base class for model variable and probe groups.

Subclasses hold a projections list and a shared identifier (name for variable groups, path for probe groups).

get_c_type() → None#

Not applicable for groups.

get_generated_element() → None#

Not applicable for groups.

get_generated_group_elements() → list[CodeElement]#

Get the generated code elements for all projections in this group.

Returns:
list[CodeElement]

List of generated code elements corresponding to each projection in this group.

Raises:
ValueError

If no cgmapping is set on this instance.

get_group_projection(projection: list[str | int]) → ModelGroupProjection | None#

Get the group element corresponding to a specific projection.

Parameters:
projectionlist[GroupProjection]

The exact projection path of element.

Returns:
ModelGroupProjection | None

The group element corresponding to the given projection, or None if not found.

Raises:
ValueError

If no cgmapping is set on this instance.

get_model_type() → None#

Not applicable for groups.

class ansys.scadeone.core.svc.cgmapping.model.ModelGroupProbeProjection(id: int, projection: list[str | int] | None = None)#

Bases: ModelGroupProjection

Projection of a grouped model probe.

Parameters:
idint

Unique identifier for the projected model probe.

projectionlist[GroupProjection] | None

Group projection path for the probe.

get_generated_element() → CodeElement | None#

Get the generated code element for this probe projection.

Returns:
CodeElement | None

The code element mapped to this probe projection without a role, or None if no such mapping exists.

class ansys.scadeone.core.svc.cgmapping.model.ModelGroupProjection(id: int, projection: list[str | int] | None = None)#

Bases: ModelElement

Projection of a group.

Parameters:
idint

Unique identifier for the projected model variable.

projectionlist[GroupProjection] | None

Group projection path for the variable.

class ansys.scadeone.core.svc.cgmapping.model.ModelGroupVariableProjection(id: int, projection: list[str | int] | None = None, _associated_probe: ModelGroupProbeProjection | None = None)#

Bases: ModelGroupProjection

Projection of a grouped model variable.

Parameters:
idint

Unique identifier for the projected model variable.

projectionlist[GroupProjection] | None

Group projection path for the variable.

get_associated_probe() → ModelGroupProbeProjection | None#

Get the associated probe for this variable projection if it exists.

class ansys.scadeone.core.svc.cgmapping.model.ModelLoopInstance(id: int, path: str, bound: int, probes: list[ModelProbe | ModelProbesGroup], instances: list[ModelInstance], kind: LoopKind | None = None, partial: bool | None = None)#

Bases: HasProbesMixin, HasComputedFlagMixin, ModelElement

Model loop instance.

Parameters:
idint

Unique identifier for this loop instance.

pathstr

Path to the loop instance.

boundint

Loop bound.

kindLoopKind | None

Kind of loop (Iterator or Forward).

partialbool | None

Whether the loop is partial.

probeslist[ModelProbe | ModelProbesGroup]

List of probes in this loop.

instanceslist[ModelInstance]

List of nested instances.

class ansys.scadeone.core.svc.cgmapping.model.ModelMonoOperator(id: int, path: str, probes: list[ModelProbe | ModelProbesGroup], instances: list[ModelInstance], src: int, type_parameters: list[ModelTypeParameter], size_parameters: list[ModelSizeParameter], inputs: list[ModelMonoVariable], outputs: list[ModelMonoVariable])#

Bases: OperatorBase

Model operator monomorphization.

Parameters:
idint

Unique identifier for this monomorphized operator.

pathstr

Path to the operator.

srcint

Reference ID to the source operator.

type_parameterslist[ModelTypeParameter]

List of type parameters.

size_parameterslist[ModelSizeParameter]

List of size parameters.

inputslist[ModelMonoVariable]

List of monomorphized input variables.

outputslist[ModelMonoVariable]

List of monomorphized output variables.

probeslist[ModelProbe | ModelProbesGroup]

List of probes.

instanceslist[ModelInstance]

List of instances.

get_flat_inputs() → list[ModelMonoVariable]#

Get all monomorphized input variables.

Returns:
list[ModelMonoVariable]

All input variables in order.

get_flat_outputs() → list[ModelMonoVariable]#

Get all monomorphized output variables.

Returns:
list[ModelMonoVariable]

All output variables in order.

get_input_groups() → list[ModelVariablesGroup]#

Always empty: monomorphized operators have no variable groups.

get_inputs() → list[ModelMonoVariable]#

Get monomorphized operator inputs.

get_output_groups() → list[ModelVariablesGroup]#

Always empty: monomorphized operators have no variable groups.

get_outputs() → list[ModelMonoVariable]#

Get monomorphized operator outputs.

get_src_operator() → ModelOperator | None#

Get the source operator for this monomorphized operator.

Returns:
ModelOperator | None

The source operator if found, None if not found or if no cgmapping is set.

class ansys.scadeone.core.svc.cgmapping.model.ModelMonoVariable(id: int, src: int, _associated_probe: ModelProbe | None = None)#

Bases: ModelElement

Model variable monomorphization.

Parameters:
idint

Unique identifier for this monomorphized variable.

srcint

Reference ID to the source variable.

get_associated_probe() → ModelProbe | None#

Get the associated probe for this variable.

class ansys.scadeone.core.svc.cgmapping.model.ModelNamedType(id: int, path: str, definition: int | None = None)#

Bases: ModelElement

Model named type.

Parameters:
idint

Unique identifier for this named type.

pathstr

Path to the named type.

definitionint | None

Reference ID to the type definition (if any).

get_model_type() → ModelElement | None#

Get the model element corresponding to the definition of this named type.

Returns:
ModelElement | None

The model element representing the definition, None if not found.

Raises:
ValueError

If no cgmapping is set on this instance.

class ansys.scadeone.core.svc.cgmapping.model.ModelOperator(id: int, path: str, probes: list[ModelProbe | ModelProbesGroup], instances: list[ModelInstance], inputs: list[ModelVariable | ModelVariablesGroup], outputs: list[ModelVariable | ModelVariablesGroup], root: bool | None = None, external: bool | None = None, expanded: bool | None = None, specialize: int | None = None)#

Bases: OperatorBase

Model operator.

Parameters:
idint

Unique identifier for this operator.

pathstr

Path to the operator.

rootbool | None

Whether this is a root operator.

externalbool | None

Whether this operator is external.

expandedbool | None

Whether this operator is expanded.

specializeint | None

Reference ID to specialization (if any).

inputslist[ModelVariable | ModelGroup]

List of input variables and groups. A ModelGroup is created only if the variable has a non-None projection attribute.

outputslist[ModelVariable | ModelGroup]

List of output variables and groups. A ModelGroup is created only if the variable has a non-None projection attribute.

probeslist[ModelProbe | ModelProbesGroup]

List of probes.

instanceslist[ModelInstance]

List of instances.

get_flat_inputs() → list[ModelVariable]#

Get all input variables flattened from groups.

Returns:
list[ModelVariable]

All input variables from all groups in order.

get_flat_outputs() → list[ModelVariable]#

Get all output variables flattened from groups.

Returns:
list[ModelVariable]

All output variables from all groups in order.

get_global_context() → CGlobal | None#

Get the generated global context variable.

Returns:
CGlobal | None

The global context variable if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_global_obs_struct() → CStruct | None#

Get the generated global observation structure.

Returns:
CStruct | None

The global observation structure if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_input_groups() → list[ModelVariablesGroup]#

Get operator input groups only (excluding ungrouped variables).

get_inputs() → list[ModelVariable | ModelVariablesGroup]#

Get operator inputs (variables and groups).

get_mono_operators() → list[ModelMonoOperator]#

Get the monomorphized operators derived from this operator.

Returns:
list[ModelMonoOperator]

List of monomorphized operators that have this operator as their source. Returns empty list if none found or if no cgmapping is set.

get_output_groups() → list[ModelVariablesGroup]#

Get operator output groups only (excluding ungrouped variables).

get_outputs() → list[ModelVariable | ModelVariablesGroup]#

Get operator outputs (variables and groups).

class ansys.scadeone.core.svc.cgmapping.model.ModelOperatorInstance(id: int, path: str, operator: int, probes: list[ModelProbe | ModelProbesGroup], instances: list[ModelInstance])#

Bases: HasProbesMixin, HasComputedFlagMixin, ModelElement

Model instance of an operator.

Parameters:
idint

Unique identifier for this operator instance.

pathstr

Path to the operator instance.

operatorint

Reference ID to the operator.

probeslist[ModelProbe | ModelProbesGroup]

List of probes in this instance.

instanceslist[ModelInstance]

List of nested instances.

class ansys.scadeone.core.svc.cgmapping.model.ModelPredefinedType(id: int, name: str)#

Bases: ModelElement

Model predefined type.

Parameters:
idint

Unique identifier for this type.

namestr

Name of the predefined type.

class ansys.scadeone.core.svc.cgmapping.model.ModelProbe(id: int, path: str, kind: ProbeKind, projection: list[str | int] | None = None)#

Bases: HasComputedFlagMixin, ModelElement

Model element marked as probe.

Parameters:
idint

Unique identifier for this probe.

pathstr

Path to the probe.

kindProbeKind

Kind of probe (Input, Output, Local, Wire).

projectionlist[GroupProjection] | None

Group projection for the probe.

get_generated_element() → CodeElement | None#

Get the generated code element for this probe.

Returns:
CodeElement | None

The code element mapped to this probe without a role, or None if no such mapping exists.

class ansys.scadeone.core.svc.cgmapping.model.ModelProbesGroup(path: str, kind: ProbeKind, *, projections: list[ModelGroupProjection] = <factory>)#

Bases: ModelGroup

Group of probes sharing the same path.

Each probe in the group has the same path and kind and is distinguished by its projection (a list of label strings and positional integers).

Parameters:
pathstr

Shared probe path (used as the group identifier).

kindProbeKind

Kind of the probes (Input, Output, Local, Wire).

class ansys.scadeone.core.svc.cgmapping.model.ModelSensor(id: int, path: str, type: int)#

Bases: ModelElement

Model sensor.

Parameters:
idint

Unique identifier for this sensor.

pathstr

Path to the sensor.

typeint

Reference ID to the type of the sensor.

class ansys.scadeone.core.svc.cgmapping.model.ModelSizeParameter(id: int, name: str, value: int)#

Bases: ModelElement

Model monomorphization operator size parameter.

Parameters:
idint

Unique identifier for this size parameter.

namestr

Name of the size parameter.

valueint

Value of the size parameter.

class ansys.scadeone.core.svc.cgmapping.model.ModelStruct(id: int, fields: list[ModelStructField])#

Bases: ModelElement

Model structure type definition.

Parameters:
idint

Unique identifier for this struct type.

fieldslist[ModelStructField]

List of fields in the structure.

class ansys.scadeone.core.svc.cgmapping.model.ModelStructField(id: int, name: str, type: int)#

Bases: ModelElement

Model structure field.

Parameters:
idint

Unique identifier for this field.

namestr

Name of the field.

typeint

Reference ID to the type of the field.

class ansys.scadeone.core.svc.cgmapping.model.ModelTypeParameter(id: int, name: str, type: int)#

Bases: ModelElement

Model monomorphization operator type parameter.

Parameters:
idint

Unique identifier for this type parameter.

namestr

Name of the type parameter.

typeint

Reference ID to the type.

class ansys.scadeone.core.svc.cgmapping.model.ModelVariable(id: int, name: str, projection: list[str | int] | None = None, _associated_probe: ModelProbe | None = None)#

Bases: ModelElement

Model variable.

Parameters:
idint

Unique identifier for this variable.

namestr

Name of the variable.

projectionlist[GroupProjection] | None

Group projection for the variable.

get_associated_probe() → ModelProbe | None#

Get the associated probe for this variable.

class ansys.scadeone.core.svc.cgmapping.model.ModelVariablesGroup(name: str, *, projections: list[ModelGroupProjection] = <factory>)#

Bases: ModelGroup

Group of model variables.

Each variable of a group shares the same group name and is characterized by its projection, which consists of a list of strings (named) and integers (positional) identifying the variable within the group structure.

Parameters:
namestr

Shared group name.

projectionslist[ModelGroupProjection]

Projected variables that belong to this group.

class ansys.scadeone.core.svc.cgmapping.model.ModelVariant(id: int, constructors: list[ModelVariantConstructor])#

Bases: ModelElement

Model variant type definition.

Parameters:
idint

Unique identifier for this variant type.

constructorslist[ModelVariantConstructor]

List of constructors for the variant.

class ansys.scadeone.core.svc.cgmapping.model.ModelVariantConstructor(id: int, name: str, type: int | None = None)#

Bases: ModelElement

Model variant type constructor.

Parameters:
idint

Unique identifier for this constructor.

namestr

Name of the constructor.

typeint | None

Reference ID to the type of the constructor (if any).

class ansys.scadeone.core.svc.cgmapping.model.OperatorBase(id: int, path: str, probes: list[ModelProbe | ModelProbesGroup], instances: list[ModelInstance])#

Bases: HasProbesMixin, ModelElement

Base class providing common operator methods for ModelOperator and ModelMonoOperator.

get_context_type() → CStruct | None#

Get the generated context type structure.

Returns:
CStruct | None

The context type structure if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_context_typedef() → CTypedef | None#

Get the generated context type typedef.

Returns:
CTypedef | None

The context type typedef if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_cycle() → CFunction | None#

Get the generated cycle function.

Returns:
CFunction | None

The cycle function if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_function_name() → str | None#

Get the generated operator name.

Returns:
str | None

The generated operator name if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_generated_element() → None#

Model operators are associated to potentially multiple code elements (cycle method, init method, reset method, context struct, etc.) and thus don’t have a single role-less generated element. Consider using the dedicated methods to access the specific associated code elements instead.

Returns:
None

Operators do not have a single generated code element.

get_header_name() → str | None#

Get the generated header file name (.h).

Returns:
str | None

The header file name if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_init() → CFunction | None#

Get the generated init function.

Returns:
CFunction | None

The init function if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_input_struct_type() → CStruct | None#

Get the generated input structure type.

Returns:
CStruct | None

The input structure type if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_input_struct_typedef() → CTypedef | None#

Get the generated input structure typedef.

Returns:
CTypedef | None

The input structure typedef if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_obs_struct_type() → CStruct | None#

Get the generated observation structure type.

Returns:
CStruct | None

The observation structure type if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_obs_struct_typedef() → CTypedef | None#

Get the generated observation structure typedef.

Returns:
CTypedef | None

The observation structure typedef if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_output_struct_type() → CStruct | None#

Get the generated output structure type.

Returns:
CStruct | None

The output structure type if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_output_struct_typedef() → CTypedef | None#

Get the generated output structure typedef.

Returns:
CTypedef | None

The output structure typedef if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_reset() → CFunction | None#

Get the generated reset function.

Returns:
CFunction | None

The reset function if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

get_source_name() → str | None#

Get the generated source file name (.c).

Returns:
str | None

The source file name if available, None otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

is_function() → bool#

Whether the operator is a function. An operator is a function if it is not a node. A function only has an associated cycle method. No init or reset methods.

Returns:
bool

True if this operator is a function, False otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

is_node() → bool#

Whether the operator is a node. A node has associated init method, reset method and context in addition to a function operator.

Returns:
bool

True if this operator is a node, False otherwise.

Raises:
ValueError

If no cgmapping is set on this instance.

class ansys.scadeone.core.svc.cgmapping.model.ProbeKind(*values)#

Bases: Enum

Kind of probe in the model.

ansys.scadeone.core.svc.cgmapping.model.load_model_from_json(model_data: list[tuple], registry: _ModelRegistry | None = None) → _ModelRegistry#

Load model declarations from JSON data into a registry.

Parameters:
model_datalist[tuple]

List of model declarations as tuples from JSON.

registry_ModelRegistry | None, optional

Existing registry to use, or None to create a new one.

Returns:
_ModelRegistry

Registry containing all parsed model items.

ansys.scadeone.core.svc.cgmapping.model.parse_model_declaration(data: tuple[str, dict[str, Any]]) → ModelDeclaration#

Parse a ModelDeclaration from JSON data.

Parameters:
datatuple

JSON data as a tuple [type_name, declaration_data].

Returns:
ModelDeclaration

Parsed declaration as a tuple (type_name, declaration_object).

ansys.scadeone.core.svc.cgmapping.model.parse_model_instance(data: tuple[str, dict[str, Any]]) → ModelInstance#

Parse a ModelInstance from JSON data.

Parameters:
datatuple

JSON data as a tuple [type_name, instance_data].

Returns:
ModelInstance

Parsed instance as a tuple (type_name, instance_object).

ansys.scadeone.core.svc.cgmapping.model.parse_model_mono_variable(data: dict) → ModelMonoVariable#

Parse a ModelMonoVariable from JSON data.

Parameters:
datadict

JSON data for the monomorphized variable.

Returns:
ModelMonoVariable

Parsed monomorphized variable object.

ansys.scadeone.core.svc.cgmapping.model.parse_model_size_parameter(data: dict) → ModelSizeParameter#

Parse a ModelSizeParameter from JSON data.

Parameters:
datadict

JSON data for the size parameter.

Returns:
ModelSizeParameter

Parsed size parameter object.

ansys.scadeone.core.svc.cgmapping.model.parse_model_type_parameter(data: dict) → ModelTypeParameter#

Parse a ModelTypeParameter from JSON data.

Parameters:
datadict

JSON data for the type parameter.

Returns:
ModelTypeParameter

Parsed type parameter object.

ansys.scadeone.core.svc.cgmapping.model.parse_model_variable(data: dict) → ModelVariable#

Parse a ModelVariable from JSON data.

Parameters:
datadict

JSON data for the variable.

Returns:
ModelVariable

Parsed variable object.

ansys.scadeone.core.svc.cgmapping.model.parse_probe(data: dict) → ModelProbe#

Parse a Probe from JSON data.

Parameters:
datadict

JSON data for the probe.

Returns:
Probe

Parsed probe object.

ansys.scadeone.core.svc.cgmapping.model.GroupProjection = str | int#

Type alias for group projection

type ansys.scadeone.core.svc.cgmapping.model.ModelDeclaration = tuple[str, ModelPredefinedType | ModelArray | ModelStruct | ModelEnum | ModelVariant | ModelNamedType | ModelConstant | ModelSensor | ModelOperator | ModelMonoOperator]#

Type alias for model declarations (discriminated union)

type ansys.scadeone.core.svc.cgmapping.model.ModelInstance = tuple[str, ModelOperatorInstance | ModelLoopInstance]#

Type alias for model instances (discriminated union)