AAS HTTP Client Documentation
Loading...
Searching...
No Matches
aas_http_client.utilities.model_builder Namespace Reference

Functions

str create_unique_short_id (str id_short)
 Generate a unique identifier string by appending a UUID to the provided ID short.
 
model.Submodel create_submodel_from_file (str json_file="")
 Creates a submodel from a JSON file file.
 
model.Property create_base_submodel_element_property (str|None id_short, model.datatypes type, Any value, str display_name="", str description="")
 Create a basic SubmodelElement of type Property.
 
model.SubmodelElementCollection create_base_submodel_element_collection (str id_short, list[model.SubmodelElement] value, str display_name="", str description="")
 Create a basic SubmodelElement of type SubmodelElementCollection.
 
model.Submodel create_base_submodel (str identifier, str id_short, str display_name="", str description="")
 Create a basic Submodel.
 
model.AssetAdministrationShell create_base_aas (str identifier, str id_short, str global_asset_identifier, str display_name="", str description="", model.AssetKind asset_kind=model.AssetKind.INSTANCE)
 Create a basic AAS and add base asset information.
 
model.AssetAdministrationShell create_base_aas_with_asset_information (str identifier, str id_short, model.AssetInformation asset_information, str display_name="", str description="")
 Create a basic AAS.
 
model.SpecificAssetId create_specific_asset_id (str name, str value, str|None external_subject_reference_value=None)
 Create a new SpecificAssetId instance.
 
model.AssetInformation create_base_asset_information (str global_asset_id, model.AssetKind asset_kind=model.AssetKind.INSTANCE, list[model.SpecificAssetId]|None specific_asset_id=None)
 Return a basic AssetInformation instance.
 
model.ModelReference create_reference (str id)
 Create a ModelReference.
 
model.EmbeddedDataSpecification|None create_embedded_data_specification (model.PreferredNameTypeIEC61360 preferred_name, model.DefinitionTypeIEC61360|None definition, model.ShortNameTypeIEC61360|None short_name, str|None unit, model.Reference|None unit_id, model.DataTypeIEC61360|None data_type, str|None source_of_definition, str|None symbol, str|None value_format, set[model.ValueReferencePair]|None value_list, str|None value, list[model.IEC61360LevelType]|None level_types)
 Create an embedded data specification with the given parameters.
 

Variables

 _logger
 

Function Documentation

◆ create_base_aas()

model.AssetAdministrationShell aas_http_client.utilities.model_builder.create_base_aas ( str  identifier,
str  id_short,
str  global_asset_identifier,
str   display_name = "",
str   description = "",
model.AssetKind   asset_kind = model.AssetKind.INSTANCE 
)

Create a basic AAS and add base asset information.

Parameters
identifieridentifier of the AAS
id_shortID short of the AAS
global_asset_identifieridentifier of the global Asset. if not provided, defaults to the AAS identifier
display_namedisplay name of the AAS, defaults to ""
descriptiondescription of the AAS, defaults to ""
asset_kindkind of the Asset, defaults to AssetKind.INSTANCE
Returns
AssetAdministrationShell instance

Definition at line 131 of file model_builder.py.

Here is the call graph for this function:

◆ create_base_aas_with_asset_information()

model.AssetAdministrationShell aas_http_client.utilities.model_builder.create_base_aas_with_asset_information ( str  identifier,
str  id_short,
model.AssetInformation  asset_information,
str   display_name = "",
str   description = "" 
)

Create a basic AAS.

Parameters
identifieridentifier of the AAS
id_shortID short of the AAS
asset_informationasset information of the AAS
display_namedisplay name of the AAS, defaults to ""
descriptiondescription of the AAS, defaults to ""
Returns
AssetAdministrationShell instance

Definition at line 170 of file model_builder.py.

◆ create_base_asset_information()

model.AssetInformation aas_http_client.utilities.model_builder.create_base_asset_information ( str  global_asset_id,
model.AssetKind   asset_kind = model.AssetKind.INSTANCE,
list[model.SpecificAssetId] | None   specific_asset_id = None 
)

Return a basic AssetInformation instance.

