diff --git a/newmodeljsonparse.py b/newmodeljsonparse.py index d63336fdde544ecb790842d9372a0cb88d5e3bd3..401d30cabc91d123ce8637bb7c8659846f59537f 100644 --- a/newmodeljsonparse.py +++ b/newmodeljsonparse.py @@ -411,7 +411,6 @@ def buildComponents(interfacesreturn, jsoninterfaces, jsoncomponents, jsonmeasu return interfacesreturn - def instantiateComponents(typesdict, interfaces, jsoncomponents, instantiatedict, eventsdict, streamsdict, componentlist, headnodeindex, variabledict): """ Instantiates all components and collects events, streams and variable names on the side. @@ -454,6 +453,13 @@ def instantiateComponents(typesdict, interfaces, jsoncomponents, instantiatedict def instantiate(typesdict, interfaces, jsoncomponents): + """ + Instantiates the interface root and starts instantiateComponents + :param typesdict: Dict for objecttype node names from the format {uuid : objecttypename}. + :param interfaces: A list of interfaces + :param jsoncomponents: A list of all componentdicts + :return: the values from instantiateComponents + """ instantiatedict = {} eventsdict = {} streamsdict ={} @@ -476,6 +482,10 @@ def instantiate(typesdict, interfaces, jsoncomponents): def main(): + """ + Main method that collects everything and starts all writing process. + :return: None + """ try: JSON_MODEL = sys.argv[1][:-5] if not os.path.exists(os.path.join('..', 'soil-opc-ua', f'{JSON_MODEL}.json')):