Updated xml to json generator for events

This commit is contained in:
Suvendhu Hansa 2022-03-25 09:38:51 +00:00 committed by Vivek Kumar Dutta
parent 5740cedb5a
commit 29a6ada1f7
3 changed files with 614 additions and 643 deletions

File diff suppressed because it is too large Load diff

View file

@ -183,7 +183,8 @@ def generate_datamodel_tree(filename):
# Object Table
if obj_found == 1:
if obj_found_in_list == 0:
for value in LIST_OBJ:
obj_list = LIST_OBJ
for value in obj_list:
val = value.split(":")
if val[1] == table_name:
parent_obj = val[0]
@ -213,7 +214,8 @@ def generate_datamodel_tree(filename):
# Parameter Table
if param_found == 1:
if obj_found_in_list == 0:
for value in LIST_PARAM:
param_list = LIST_PARAM
for value in param_list:
val = value.split(":")
if val[1] == table_name:
parent_obj = val[0]

View file

@ -667,6 +667,7 @@ def printEVENT(dmparam, dmobject, _bbfdm_type):
"\"protocols\" : [\"usp\"]"), file=fp)
if has_param:
print("\"output\" : {", file=fp)
fp.close()
for param in dmparam:
@ -675,6 +676,7 @@ def printEVENT(dmparam, dmobject, _bbfdm_type):
if has_param:
fp = open('./.json_tmp', 'a', encoding='utf-8')
print("}", file=fp)
print("}", file=fp)
fp.close()