-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial_template.py
More file actions
49 lines (32 loc) · 1.35 KB
/
tutorial_template.py
File metadata and controls
49 lines (32 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import requests
import aas_http_client as aasClient
from aas_standard_parser import AIMCParser
import json
import time
AAS_SERVER_URL = "https://techdays-alm.em.ag/"
ASSET_CONNECTOR_URL = "https://techdays-resource-alm.em.ag/"
TUTORIAL_AAS_ID = "https://fluid40.de/ids/shell/8547_5433_6140_7422"
AIMC_SEMANTIC_ID = "/idta/AssetInterfacesMappingConfiguration"
def tutorial_final():
# create AAS client and connect to server
# get all AAS from server
# get the AAS used in the tutorial
# search for the AssetInterfacesMappingConfiguration Submodel by the semantic ID
# parse the AIMC Submodel to get the mapping configurations
# get all AID Submodels defined in the AIMC configuration
# create session to Asset Connector
# add the aid submodels (in json format) to the Asset Connector configurations
print(2)
counter = 1
while (counter <= 1000):
# response_content: dict = json.loads(response.content)
# response_payload = response_content.get("Payload", None)
# print("---")
# print(f"{source_ref.property_name}: {json.dumps(response_payload, indent=4)}")
# print("---")
time.sleep(2)
counter += 1
if __name__ == "__main__":
print("Start tutorial.")
tutorial_final()
print("Tutorial completed.")