LLRS
#
- class ansys.scade.pyalmgw.llrs.LLRS(llr_export: LLRExport, kind, root)#
Base class for creating a surrogate model for a given product.
Overview#
Return the value of an attribute of a model element. |
|
Return the built-in attributes of a model element. |
|
Return the class name of a model element. |
|
Return the elements linked to a model element for a given association. |
|
Return the name of a model element. |
|
Return the oid of a model element. |
|
Return the path of a model element. |
|
Return the name of a model. |
|
Return the oid of a model. |
Parse a role expressions and return the role name and the list of classes. |
|
Dump the child elements as a tree. |
|
Add an entry for a model element. |
|
Dump the child elements as a list. |
|
Dump the children of a model element to a list. |
|
Return the attribute value of a model element. |
|
Generate the image of a model element and return its path when applicable or None. |
|
Return the linked elements of a model element for a given path. |
|
Return the URL corresponding to an oid. |
|
Create a Section entry. |
Import detail#
from ansys.scade.pyalmgw.llrs import LLRS
Attribute detail#
- LLRS.V194 = 4#
- LLRS.VCUSTOM = 0#
- LLRS.kind#
- LLRS.llr_export#
- LLRS.re_path#
- LLRS.root#
- LLRS.version = 0#
Method detail#
- LLRS.decompose_role(item, role_expression: str)#
Parse a role expressions and return the role name and the list of classes.
The syntax of a role expression is
.[ '{' [ ',' ]* '}' ]
- LLRS.dump_children(container, item, cls, parent_oid)#
Dump the child elements as a tree.
- LLRS.dump_item(container: List[Any], item: Any, kind: str, parent_oid: str)#
Add an entry for a model element.
- LLRS.dump_siblings(container, item, cls, parent_oid)#
Dump the child elements as a list.
- LLRS.dump_sub_elements(container: List[Any], item: Any, cls: str, flatten: bool, parent_oid: str)#
Dump the children of a model element to a list.
- LLRS.get_attribute(item: Any, path: str) Any #
Return the attribute value of a model element.
- Parameters:
- item
Any
Input model element.
- path
str
Path of the attribute.
- item
- Returns:
Any
The value of the attribute or None if an error occurs.
- abstract LLRS.get_item_attribute(item: Any, name: str) Any #
Return the value of an attribute of a model element.
- Parameters:
- item
Any
Input model element.
- name
str
Name of the attribute to consider in the meta-model.
- item
- Returns:
Any
Attribute value.
- abstract LLRS.get_item_attributes(item: Any) list #
Return the built-in attributes of a model element.
This applies to annotatable elements: the list contains the annotation values tagged as
LLR_PROP
.
- LLRS.get_item_image(item: Any) str | None #
Generate the image of a model element and return its path when applicable or None.
- abstract LLRS.get_item_links(item: Any, role: str, sort: bool) List[Any] #
Return the elements linked to a model element for a given association.
- LLRS.get_links(item: Any, path: str, sort: bool) List[Any] #
Return the linked elements of a model element for a given path.
- LLRS.get_url(oid)#
Return the URL corresponding to an oid.
The default implementation uses the generic one.