mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Updated xml to json generator for events
This commit is contained in:
parent
5740cedb5a
commit
29a6ada1f7
3 changed files with 614 additions and 643 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -183,7 +183,8 @@ def generate_datamodel_tree(filename):
|
||||||
# Object Table
|
# Object Table
|
||||||
if obj_found == 1:
|
if obj_found == 1:
|
||||||
if obj_found_in_list == 0:
|
if obj_found_in_list == 0:
|
||||||
for value in LIST_OBJ:
|
obj_list = LIST_OBJ
|
||||||
|
for value in obj_list:
|
||||||
val = value.split(":")
|
val = value.split(":")
|
||||||
if val[1] == table_name:
|
if val[1] == table_name:
|
||||||
parent_obj = val[0]
|
parent_obj = val[0]
|
||||||
|
|
@ -213,7 +214,8 @@ def generate_datamodel_tree(filename):
|
||||||
# Parameter Table
|
# Parameter Table
|
||||||
if param_found == 1:
|
if param_found == 1:
|
||||||
if obj_found_in_list == 0:
|
if obj_found_in_list == 0:
|
||||||
for value in LIST_PARAM:
|
param_list = LIST_PARAM
|
||||||
|
for value in param_list:
|
||||||
val = value.split(":")
|
val = value.split(":")
|
||||||
if val[1] == table_name:
|
if val[1] == table_name:
|
||||||
parent_obj = val[0]
|
parent_obj = val[0]
|
||||||
|
|
|
||||||
|
|
@ -667,6 +667,7 @@ def printEVENT(dmparam, dmobject, _bbfdm_type):
|
||||||
"\"protocols\" : [\"usp\"]"), file=fp)
|
"\"protocols\" : [\"usp\"]"), file=fp)
|
||||||
|
|
||||||
if has_param:
|
if has_param:
|
||||||
|
print("\"output\" : {", file=fp)
|
||||||
fp.close()
|
fp.close()
|
||||||
|
|
||||||
for param in dmparam:
|
for param in dmparam:
|
||||||
|
|
@ -675,6 +676,7 @@ def printEVENT(dmparam, dmobject, _bbfdm_type):
|
||||||
|
|
||||||
if has_param:
|
if has_param:
|
||||||
fp = open('./.json_tmp', 'a', encoding='utf-8')
|
fp = open('./.json_tmp', 'a', encoding='utf-8')
|
||||||
|
print("}", file=fp)
|
||||||
|
|
||||||
print("}", file=fp)
|
print("}", file=fp)
|
||||||
fp.close()
|
fp.close()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue