Variable declarations#
- class ansys.scadeone.core.swan.VarSection(var_decls: List[VarDecl])#
Bases:
ScopeSection
Implements:
var {{var_decl ;}} section.
- static set_owner(owner: Self, children: Self | Iterable[Self])#
Helper to set owner as the owner of each item in the Iterable items.
- property is_protected: bool#
Tell if a construct item is syntactically protected with some markup and is stored as a string (without the markup).
- property module: ModuleBase#
Module containing the item.
- Returns:
ModuleBase: module container, see
ModuleBody
andModuleInterface
- property owner: Self#
Owner of current Swan construct.
- class ansys.scadeone.core.swan.Variable#
Bases:
SwanItem
Base class for Variable and ProtectedVariable.
- static set_owner(owner: Self, children: Self | Iterable[Self])#
Helper to set owner as the owner of each item in the Iterable items.
- property is_protected: bool#
Tell if a construct item is syntactically protected with some markup and is stored as a string (without the markup).
- property module: ModuleBase#
Module containing the item.
- Returns:
ModuleBase: module container, see
ModuleBody
andModuleInterface
- property owner: Self#
Owner of current Swan construct.
- class ansys.scadeone.core.swan.VarDecl(id: Identifier, is_clock: bool | None = False, is_probe: bool | None = False, type: GroupTypeExpression | None = None, when: ClockExpr | None = None, default: Expression | None = None, last: Expression | None = None)#
Bases:
Declaration
,Variable
Class for variable declaration.
- static set_owner(owner: Self, children: Self | Iterable[Self])#
Helper to set owner as the owner of each item in the Iterable items.
- property default: Expression | None#
Variable default expression.
- property id: Identifier#
Language item identifier.
- property is_protected: bool#
Tell if a construct item is syntactically protected with some markup and is stored as a string (without the markup).
- property last: Expression | None#
Variable last expression.
- property module: ModuleBase#
Module containing the item.
- Returns:
ModuleBase: module container, see
ModuleBody
andModuleInterface
- property owner: Self#
Owner of current Swan construct.
- property type: GroupTypeExpression | None#
Variable type.
- class ansys.scadeone.core.swan.ProtectedVariable(data: str)#
Bases:
Variable
,ProtectedItem
Protected variable definition as a string.
- static set_owner(owner: Self, children: Self | Iterable[Self])#
Helper to set owner as the owner of each item in the Iterable items.
- property is_protected#
Tell if item is syntactically protected and provided as a string.
- property module: ModuleBase#
Module containing the item.
- Returns:
ModuleBase: module container, see
ModuleBody
andModuleInterface
- property owner: Self#
Owner of current Swan construct.