Sensor declaration#
- class ansys.scadeone.core.swan.SensorDecl(id: Identifier, type: TypeExpression, pragmas: List[Pragma] | None = None)#
Bases:
DeclarationSensor declaration with an id and a type.
- static set_owner(owner: SwanItem | IModel | None, children: SwanItem | Iterable[SwanItem] | None) None#
Helper to set owner as the owner of each item in the Iterable items.
- 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 model: IModel#
Return model containing the Swan item.
- property module: ModuleBase | None#
Module containing the item.
- Returns:
ModuleBase: module container, see
ModuleBodyandModuleInterfaceor None if the object is itself a module.
- property type: TypeExpression#
Sensor type.
- class ansys.scadeone.core.swan.SensorDeclarations(sensors: List[SensorDecl])#
Bases:
GlobalDeclarationSensor declarations: sensor {{ sensor_decl ; }}.
- static set_owner(owner: SwanItem | IModel | None, children: SwanItem | Iterable[SwanItem] | None) None#
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 model: IModel#
Return model containing the Swan item.
- property module: ModuleBase | None#
Module containing the item.
- Returns:
ModuleBase: module container, see
ModuleBodyandModuleInterfaceor None if the object is itself a module.
- property sensors: List[SensorDecl]#
Declared sensors.