Connector#

class ansys.scade.pyalmgw.connector.Connector(id: str, project: scade.model.project.stdproject.Project | None = None)#

Top-level class for an external ALM Gateway connector.

Overview#

on_export

Process the export command.

on_import

Process the import command.

on_locate

Process the locate command.

on_manage

Process the manage command.

on_settings

Process the settings command.

execute

Execute the ALM Gateway command.

export_llrs

Generate the surrogate models.

get_export_class

Return an instance of LLRExport.

get_llr_default_schema

Return a default schema to be used for exporting the surrogate model.

get_llr_diagrams

Return whether the surrogfate model should include images: diagrams or panels for example.

get_llr_schema

Return the schema to be used for exporting the LLRS.

get_llrs_file

Return the default path of the file to contain the exported LLRS.

main

Package entry point.

Import detail#

from ansys.scade.pyalmgw.connector import Connector

Attribute detail#

Connector.id#
Connector.project = None#

Method detail#

Connector.execute(command: str, *args: str) int#

Execute the ALM Gateway command.

Parameters:
commandstr

Input command, must be one of settings, manage, locate, import or export.

*argsstr

Parameters of the command

Returns:
int

Return code of the executed command.

Connector.export_llrs()#

Generate the surrogate models.

Connector.get_export_class() ansys.scade.pyalmgw.llrs.LLRExport | None#

Return an instance of LLRExport.

Connector.get_llr_default_schema() pathlib.Path#

Return a default schema to be used for exporting the surrogate model.

The schema depends on the project’s nature: SCADE Suite, Test, Display or Architect.

Connector.get_llr_diagrams() bool#

Return whether the surrogfate model should include images: diagrams or panels for example.

By default, the information is expected to be persisted in the project as a tool property @ALMGW:DIAGRAMS (default: false).

Connector.get_llr_schema() pathlib.Path#

Return the schema to be used for exporting the LLRS.

By default, the information is expected to be persisted in the project as a tool property @ALMGW:LLRSCHEMA. If the property is not defined, the method returns a default schema.

Connector.get_llrs_file() pathlib.Path#

Return the default path of the file to contain the exported LLRS.

Connector.main() int#

Package entry point.

abstract Connector.on_export(links: pathlib.Path, pid: int) int#

Process the export command.

abstract Connector.on_import(file: pathlib.Path, pid: int) int#

Process the import command.

abstract Connector.on_locate(req: str, pid: int) int#

Process the locate command.

abstract Connector.on_manage(pid: int) int#

Process the manage command.

abstract Connector.on_settings(pid: int) int#

Process the settings command.