smia.aas_model.aas_model_utils module

class smia.aas_model.aas_model_utils.AASModelUtils[source]

Bases: object

This class contains utility methods related to the AAS model.

static read_aas_model_object_store()[source]

This method reads the AAS model according to the selected serialization format.

Returns:

object with all Python elements of the AAS model.

Return type:

basyx.aas.model.DictObjectStore

static get_file_bytes_from_aasx_by_path(file_path)[source]

This method gets the bytes of a file appended inside an AASX package by a given internal path.

Parameters:

file_path (str) – the internal path of the file within the AASX package.

Returns:

the content of the file in the form of bytes.

Return type:

obj

static get_configuration_file_path_from_standard_submodel()[source]

This method gets the configuration file defined in the ‘Software Nameplate’ submodel, used as standard submodel for the SMIA software definition.

Returns:

path inside the AASX package of the configuration file.

Return type:

str

static get_elem_of_software_nameplate_by_semantic_id(object_store)[source]

This method obtains a SubmodelElement of the Software Nameplate submodel.

Parameters:

object_store (basyx.aas.model.DictObjectStore) – storage with all AAS information,

Returns:

submodelElement with the given semanticID

Return type:

basyx.aas.model.SubmodelElement

async static get_key_type_by_string(key_type_string)[source]

This method gets the KeyType defined in BaSyx SDK related to the given string.

Parameters:

key_type_string (str) – string of the desired KeyType.

Returns:

object of the KeyType defined in BaSyx.

Return type:

basyx.aas.model.KeyTypes

async static get_model_type_by_key_type(key_type)[source]

This method gets the AAS model class by a given KeyType defined in BaSyx SDK.

Parameters:

key_type (basyx.aas.model.KeyTypes) – desired KeyType.

Returns:

object of the AAS model class.

async static create_aas_reference_object(reference_type, keys_dict=None, external_ref=None)[source]

This method creates the AAS BaSyx Reference Python object. Depending on the reference type to create (ModelReference or ExternalReference), some information is required. If a Reference cannot be created, it returns None.

Parameters:
  • reference_type (str) – type of the reference to be created (ModelReference or ExternalReference).

  • keys_dict (list) – if ModelReference is selected, the required keys information in form of a JSON array.

  • external_ref (str) – if ExternalReference is selected, the required globally unique identifier.

Returns:

BaSyx Python object of the AAS Reference.

Return type:

basyx.aas.model.Reference

class smia.aas_model.aas_model_utils.AASModelInfo[source]

Bases: object

This class contains the information related to AAS model.

SEMANTICID_SOFTWARE_NAMEPLATE_SUBMODEL = 'https://admin-shell.io/idta/SoftwareNameplate/1/0'
SEMANTICID_SOFTWARE_NAMEPLATE_INSTANCE_NAME = 'https://admin-shell.io/idta/SoftwareNameplate/1/0/SoftwareNameplate/SoftwareNameplateInstance/InstanceName'
SEMANTIC_ID_SOFTWARE_NAMEPLATE_CONFIG_PATHS = 'https://admin-shell.io/idta/SoftwareNameplate/1/0/SoftwareNameplate/SoftwareNameplateInstance/ConfigurationPaths'
SEMANTIC_ID_SOFTWARE_NAMEPLATE_CONFIG_TYPE = 'https://admin-shell.io/idta/SoftwareNameplate/1/0/SoftwareNameplate/SoftwareNameplateInstance/ConfigurationType'
SEMANTIC_ID_SOFTWARE_NAMEPLATE_CONFIG_URI = 'https://admin-shell.io/idta/SoftwareNameplate/1/0/SoftwareNameplate/SoftwareNameplateInstance/ConfigurationURI'