Parameters
global_asset_idglobal asset ID of the AssetInformation
asset_kindkind of the Asset, defaults to AssetKind.INSTANCE
specific_asset_idlist of specific asset IDs, defaults to None
Returns
AssetInformation instance

Definition at line 227 of file model_builder.py.

Here is the caller graph for this function:

◆ create_base_submodel()

model.Submodel aas_http_client.utilities.model_builder.create_base_submodel ( str  identifier,
str  id_short,
str   display_name = "",
str   description = "" 
)

Create a basic Submodel.

Parameters
identifieridentifier of the Submodel
id_shortID short of the Submodel
display_namedisplay name of the Submodel, defaults to ""
descriptiondescription of the Submodel, defaults to ""
Returns
Submodel instance

Definition at line 106 of file model_builder.py.

◆ create_base_submodel_element_collection()

model.SubmodelElementCollection aas_http_client.utilities.model_builder.create_base_submodel_element_collection ( str  id_short,
list[model.SubmodelElement]  value,
str   display_name = "",
str   description = "" 
)

Create a basic SubmodelElement of type SubmodelElementCollection.

Definition at line 82 of file model_builder.py.

◆ create_base_submodel_element_property()

model.Property aas_http_client.utilities.model_builder.create_base_submodel_element_property ( str | None  id_short,
model.datatypes  type,
Any  value,
str   display_name = "",
str   description = "" 
)

Create a basic SubmodelElement of type Property.

Definition at line 65 of file model_builder.py.

◆ create_embedded_data_specification()

model.EmbeddedDataSpecification | None aas_http_client.utilities.model_builder.create_embedded_data_specification ( model.PreferredNameTypeIEC61360  preferred_name,
model.DefinitionTypeIEC61360 | None  definition,
model.ShortNameTypeIEC61360 | None  short_name,
str | None  unit,
model.Reference | None  unit_id,
model.DataTypeIEC61360 | None  data_type,
str | None  source_of_definition,
str | None  symbol,
str | None  value_format,
set[model.ValueReferencePair] | None  value_list,
str | None  value,
list[model.IEC61360LevelType] | None  level_types 
)

Create an embedded data specification with the given parameters.

Parameters
preferred_nameThe preferred name of the concept description.
definitionThe definition of the concept description.
short_nameThe short name of the concept description.
unitThe unit of the concept description.
unit_idThe unit reference of the concept description.
data_typeThe data type of the concept description.
source_of_definitionThe source of definition of the concept description.
symbolThe symbol of the concept description.
value_formatThe value format of the concept description.
value_listThe value list of the concept description.
valueThe value of the concept description.
level_typesThe level types of the concept description.
Returns
An instance of EmbeddedDataSpecification if successful, None otherwise.

Definition at line 264 of file model_builder.py.

◆ create_reference()

model.ModelReference aas_http_client.utilities.model_builder.create_reference ( str  id)

Create a ModelReference.

Parameters
idID of the Submodel to reference
Returns
ModelReference instance

Definition at line 244 of file model_builder.py.

◆ create_specific_asset_id()

model.SpecificAssetId aas_http_client.utilities.model_builder.create_specific_asset_id ( str  name,
str  value,
str | None   external_subject_reference_value = None 
)

Create a new SpecificAssetId instance.

Parameters
namename of the SpecificAssetId
valuevalue of the SpecificAssetId
external_subject_reference_valueoptional external subject reference value
Returns
A new SpecificAssetId object.

Definition at line 201 of file model_builder.py.

◆ create_submodel_from_file()

model.Submodel aas_http_client.utilities.model_builder.create_submodel_from_file ( str   json_file = "")

Creates a submodel from a JSON file file.

Parameters
idID of the submodel. If empty, the template's ID is used

Definition at line 36 of file model_builder.py.

◆ create_unique_short_id()

str aas_http_client.utilities.model_builder.create_unique_short_id ( str  id_short)

Generate a unique identifier string by appending a UUID to the provided ID short.

Parameters
id_shortprovided ID short
Returns
unique identifier

Definition at line 27 of file model_builder.py.

Variable Documentation

◆ _logger

aas_http_client.utilities.model_builder._logger
protected

Definition at line 19 of file model_builder.py.